Add Common Queries, Load User & Module Info from DB
This commit is contained in:
@@ -3,24 +3,41 @@ Imports DevExpress.XtraSplashScreen
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Filesystem
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DevExpress.LookAndFeel
|
||||
Imports ZooFlow.ClassConstants
|
||||
|
||||
Partial Public Class frmMain
|
||||
Private WithEvents FlowForm As New frmFlowForm()
|
||||
Private WithEvents FlowForm As frmFlowForm
|
||||
Private Init As ClassInit
|
||||
Private Loading As Boolean = True
|
||||
Private Logger As Logger = My.LogConfig.GetLogger
|
||||
|
||||
Public Sub New()
|
||||
InitializeComponent()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Dim oInit As New ClassInit(Me)
|
||||
oInit.InitializeApplication()
|
||||
' === Initialization ===
|
||||
Init = New ClassInit(My.LogConfig, Me)
|
||||
AddHandler Init.Completed, AddressOf Init_Completed
|
||||
Init.InitializeApplication()
|
||||
|
||||
' === Layout and Skin ===
|
||||
UserLookAndFeel.Default.SetSkinStyle(My.UIConfig.SkinName)
|
||||
End Sub
|
||||
|
||||
Private Sub Init_Completed(sender As Object, e As EventArgs)
|
||||
' Initialization Complete
|
||||
Loading = False
|
||||
SplashScreenManager.CloseForm(False)
|
||||
|
||||
' Setup Flow Form
|
||||
FlowForm = New frmFlowForm(My.Application.ModulesActive)
|
||||
FlowForm.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
Hide()
|
||||
FlowForm.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub FlowForm_ClipboardChanged(sender As Object, e As IDataObject) Handles FlowForm.ClipboardChanged
|
||||
@@ -50,20 +67,27 @@ Partial Public Class frmMain
|
||||
Hide()
|
||||
Else
|
||||
Show()
|
||||
BringToFront()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub ProgressChanged(sender As Object, Progress As ClassInitLoader.InitProgress)
|
||||
SplashScreenManager.Default.SendCommand(frmSplash.SplashScreenCommand.SetProgress, Progress.CurrentPercent)
|
||||
SplashScreenManager.Default.SendCommand(frmSplash.SplashScreenCommand.SetActionName, Progress.CurrentStep.Name)
|
||||
End Sub
|
||||
|
||||
Private Sub InitCompleted(sender As Object, e As RunWorkerCompletedEventArgs)
|
||||
SplashScreenManager.CloseForm(False)
|
||||
Private Sub ButtonSettings_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonSettings.ItemClick
|
||||
frmSettings.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub ButtonExit_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonExit.ItemClick
|
||||
|
||||
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