150 lines
6.3 KiB
VB.net
150 lines
6.3 KiB
VB.net
Imports DigitalData.Modules.Logging
|
|
|
|
Public Class frmFlowForm
|
|
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 DTIDB_SEARCHES As DataTable
|
|
Private IDBSearchActive As Boolean = False
|
|
|
|
Public Event ClipboardChanged As EventHandler(Of IDataObject)
|
|
|
|
Private Sub frmFlowForm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
' === Initialize Logger ===
|
|
Logger = My.LogConfig.GetLogger()
|
|
|
|
' === Set Form Properties ===
|
|
TopMost = True
|
|
AllowDrop = True
|
|
ShowInTaskbar = False
|
|
Opacity = OPACITY_HIDDEN
|
|
SetFormLocation()
|
|
|
|
AddHandler KeyDown, AddressOf frmFlowForm_KeyDown
|
|
AddHandler KeyUp, AddressOf frmFlowForm_KeyDown
|
|
|
|
For Each oControl As Control In Controls
|
|
AddHandler oControl.MouseEnter, AddressOf frmFlowForm_MouseEnter
|
|
AddHandler oControl.MouseLeave, AddressOf frmFlowForm_MouseLeave
|
|
Next
|
|
|
|
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
|
|
|
|
If Not IsNothing(oDatatable) OrElse oDatatable.Rows.Count > 0 Then
|
|
IDBSearchActive = True
|
|
DTIDB_SEARCHES = oDatatable
|
|
PictureBoxSearch.Visible = True
|
|
End If
|
|
|
|
My.DTAttributes = My.Database_IDB.GetDatatable("SELECT * FROM TBIDB_ATTRIBUTE")
|
|
End Sub
|
|
|
|
Public Sub SetFormLocation()
|
|
Location = My.UIConfig.FlowForm.Location
|
|
End Sub
|
|
|
|
Private Sub frmFlowForm_MouseLeave(sender As Object, e As EventArgs) Handles Me.MouseLeave
|
|
Opacity = OPACITY_HIDDEN
|
|
End Sub
|
|
|
|
Private Sub frmFlowForm_MouseEnter(sender As Object, e As EventArgs) Handles Me.MouseEnter
|
|
Opacity = OPACITY_SHOWN
|
|
End Sub
|
|
|
|
Private Sub frmFlowForm_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseMove
|
|
If e.Button = MouseButtons.Left Then
|
|
ClassWin32.ReleaseCapture()
|
|
ClassWin32.SendMessage(Handle, ClassWin32.WM_NCLBUTTONDOWN, ClassWin32.HTCAPTION, 0)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub frmFlowForm_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
|
|
If e.KeyCode = Keys.Escape Then
|
|
If ESCHitCount > 0 Then
|
|
ExitZooflow
|
|
Else
|
|
ESCHitCount += 1
|
|
End If
|
|
ElseIf e.KeyCode = Keys.D AndAlso (e.Control) Then
|
|
If ActiveModules.Contains(ClassConstants.MODULE_ZOOFLOW) Then
|
|
MsgBox("Search")
|
|
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
|
|
' Save Settings
|
|
My.UIConfig.FlowForm.Location = Location
|
|
My.UIConfigManager.Save()
|
|
|
|
' Exit
|
|
Application.Exit()
|
|
Else
|
|
ESCHitCount = 0
|
|
End If
|
|
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._1_ZOO_FLOW_Suche_MouseOver
|
|
End Sub
|
|
Private Sub PictureBoxSearch_MouseLeave(sender As Object, e As EventArgs) Handles PictureBoxSearch.MouseLeave
|
|
PictureBoxSearch.Image = My.Resources._1_ZOO_FLOW_Suche
|
|
End Sub
|
|
Private Sub PictureBoxPM_MouseEnter(sender As Object, e As EventArgs) Handles PictureBoxPM.MouseEnter
|
|
PictureBoxPM.Image = My.Resources._1_ZOO_FLOW_User_MouseOver_
|
|
End Sub
|
|
Private Sub PictureBoxPM_MouseLeave(sender As Object, e As EventArgs) Handles PictureBoxPM.MouseLeave
|
|
PictureBoxPM.Image = My.Resources._1_ZOO_FLOW_User
|
|
End Sub
|
|
|
|
Private Sub PictureBoxCWFound_MouseEnter(sender As Object, e As EventArgs) Handles PictureBoxCWFound.MouseEnter
|
|
PictureBoxCWFound.Image = My.Resources._2_ZOO_FLOW_CW_MouseOver
|
|
Opacity = OPACITY_SHOWN
|
|
End Sub
|
|
|
|
Private Sub PictureBoxCWFound_MouseLeave(sender As Object, e As EventArgs) Handles PictureBoxCWFound.MouseLeave
|
|
PictureBoxCWFound.Image = My.Resources._2_ZOO_FLOW_CW
|
|
End Sub
|
|
Private Sub PictureBoxSearchAbo_MouseEnter(sender As Object, e As EventArgs) Handles PictureBoxSearchAbo.MouseEnter
|
|
PictureBoxSearchAbo.Image = My.Resources._2_ZOO_FLOW_Abo_MouseOver
|
|
End Sub
|
|
Private Sub PictureBoxPMTask_MouseEnter(sender As Object, e As EventArgs) Handles PictureBoxPMTask.MouseEnter
|
|
PictureBoxPMTask.Image = My.Resources._2_ZOO_FLOW_PM_MouseOver
|
|
End Sub
|
|
Private Sub PictureBoxConversation_MouseEnter(sender As Object, e As EventArgs) Handles PictureBoxConversation.MouseEnter
|
|
PictureBoxConversation.Image = My.Resources._2_ZOO_FLOW_Converations_MouseOver
|
|
End Sub
|
|
Private Sub PictureBoxGlobix_MouseEnter(sender As Object, e As EventArgs) Handles PictureBoxGlobix.MouseEnter
|
|
PictureBoxGlobix.Image = My.Resources._1_ZOO_FLOW_GLOBIX_MouseOver
|
|
End Sub
|
|
Private Sub PictureBoxGlobix_MouseLeave(sender As Object, e As EventArgs) Handles PictureBoxGlobix.MouseLeave
|
|
PictureBoxGlobix.Image = My.Resources._1_ZOO_FLOW_GLOBIX
|
|
End Sub
|
|
Private Sub ZooFlowBeendenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ZooFlowBeendenToolStripMenuItem.Click
|
|
ExitZooflow()
|
|
End Sub
|
|
|
|
Private Sub PictureBoxSearchAbo_MouseLeave(sender As Object, e As EventArgs) Handles PictureBoxSearchAbo.MouseLeave
|
|
PictureBoxSearchAbo.Image = My.Resources._2_ZOO_FLOW_Abo
|
|
End Sub
|
|
|
|
Private Sub PictureBoxConversation_MouseLeave(sender As Object, e As EventArgs) Handles PictureBoxConversation.MouseLeave
|
|
PictureBoxConversation.Image = My.Resources._2_ZOO_FLOW_Conversations
|
|
End Sub
|
|
|
|
Private Sub PictureBoxPMTask_MouseLeave(sender As Object, e As EventArgs) Handles PictureBoxPMTask.MouseLeave
|
|
PictureBoxPMTask.Image = My.Resources._2_ZOO_FLOW_PM
|
|
End Sub
|
|
End Class |