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 LastUsedMandator As String = ""
|
||||||
Public Property Debug As Boolean = False
|
Public Property Debug As Boolean = False
|
||||||
Public Property AutomaticPriceCalculation As Boolean = True
|
Public Property AutomaticPriceCalculation As Boolean = True
|
||||||
|
Public Property AutomaticLoadingOnFormOpen As Boolean = False
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -90,6 +90,10 @@ Public Class frmExportMain
|
|||||||
Where(Function(mandator) mandator.Id = ConfigManager.Config.LastUsedMandator).
|
Where(Function(mandator) mandator.Id = ConfigManager.Config.LastUsedMandator).
|
||||||
FirstOrDefault()
|
FirstOrDefault()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If ConfigManager.Config.AutomaticLoadingOnFormOpen = True Then
|
||||||
|
SearchDocuments()
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
FormHelper.ShowError(ex, "Initialisierung der Form")
|
FormHelper.ShowError(ex, "Initialisierung der Form")
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@ -118,7 +118,9 @@ Public Class frmImportMain
|
|||||||
btnLoadFiles.Enabled = True
|
btnLoadFiles.Enabled = True
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Await LoadFiles()
|
If ConfigManager.Config.AutomaticLoadingOnFormOpen = True Then
|
||||||
|
Await LoadFiles()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmImportMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
Private Sub frmImportMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user