diff --git a/DDMonorepo.sln b/DDMonorepo.sln index b98fc8fa..7841b9e0 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -90,6 +90,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Windows", "Windows\Windows. EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ZooFlow", "Modules\ZooFlow\ZooFlow.vbproj", "{81CAC44F-3711-4C8F-AE98-E02A7448782A}" EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Automation", "Automation\Automation.vbproj", "{483A3DA7-6F7A-4E57-B77F-ED33F4E280C5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -224,6 +226,10 @@ Global {81CAC44F-3711-4C8F-AE98-E02A7448782A}.Debug|Any CPU.Build.0 = Debug|Any CPU {81CAC44F-3711-4C8F-AE98-E02A7448782A}.Release|Any CPU.ActiveCfg = Release|Any CPU {81CAC44F-3711-4C8F-AE98-E02A7448782A}.Release|Any CPU.Build.0 = Release|Any CPU + {483A3DA7-6F7A-4E57-B77F-ED33F4E280C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {483A3DA7-6F7A-4E57-B77F-ED33F4E280C5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {483A3DA7-6F7A-4E57-B77F-ED33F4E280C5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {483A3DA7-6F7A-4E57-B77F-ED33F4E280C5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -261,6 +267,7 @@ Global {1FBA063D-60A5-4FC8-A529-A3D1ECFD640C} = {EB026AEE-C702-47C6-82F5-956D5C8E26C2} {5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {81CAC44F-3711-4C8F-AE98-E02A7448782A} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} + {483A3DA7-6F7A-4E57-B77F-ED33F4E280C5} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286} diff --git a/ZooFlow/ClassFlowForm.vb b/ZooFlow/ClassFlowForm.vb index c294eac0..8088b924 100644 --- a/ZooFlow/ClassFlowForm.vb +++ b/ZooFlow/ClassFlowForm.vb @@ -104,8 +104,10 @@ Public Class ClassFlowForm End If End Sub - Private Sub Form_click(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Click - MsgBox("LOL") + Private Sub Form_click(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseClick + If e.Button = MouseButtons.Left Then + MsgBox("LOL") + End If End Sub Public Sub SetBitmap(ByVal bitmap As Bitmap) diff --git a/ZooFlow/ClassInit.vb b/ZooFlow/ClassInit.vb index 67152402..c105cdd0 100644 --- a/ZooFlow/ClassInit.vb +++ b/ZooFlow/ClassInit.vb @@ -4,9 +4,8 @@ Imports DigitalData.Modules.Database Imports DigitalData.Modules.Filesystem Imports DigitalData.Modules.Language.Utils Imports DigitalData.Modules.Logging -Imports ZooFlow.ClassInitLoader -Imports ZooFlow.ClassConstants -Imports ZooFlow.State +Imports DigitalData.GUIs.ZooFlow.ClassInitLoader +Imports DigitalData.GUIs.ZooFlow.ClassConstants Public Class ClassInit Private _MainForm As frmMain diff --git a/ZooFlow/My Project/Application.Designer.vb b/ZooFlow/My Project/Application.Designer.vb index b37a88cb..c6a0806c 100644 --- a/ZooFlow/My Project/Application.Designer.vb +++ b/ZooFlow/My Project/Application.Designer.vb @@ -1,10 +1,10 @@ '------------------------------------------------------------------------------ ' -' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 ' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. ' '------------------------------------------------------------------------------ @@ -13,15 +13,15 @@ Option Explicit On Namespace My - - 'NOTE: This file is auto-generated; do not modify it directly. To make changes, - ' or if you encounter build errors in this file, go to the Project Designer - ' (go to Project Properties or double-click the My Project node in - ' Solution Explorer), and make changes on the Application tab. + + 'HINWEIS: Diese Datei wird automatisch generiert und darf nicht direkt bearbeitet werden. Wenn Sie Änderungen vornehmen möchten + ' oder in dieser Datei Buildfehler auftreten, wechseln Sie zum Projekt-Designer. + ' (Wechseln Sie dazu zu den Projekteigenschaften, oder doppelklicken Sie auf den Knoten "Mein Projekt" im + ' Projektmappen-Explorer). Nehmen Sie auf der Registerkarte "Anwendung" entsprechende Änderungen vor. ' Partial Friend Class MyApplication - - _ + + _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false @@ -29,10 +29,10 @@ Namespace My Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub - - _ + + _ Protected Overrides Sub OnCreateMainForm() - Me.MainForm = Global.ZooFlow.frmMain + Me.MainForm = Global.DigitalData.GUIs.ZooFlow.frmMain End Sub End Class End Namespace diff --git a/ZooFlow/My Project/DataSources/ZooFlow.State.ClassUserState.datasource b/ZooFlow/My Project/DataSources/ZooFlow.State.ClassUserState.datasource index 61748e7a..b0c5d49f 100644 --- a/ZooFlow/My Project/DataSources/ZooFlow.State.ClassUserState.datasource +++ b/ZooFlow/My Project/DataSources/ZooFlow.State.ClassUserState.datasource @@ -6,5 +6,5 @@ cause the file to be unrecognizable by the program. --> - ZooFlow.State.ClassUserState, ZooFlow, Version=0.0.1.0, Culture=neutral, PublicKeyToken=null + DigitalData.GUIs.ZooFlow.State.ClassUserState, DigitalData.GUIs.ZooFlow, Version=0.0.1.0, Culture=neutral, PublicKeyToken=null \ No newline at end of file diff --git a/ZooFlow/My Project/Resources.Designer.vb b/ZooFlow/My Project/Resources.Designer.vb index a42ec63e..5f3c52d9 100644 --- a/ZooFlow/My Project/Resources.Designer.vb +++ b/ZooFlow/My Project/Resources.Designer.vb @@ -39,7 +39,7 @@ Namespace My.Resources Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("ZooFlow.Resources", GetType(Resources).Assembly) + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.GUIs.ZooFlow.Resources", GetType(Resources).Assembly) resourceMan = temp End If Return resourceMan diff --git a/ZooFlow/My Project/Settings.Designer.vb b/ZooFlow/My Project/Settings.Designer.vb index 280a1db6..424beaf9 100644 --- a/ZooFlow/My Project/Settings.Designer.vb +++ b/ZooFlow/My Project/Settings.Designer.vb @@ -1,26 +1,71 @@ '------------------------------------------------------------------------------ ' -' This code was generated by a tool. -' Runtime Version:4.0.30319.18047 +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 ' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. ' '------------------------------------------------------------------------------ +Option Strict On +Option Explicit On + + + + _ +Partial Friend NotInheritable Class Settings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()),Settings) + +#Region "Automatische My.Settings-Speicherfunktion" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As Settings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property +End Class + Namespace My - - - - Friend NotInheritable Partial Class Settings - Inherits System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As Settings = (CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()), Settings)) - - Public Shared ReadOnly Property [Default]() As Settings + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.DigitalData.GUIs.ZooFlow.Settings Get - Return defaultInstance + Return Global.DigitalData.GUIs.ZooFlow.Settings.Default End Get End Property - End Class + End Module End Namespace diff --git a/ZooFlow/ZooFlow.vbproj b/ZooFlow/ZooFlow.vbproj index f8628b45..be5a3b1e 100644 --- a/ZooFlow/ZooFlow.vbproj +++ b/ZooFlow/ZooFlow.vbproj @@ -7,8 +7,8 @@ 2.0 {D0FB36EB-783D-40E1-B71E-A0B84B2FE567} WinExe - ZooFlow - ZooFlow + DigitalData.GUIs.ZooFlow + DigitalData.GUIs.ZooFlow v4.6.1 ZooFlow.Program 512 @@ -40,7 +40,7 @@ WindowsForms - ZooFlow.My.MyApplication + DigitalData.GUIs.ZooFlow.My.MyApplication diff --git a/ZooFlow/frmMain.Designer.vb b/ZooFlow/frmMain.Designer.vb index 795f9cdc..3630102d 100644 --- a/ZooFlow/frmMain.Designer.vb +++ b/ZooFlow/frmMain.Designer.vb @@ -25,7 +25,7 @@ ''' Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim SplashScreenManager As DevExpress.XtraSplashScreen.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.ZooFlow.frmSplash), True, True) + Dim SplashScreenManager As DevExpress.XtraSplashScreen.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.DigitalData.GUIs.ZooFlow.frmSplash), True, True) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMain)) Me.ribbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() Me.ApplicationMenu = New DevExpress.XtraBars.Ribbon.ApplicationMenu(Me.components) diff --git a/ZooFlow/frmMain.vb b/ZooFlow/frmMain.vb index 2ab090a4..b9e356f7 100644 --- a/ZooFlow/frmMain.vb +++ b/ZooFlow/frmMain.vb @@ -1,12 +1,13 @@ -Imports DevExpress.XtraSplashScreen +Imports System.Threading.Tasks +Imports DevExpress.LookAndFeel +Imports DevExpress.XtraSplashScreen Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Windows Imports DigitalData.Modules.ZooFlow -Imports DevExpress.LookAndFeel -Imports DigitalData.Products.ClipboardWatcher -Imports DigitalData.Modules.ZooFlow.Params -Imports System.Threading.Tasks Imports DigitalData.Modules.Messaging +Imports DigitalData.Modules.ZooFlow.Params +Imports DigitalData.Products.ClipboardWatcher +Imports DigitalData.GUIs.ZooFlow.OnFlowFormStateChangedEvent.FlowFormState Partial Public Class frmMain Private WithEvents FlowForm As frmFlowForm @@ -87,7 +88,7 @@ Partial Public Class frmMain Dim oMatchingProfiles As List(Of ProfileData) Dim oWindow As New Window(My.LogConfig) Dim oWindowInfo = oWindow.GetWindowInfo() - Dim oFocusedControl As IntPtr = oWindow.FocusedControlinActiveWindow(Handle) + Dim oFocusedControl As Window.WindowInfo = oWindow.GetFocusedControl(Handle) Dim oClipboardContents As String = Clipboard.GetText() Try @@ -105,7 +106,7 @@ Partial Public Class frmMain Logger.Debug("Profiles after FilterProfilesByProcess: {0}", oMatchingProfiles.Count) oMatchingProfiles = oProfileFilter.FilterWindowsByWindowTitleRegex(oMatchingProfiles, oWindowInfo.WindowTitle) Logger.Debug("Profiles after FilterWindowsByWindowTitleRegex: {0}", oMatchingProfiles.Count) - oMatchingProfiles = oProfileFilter.FilterProfilesByFocusedControl(oMatchingProfiles, oClipboardContents, oFocusedControl.ToString) + oMatchingProfiles = oProfileFilter.FilterProfilesByFocusedControl(oMatchingProfiles, oClipboardContents, oFocusedControl.hWnd.ToString) Logger.Debug("Profiles after FilterProfilesByFocusedControl: {0}", oMatchingProfiles.Count) oMatchingProfiles = Await Task.Run(Function() oProfileFilter.FilterProfilesBySearchResults(oMatchingProfiles)) Logger.Debug("Profiles after FilterProfilesBySearchResults: {0}", oMatchingProfiles.Count) @@ -125,7 +126,7 @@ Partial Public Class frmMain MatchingProfiles = oMatchingProfiles - EventBus.Instance.PostEvent(New OnFlowFormStateChangedEvent(OnFlowFormStateChangedEvent.FlowFormState.HasSearchResults)) + EventBus.Instance.PostEvent(New OnFlowFormStateChangedEvent(HasSearchResults)) End Sub #Region "Notify Icon Menu"