Load Dynamic Form for frmEdit, Save Application Skin, add UIConfig
This commit is contained in:
@@ -4,10 +4,12 @@ Imports DigitalData.GUIs.ClientSuite.ClassLayout
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.License
|
||||
Imports DevExpress.LookAndFeel
|
||||
|
||||
Public Class frmMain
|
||||
Private _Logger As Logger
|
||||
Private _Timer As ClassTimer
|
||||
Private _Loading As Boolean = True
|
||||
|
||||
Public Sub New()
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
@@ -36,10 +38,12 @@ Public Class frmMain
|
||||
|
||||
Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
' Initialize Main Timer
|
||||
_Timer = New ClassTimer(My.LogConfig, Me, My.Config.HeartbeatInterval)
|
||||
_Timer = New ClassTimer(My.LogConfig, Me, My.SysConfig.HeartbeatInterval)
|
||||
AddHandler _Timer.OnlineChanged, AddressOf HandleOnlineChanged
|
||||
SetOnlineLabel()
|
||||
|
||||
UserLookAndFeel.Default.SetSkinStyle(My.UIConfig.SkinName)
|
||||
|
||||
LabelCurrentUser.Caption = My.Application.User.UserName
|
||||
LabelCurrentMachine.Caption = My.Application.User.MachineName
|
||||
LabelCurrentVersion.Caption = My.Application.Info.Version.ToString
|
||||
@@ -64,7 +68,11 @@ Public Class frmMain
|
||||
MsgBox($"Clicked on Document {RowView.Row.Item("DocName")}")
|
||||
End Sub
|
||||
|
||||
AddHandler UserLookAndFeel.Default.StyleChanged, AddressOf frmMain_StyleChanged
|
||||
|
||||
LoadLayout()
|
||||
|
||||
_Loading = False
|
||||
End Sub
|
||||
|
||||
Private Sub FrmMain_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
||||
@@ -153,4 +161,11 @@ Public Class frmMain
|
||||
oForm.MdiParent = DocumentManager.MdiParent
|
||||
oForm.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_StyleChanged(sender As Object, e As EventArgs) Handles Me.StyleChanged
|
||||
If _Loading = False Then
|
||||
My.UIConfig.SkinName = LookAndFeel.ActiveSkinName
|
||||
My.UIConfigManager.Save()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user