MS IDB Anbindung RightClick und Events
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
Imports DigitalData.Modules.Messaging
|
||||
Imports System.ComponentModel
|
||||
Imports DigitalData.Modules.Messaging
|
||||
|
||||
Public Class frmFlowForm
|
||||
Private WithEvents Watcher As ClassClipboardWatcher = ClassClipboardWatcher.Singleton
|
||||
Private ActiveModules As List(Of String)
|
||||
|
||||
Private ESCHitCount As Integer = 0
|
||||
Private CurrentState As OnFlowFormStateChangedEvent.FlowFormState = OnFlowFormStateChangedEvent.FlowFormState.Default
|
||||
|
||||
Public Event ClipboardChanged As EventHandler(Of IDataObject)
|
||||
@@ -27,20 +28,31 @@ Public Class frmFlowForm
|
||||
|
||||
AddHandler MouseClick, New MouseEventHandler(AddressOf Form_MouseClick)
|
||||
AddHandler MouseMove, New MouseEventHandler(AddressOf Form_MouseMove)
|
||||
AddHandler KeyUp, New KeyEventHandler(AddressOf Form_KeyUp)
|
||||
|
||||
' === Register As Event Listener ===
|
||||
EventBus.Instance.Register(Me)
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_Closed(sender As Object, e As EventArgs) Handles Me.Closed
|
||||
EventBus.Instance.Unregister(Me)
|
||||
Try
|
||||
EventBus.Instance.Unregister(Me)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_MouseClick(sender As Object, e As EventArgs)
|
||||
If CurrentState = OnFlowFormStateChangedEvent.FlowFormState.HasSearchResults Then
|
||||
SetFlowFormState(OnFlowFormStateChangedEvent.FlowFormState.Default)
|
||||
EventBus.Instance.PostEvent(New OnFlowFormInteractionEvent(OnFlowFormInteractionEvent.FlowFormInteraction.Click))
|
||||
Private Sub Form_MouseClick(sender As Object, ByVal e As MouseEventArgs)
|
||||
If e.Button = MouseButtons.Right Then
|
||||
MsgBox("RightMouseClick", MsgBoxStyle.OkOnly)
|
||||
Else
|
||||
If CurrentState = OnFlowFormStateChangedEvent.FlowFormState.HasSearchResults Then
|
||||
SetFlowFormState(OnFlowFormStateChangedEvent.FlowFormState.Default)
|
||||
EventBus.Instance.PostEvent(New OnFlowFormInteractionEvent(OnFlowFormInteractionEvent.FlowFormInteraction.Click))
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)
|
||||
@@ -49,6 +61,23 @@ Public Class frmFlowForm
|
||||
Win32.SendMessage(Handle, Win32.WM_NCLBUTTONDOWN, Win32.HTCAPTION, 0)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub Form_KeyUp(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)
|
||||
If result = DialogResult.Yes Then
|
||||
Application.Exit()
|
||||
End If
|
||||
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
|
||||
|
||||
Public Sub OnEvent(e As OnFlowFormStateChangedEvent)
|
||||
CurrentState = e.State
|
||||
@@ -99,6 +128,10 @@ Public Class frmFlowForm
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
||||
|
||||
End Sub
|
||||
|
||||
'''' <summary>
|
||||
'''' DragDrop Support
|
||||
'''' </summary>
|
||||
|
||||
Reference in New Issue
Block a user