Add configuration to autoload data on form open
This commit is contained in:
parent
a0217d0582
commit
f0a340f742
@ -6,4 +6,5 @@ Public Class Config
|
||||
Public Property LastUsedMandator As String = ""
|
||||
Public Property Debug As Boolean = False
|
||||
Public Property AutomaticPriceCalculation As Boolean = True
|
||||
Public Property AutomaticLoadingOnFormOpen As Boolean = False
|
||||
End Class
|
||||
|
||||
@ -90,6 +90,10 @@ Public Class frmExportMain
|
||||
Where(Function(mandator) mandator.Id = ConfigManager.Config.LastUsedMandator).
|
||||
FirstOrDefault()
|
||||
End If
|
||||
|
||||
If ConfigManager.Config.AutomaticLoadingOnFormOpen = True Then
|
||||
SearchDocuments()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
FormHelper.ShowError(ex, "Initialisierung der Form")
|
||||
End Try
|
||||
|
||||
@ -118,7 +118,9 @@ Public Class frmImportMain
|
||||
btnLoadFiles.Enabled = True
|
||||
End Try
|
||||
|
||||
Await LoadFiles()
|
||||
If ConfigManager.Config.AutomaticLoadingOnFormOpen = True Then
|
||||
Await LoadFiles()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmImportMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user