30-08-2023
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Runtime.Remoting.Messaging
|
||||
Imports Connectors.Common
|
||||
Imports DevExpress.XtraEditors.ViewInfo
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Database
|
||||
@@ -46,18 +47,23 @@ Partial Public Class frmMain
|
||||
AddInfoEntry("Version: {0}", Application.ProductVersion)
|
||||
AddDivider()
|
||||
|
||||
If ConfigManager.Config.ActiveModule = "NONE" Then
|
||||
AddWarnEntry("No ActiveModule selected, check your configuration!", ConfigManager.Config.ActiveModule)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Database = New MSSQLServer(LogConfig, ConfigManager.Config.ConnectionString)
|
||||
Sync = InitializeModule(ConfigManager.Config.ActiveModule)
|
||||
|
||||
' Load Form Title from Module
|
||||
Text = Sync.Name
|
||||
TrayIcon.Text = Sync.Name
|
||||
|
||||
If Sync Is Nothing Then
|
||||
AddWarnEntry("ActiveModule '{0}' is not implemented!", ConfigManager.Config.ActiveModule)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' Load Form Title from Module
|
||||
Text = Sync.Name
|
||||
TrayIcon.Text = Sync.Name
|
||||
|
||||
If Database.DBInitialized = False Then
|
||||
AddWarnEntry("Database could not be initialized. Please check connection string.")
|
||||
Exit Sub
|
||||
@@ -96,7 +102,6 @@ Partial Public Class frmMain
|
||||
oSync = New Sharepoint.SharepointSync(LogConfig, Database, ConfigManager.Config)
|
||||
|
||||
Case Else
|
||||
|
||||
Return Nothing
|
||||
|
||||
End Select
|
||||
@@ -207,7 +212,7 @@ Partial Public Class frmMain
|
||||
})
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
||||
Private Sub btnOpenLog_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenLog.ItemClick
|
||||
Try
|
||||
Dim oPath = LogConfig.LogDirectory
|
||||
Process.Start("explorer.exe", oPath)
|
||||
@@ -264,4 +269,13 @@ Partial Public Class frmMain
|
||||
e.Appearance.FontStyleDelta = FontStyle.Bold
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub btnOpenConfig_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenConfig.ItemClick
|
||||
Try
|
||||
Dim oPath = Application.StartupPath
|
||||
Process.Start("explorer.exe", oPath)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user