ZooFlow: merge and fix key events
This commit is contained in:
@@ -11,6 +11,9 @@ Public Class frmFlowForm
|
||||
Private ESCHitCount As Integer = 0
|
||||
Private CurrentState As OnFlowFormStateChangedEvent.FlowFormState = OnFlowFormStateChangedEvent.FlowFormState.Default
|
||||
|
||||
Private DTIDB_SEARCHES As DataTable
|
||||
Private IDBSearchActive As Boolean = False
|
||||
|
||||
Const WS_EX_LAYERED As Int32 = &H80000
|
||||
|
||||
Public Event ClipboardChanged As EventHandler(Of IDataObject)
|
||||
@@ -43,8 +46,28 @@ Public Class frmFlowForm
|
||||
SetFormLocation()
|
||||
SetFormState(OnFlowFormStateChangedEvent.FlowFormState.Default)
|
||||
|
||||
' === Register Events ===
|
||||
|
||||
AddHandler MouseClick, AddressOf Form_MouseClick
|
||||
AddHandler MouseMove, AddressOf Form_MouseMove
|
||||
AddHandler KeyDown, AddressOf Form_KeyDown
|
||||
|
||||
' === Register As Event Listener ===
|
||||
EventBus.Instance.Register(Me)
|
||||
|
||||
' === TESTING Actions ===
|
||||
Dim oSQL = $"SELECT * FROM [dbo].[FNIDB_GET_SEARCH_PROFILES] ({My.Application.User.UserId},'{My.Application.User.Language}')"
|
||||
Dim oDT As DataTable = My.Database_IDB.GetDatatable(oSQL)
|
||||
SucheToolStripMenuItem.Visible = False
|
||||
If Not IsNothing(oDT) Then
|
||||
If oDT.Rows.Count > 0 Then
|
||||
IDBSearchActive = True
|
||||
DTIDB_SEARCHES = oDT
|
||||
SucheToolStripMenuItem.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_Closed(sender As Object, e As EventArgs) Handles Me.Closed
|
||||
@@ -55,7 +78,7 @@ Public Class frmFlowForm
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub Form_MouseClick(sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseClick
|
||||
Private Sub Form_MouseClick(sender As Object, ByVal e As MouseEventArgs)
|
||||
If e.Button = MouseButtons.Right Then
|
||||
ContextMenuStrip1.Show(Cursor.Position)
|
||||
Else
|
||||
@@ -67,14 +90,14 @@ Public Class frmFlowForm
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseMove
|
||||
Private Sub Form_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)
|
||||
If e.Button = MouseButtons.Left Then
|
||||
ClassWin32.ReleaseCapture()
|
||||
ClassWin32.SendMessage(Handle, ClassWin32.WM_NCLBUTTONDOWN, ClassWin32.HTCAPTION, 0)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles Me.KeyDown
|
||||
Private Sub Form_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
|
||||
If e.KeyCode = Keys.Escape Then
|
||||
If ESCHitCount > 0 Then
|
||||
Dim result As DialogResult = MessageBox.Show("Exit Zooflow", "Please Varify", MessageBoxButtons.YesNo)
|
||||
@@ -212,4 +235,15 @@ Public Class frmFlowForm
|
||||
Private Sub FlowFormTest1ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles FlowFormTest1ToolStripMenuItem.Click
|
||||
frmFlowForm_Test1.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub ContextMenuStrip1_Opening(sender As Object, e As CancelEventArgs) Handles ContextMenuStrip1.Opening
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SucheToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SucheToolStripMenuItem.Click
|
||||
Dim oForm As New frmSearchStart(DTIDB_SEARCHES)
|
||||
oForm.Show()
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user