ZooFlow: Clean up and fix Design changes
This commit is contained in:
@@ -1,30 +1,73 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DevExpress.LookAndFeel
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Messaging
|
||||
|
||||
Public Class frmFlowForm
|
||||
' Constants
|
||||
Private Const OPACITY_HIDDEN = 0.65
|
||||
Private Const OPACITY_SHOWN = 0.85
|
||||
|
||||
Private ActiveModules As List(Of String)
|
||||
Private Logger As Logger
|
||||
|
||||
Private ESCHitCount As Integer = 0
|
||||
|
||||
Private Init As ClassInit
|
||||
Private DTIDB_SEARCHES As DataTable
|
||||
|
||||
' Runtime Flags
|
||||
Private ApplicationLoading As Boolean = True
|
||||
Private IDBSearchActive As Boolean = False
|
||||
|
||||
' Runtime Variables
|
||||
Private ESCHitCount As Integer = 0
|
||||
|
||||
' Events
|
||||
Public Event ClipboardChanged As EventHandler(Of IDataObject)
|
||||
|
||||
Public Sub New()
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' === Hide form initially ===
|
||||
Opacity = 0
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub frmFlowForm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
' === Initialize Logger ===
|
||||
Logger = My.LogConfig.GetLogger()
|
||||
|
||||
' === Show Splash Screen ===
|
||||
SplashScreenManager.ShowForm(Me, GetType(frmSplash), False, False)
|
||||
|
||||
' === Initialization ===
|
||||
Init = New ClassInit(My.LogConfig, Me)
|
||||
AddHandler Init.Completed, AddressOf Init_Completed
|
||||
Init.InitializeApplication()
|
||||
End Sub
|
||||
|
||||
Private Sub Init_Completed(sender As Object, e As EventArgs)
|
||||
' === Initialization Complete ===
|
||||
ApplicationLoading = False
|
||||
SplashScreenManager.CloseForm(False)
|
||||
|
||||
' === Setup Timers ===
|
||||
AddHandler TimerRefreshData.Tick, AddressOf TimerRefreshData_Tick
|
||||
TimerRefreshData.Enabled = True
|
||||
|
||||
' === Setup Flow Form ===
|
||||
Location = My.UIConfig.FlowForm.Location
|
||||
|
||||
' === Register As Event Listener ===
|
||||
EventBus.Instance.Register(Me)
|
||||
|
||||
' === Set Form Properties ===
|
||||
TopMost = True
|
||||
AllowDrop = True
|
||||
ShowInTaskbar = False
|
||||
Opacity = OPACITY_HIDDEN
|
||||
SetFormLocation()
|
||||
Location = My.UIConfig.FlowForm.Location
|
||||
|
||||
' === Setup Event Handlers ===
|
||||
AddHandler KeyDown, AddressOf frmFlowForm_KeyDown
|
||||
AddHandler KeyUp, AddressOf frmFlowForm_KeyDown
|
||||
|
||||
@@ -33,6 +76,7 @@ Public Class frmFlowForm
|
||||
AddHandler oControl.MouseLeave, AddressOf frmFlowForm_MouseLeave
|
||||
Next
|
||||
|
||||
' TODO: Clean up
|
||||
Dim oSQL = $"SELECT * FROM [dbo].[FNIDB_GET_SEARCH_PROFILES] ({My.Application.User.UserId},'{My.Application.User.Language}')"
|
||||
Dim oDatatable As DataTable = My.Database_IDB.GetDatatable(oSQL)
|
||||
PictureBoxSearch.Visible = False
|
||||
@@ -46,8 +90,9 @@ Public Class frmFlowForm
|
||||
My.DTAttributes = My.Database_IDB.GetDatatable("SELECT * FROM TBIDB_ATTRIBUTE")
|
||||
End Sub
|
||||
|
||||
Public Sub SetFormLocation()
|
||||
Location = My.UIConfig.FlowForm.Location
|
||||
|
||||
Private Sub TimerRefreshData_Tick(sender As Object, e As EventArgs)
|
||||
'TODO: Refresh Data
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_MouseLeave(sender As Object, e As EventArgs) Handles Me.MouseLeave
|
||||
@@ -68,7 +113,7 @@ Public Class frmFlowForm
|
||||
Private Sub frmFlowForm_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
|
||||
If e.KeyCode = Keys.Escape Then
|
||||
If ESCHitCount > 0 Then
|
||||
ExitZooflow
|
||||
ExitZooflow()
|
||||
Else
|
||||
ESCHitCount += 1
|
||||
End If
|
||||
@@ -78,6 +123,7 @@ Public Class frmFlowForm
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub ExitZooflow()
|
||||
Dim oResult As DialogResult = MessageBox.Show("Exit Zooflow", "Please Varify", MessageBoxButtons.YesNo)
|
||||
If oResult = DialogResult.Yes Then
|
||||
@@ -91,11 +137,16 @@ Public Class frmFlowForm
|
||||
ESCHitCount = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub OnEvent(Params As Object)
|
||||
Logger.Debug("OnEvent called!")
|
||||
End Sub
|
||||
|
||||
Private Sub PictureBoxSearch_Click(sender As Object, e As EventArgs) Handles PictureBoxSearch.Click
|
||||
Dim oForm As New frmSearchStart(DTIDB_SEARCHES)
|
||||
oForm.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub PictureBoxSearch_MouseEnter(sender As Object, e As EventArgs) Handles PictureBoxSearch.MouseEnter
|
||||
PictureBoxSearch.Image = My.Resources._2_LUPE_AKTIV_ZOO
|
||||
End Sub
|
||||
@@ -118,15 +169,12 @@ Public Class frmFlowForm
|
||||
Private Sub ZooFlowBeendenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ZooFlowBeendenToolStripMenuItem.Click
|
||||
ExitZooflow()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub AlleAnzeigenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AlleAnzeigenToolStripMenuItem.Click
|
||||
For Each oControl As Control In Me.Controls
|
||||
oControl.Visible = True
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub VerwaltungToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles VerwaltungToolStripMenuItem.Click
|
||||
frmAdmin.Show()
|
||||
frmAdministrationZooFlow.Show()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user