Add Animator to Clipboard Watcher
This commit is contained in:
parent
da0e4ed240
commit
d546f92c50
@ -113,7 +113,8 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\DDMonorepo\Modules.Patterns\bin\Debug\DigitalData.Modules.Patterns.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Windows">
|
||||
<Reference Include="DigitalData.Modules.Windows, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\DDMonorepo\Windows\bin\Debug\DigitalData.Modules.Windows.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.ZooFlow">
|
||||
|
||||
367
app/DD_Clipboard_Searcher/frmAdministration.Designer.vb
generated
367
app/DD_Clipboard_Searcher/frmAdministration.Designer.vb
generated
File diff suppressed because it is too large
Load Diff
@ -4,13 +4,20 @@ Imports System.Globalization
|
||||
Imports DD_Clipboard_Watcher.ClassConstants
|
||||
Imports DD_Clipboard_Watcher.ClassWindowAPI
|
||||
Imports DigitalData.Modules.ZooFlow
|
||||
Imports DigitalData.Modules.Windows
|
||||
Imports DigitalData.GUIs.ClipboardWatcher
|
||||
Public Class frmMain
|
||||
Private WithEvents Hotkey As New ClassHotkey(Me)
|
||||
'Private WithEvents _Watcher As ClipboardWatcher = ClipboardWatcher.Singleton
|
||||
Private WithEvents _Watcher2 As ClassClipboardWatcher = ClassClipboardWatcher.Singleton
|
||||
Private WithEvents _Hotkey As New ClassHotkey(Me)
|
||||
Private WithEvents _Watcher As ClassClipboardWatcher = ClassClipboardWatcher.Singleton
|
||||
|
||||
Private _Animator As New Animator() With {
|
||||
.PopupColor = Color.FromArgb(255, 214, 49),
|
||||
.PopupOpacity = 0.8,
|
||||
.PopupSize = New Size(100, 30)
|
||||
}
|
||||
Private _MatchForm As frmMatch = Nothing
|
||||
Private _DataASorDB As ClassDataASorDB
|
||||
|
||||
Public Sub New()
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
@ -54,16 +61,16 @@ Public Class frmMain
|
||||
ClassInit.Refresh_Profile_Links()
|
||||
_DataASorDB.Refresh_Connections()
|
||||
Try
|
||||
Hotkey.AddHotKey(Keys.T, ClassHotkey.ModfierKey.MOD_CONTROL, HOTKEY_TOGGLE_WATCHER)
|
||||
_Hotkey.AddHotKey(Keys.T, ClassHotkey.ModfierKey.MOD_CONTROL, HOTKEY_TOGGLE_WATCHER)
|
||||
Dim oKeyCode As Keys
|
||||
Dim oConverter As New KeysConverter
|
||||
Dim oObject As Object = oConverter.ConvertFromString(HotkeySearchKey.ToUpper)
|
||||
oKeyCode = CType(oObject, Keys)
|
||||
|
||||
If HotkeyFunctionKey = HOTKEY_CTRL Then
|
||||
Hotkey.AddHotKey(oKeyCode, ClassHotkey.ModfierKey.MOD_CONTROL, ClassConstants.HOTKEY_TRIGGER_WATCHER)
|
||||
_Hotkey.AddHotKey(oKeyCode, ClassHotkey.ModfierKey.MOD_CONTROL, ClassConstants.HOTKEY_TRIGGER_WATCHER)
|
||||
ElseIf HotkeyFunctionKey = HOTKEY_SHIFT Then
|
||||
Hotkey.AddHotKey(oKeyCode, ClassHotkey.ModfierKey.MOD_SHIFT, ClassConstants.HOTKEY_TRIGGER_WATCHER)
|
||||
_Hotkey.AddHotKey(oKeyCode, ClassHotkey.ModfierKey.MOD_SHIFT, ClassConstants.HOTKEY_TRIGGER_WATCHER)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Warn($"Unexpected Error in Hotkey inititialize: {ex.Message}")
|
||||
@ -114,8 +121,8 @@ Public Class frmMain
|
||||
|
||||
End Try
|
||||
Try
|
||||
Hotkey.RemoveHotKey(HOTKEY_TOGGLE_WATCHER)
|
||||
Hotkey.RemoveHotKey(HOTKEY_TRIGGER_WATCHER)
|
||||
_Hotkey.RemoveHotKey(HOTKEY_TOGGLE_WATCHER)
|
||||
_Hotkey.RemoveHotKey(HOTKEY_TRIGGER_WATCHER)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Warn("Hotkeys could not be removed")
|
||||
@ -124,7 +131,7 @@ Public Class frmMain
|
||||
'TempDateien löschen
|
||||
For Each oFile In TEMP_FILES
|
||||
Try
|
||||
File.Delete(oFile)
|
||||
IO.File.Delete(oFile)
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Temp file {0} could not be deleted", oFile)
|
||||
Logger.Error(ex)
|
||||
@ -133,10 +140,10 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub frmClipboardWatch_Disposed(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Disposed
|
||||
_Watcher2.Dispose()
|
||||
_Watcher.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub WatcherChanged_New(ByVal sender As Object, ByVal e As String) Handles _Watcher2.Changed
|
||||
Private Sub WatcherChanged_New(ByVal sender As Object, ByVal e As String) Handles _Watcher.Changed
|
||||
If MONITORING_ACTIVE = False Then
|
||||
Logger.Info("Clipboard Watcher is inactive!")
|
||||
'NotifyIconMain.ShowBalloonTip(20000, "Clipboard Watcher", "Clipboard-watcher is inactive.", ToolTipIcon.Info)
|
||||
@ -218,8 +225,10 @@ Public Class frmMain
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ReceiveHotKey(ByVal HotKeyID As String) Handles Hotkey.HotKeyPressed
|
||||
Private Sub ReceiveHotKey(ByVal HotKeyID As String) Handles _Hotkey.HotKeyPressed
|
||||
If HotKeyID = HOTKEY_TRIGGER_WATCHER Then
|
||||
_Animator.Highlight(Cursor.Position)
|
||||
|
||||
If CURRENT_CLIPBOARD_CONTENTS IsNot Nothing Then
|
||||
If MONITORING_ACTIVE = True Then
|
||||
If CURRENT_MATCHING_PROFILES.Count = 0 Then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user