Nur 1 Datei erlaubt
Receiver-Anzeige in Haupt-Form Abbrechen-Button
This commit is contained in:
@@ -13,6 +13,7 @@ Public Class frmMain
|
||||
Private Database As MSSQLServer
|
||||
Private ConfigManager As ConfigManager(Of Config)
|
||||
Private TempFiles As TempFiles
|
||||
Private FormHelper As FormHelper
|
||||
|
||||
Private GridBuilder As GridBuilder
|
||||
|
||||
@@ -23,12 +24,26 @@ Public Class frmMain
|
||||
Dim oLogPath = IO.Path.Combine(Application.LocalUserAppDataPath, "Log")
|
||||
LogConfig = New LogConfig(LogConfig.PathType.CustomPath, oLogPath, CompanyName:="Digital Data", ProductName:="Envelope Generator")
|
||||
Logger = LogConfig.GetLogger()
|
||||
|
||||
FormHelper = New FormHelper(LogConfig, Me)
|
||||
TempFiles = New TempFiles(LogConfig)
|
||||
TempFiles.Create()
|
||||
|
||||
Try
|
||||
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath)
|
||||
|
||||
If ConfigManager.Config.ConnectionString = String.Empty Then
|
||||
Dim oSQLConfig As New frmSQLConfig(LogConfig)
|
||||
If oSQLConfig.ShowDialog() = DialogResult.OK Then
|
||||
ConfigManager.Config.ConnectionString = oSQLConfig.ConnectionString
|
||||
ConfigManager.Save()
|
||||
Application.Restart()
|
||||
Else
|
||||
FormHelper.ShowErrorMessage(New ApplicationException("No Database configured. Application will close!"), "Form Load")
|
||||
Application.Exit()
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString)
|
||||
Database = New MSSQLServer(LogConfig, oConnectionString)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user