monster commit for zoo flow, prepare migration of cw
This commit is contained in:
parent
13da64c6ad
commit
6b955569f6
@ -49,7 +49,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -86,6 +86,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Products", "Products", "{EB
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ClipboardWatcher", "Products.ClipboardWatcher\ClipboardWatcher.vbproj", "{1FBA063D-60A5-4FC8-A529-A3D1ECFD640C}"
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ClipboardWatcher", "Products.ClipboardWatcher\ClipboardWatcher.vbproj", "{1FBA063D-60A5-4FC8-A529-A3D1ECFD640C}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Windows", "Windows\Windows.vbproj", "{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}"
|
||||||
|
EndProject
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ZooFlow", "Modules\ZooFlow\ZooFlow.vbproj", "{81CAC44F-3711-4C8F-AE98-E02A7448782A}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -212,6 +216,14 @@ Global
|
|||||||
{1FBA063D-60A5-4FC8-A529-A3D1ECFD640C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1FBA063D-60A5-4FC8-A529-A3D1ECFD640C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{1FBA063D-60A5-4FC8-A529-A3D1ECFD640C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{1FBA063D-60A5-4FC8-A529-A3D1ECFD640C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{1FBA063D-60A5-4FC8-A529-A3D1ECFD640C}.Release|Any CPU.Build.0 = Release|Any CPU
|
{1FBA063D-60A5-4FC8-A529-A3D1ECFD640C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{81CAC44F-3711-4C8F-AE98-E02A7448782A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{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
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@ -247,6 +259,8 @@ Global
|
|||||||
{BCC6942F-CD4B-4B67-8200-1C0D002E7CC2} = {F98C0329-C004-417F-B2AB-7466E88D8220}
|
{BCC6942F-CD4B-4B67-8200-1C0D002E7CC2} = {F98C0329-C004-417F-B2AB-7466E88D8220}
|
||||||
{D0FB36EB-783D-40E1-B71E-A0B84B2FE567} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB}
|
{D0FB36EB-783D-40E1-B71E-A0B84B2FE567} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB}
|
||||||
{1FBA063D-60A5-4FC8-A529-A3D1ECFD640C} = {EB026AEE-C702-47C6-82F5-956D5C8E26C2}
|
{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}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286}
|
SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286}
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="protobuf-net, Version=2.4.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
|
<Reference Include="protobuf-net, Version=2.4.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\protobuf-net.2.4.0\lib\net40\protobuf-net.dll</HintPath>
|
<HintPath>..\packages\protobuf-net.2.4.0\lib\net40\protobuf-net.dll</HintPath>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
<package id="protobuf-net" version="2.4.0" targetFramework="net461" />
|
<package id="protobuf-net" version="2.4.0" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -89,7 +89,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ScintillaNET, Version=3.6.3.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ScintillaNET, Version=3.6.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll</HintPath>
|
<HintPath>..\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll</HintPath>
|
||||||
|
|||||||
@ -3,6 +3,6 @@
|
|||||||
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
||||||
<package id="FirebirdSql.EntityFrameworkCore.Firebird" version="6.4.0" targetFramework="net461" />
|
<package id="FirebirdSql.EntityFrameworkCore.Firebird" version="6.4.0" targetFramework="net461" />
|
||||||
<package id="jacobslusser.ScintillaNET" version="3.6.3" targetFramework="net461" />
|
<package id="jacobslusser.ScintillaNET" version="3.6.3" targetFramework="net461" />
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net461" />
|
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -108,7 +108,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -51,7 +51,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="S22.Imap, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="S22.Imap, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\S22.Imap.3.6.0.0\lib\net40\S22.Imap.dll</HintPath>
|
<HintPath>..\packages\S22.Imap.3.6.0.0\lib\net40\S22.Imap.dll</HintPath>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
<package id="S22.Imap" version="3.6.0.0" targetFramework="net461" />
|
<package id="S22.Imap" version="3.6.0.0" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -59,7 +59,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Oracle.ManagedDataAccess">
|
<Reference Include="Oracle.ManagedDataAccess">
|
||||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
|
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
|
||||||
|
|||||||
@ -3,5 +3,5 @@
|
|||||||
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
|
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
|
||||||
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net461" />
|
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net461" />
|
||||||
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -65,7 +65,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
483
Modules/ZooFlow/ClassProfileFilter.vb
Normal file
483
Modules/ZooFlow/ClassProfileFilter.vb
Normal file
@ -0,0 +1,483 @@
|
|||||||
|
Imports System.Drawing
|
||||||
|
Imports System.Windows.Forms
|
||||||
|
Imports System.Text.RegularExpressions
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
Imports DigitalData.Modules.Windows
|
||||||
|
Imports DigitalData.Modules.Language.Utils
|
||||||
|
Imports DigitalData.Modules.ZooFlow.Params
|
||||||
|
|
||||||
|
Public Class ClassProfileFilter
|
||||||
|
Private _ProfileTable As DataTable
|
||||||
|
Private _ProcessTable As DataTable
|
||||||
|
Private _WindowTable As DataTable
|
||||||
|
Private _ControlTable As DataTable
|
||||||
|
Private _Profiles As List(Of ProfileData)
|
||||||
|
Private _Logger As Logger
|
||||||
|
Private _TreeView As TreeView
|
||||||
|
Private _Window As Window
|
||||||
|
|
||||||
|
Public ReadOnly Property Profiles As List(Of ProfileData)
|
||||||
|
Get
|
||||||
|
Return _Profiles
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub New(LogConfig As LogConfig, ProfileDatatable As DataTable, ProcessTable As DataTable, WindowDatatable As DataTable, ControlDatatable As DataTable, ImageList As ImageList)
|
||||||
|
Try
|
||||||
|
_Logger = LogConfig.GetLogger()
|
||||||
|
_ProfileTable = ProfileDatatable
|
||||||
|
_ProcessTable = ProcessTable
|
||||||
|
_WindowTable = WindowDatatable
|
||||||
|
_ControlTable = ControlDatatable
|
||||||
|
_Profiles = TransformProfiles()
|
||||||
|
_Window = New Window(LogConfig)
|
||||||
|
|
||||||
|
_TreeView.Nodes.Clear()
|
||||||
|
_TreeView.ImageList = ImageList
|
||||||
|
_TreeView.SelectedImageIndex = 0
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
Throw ex
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function ToList() As List(Of ProfileData)
|
||||||
|
Return _Profiles
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function FindNode(ByVal Node As TreeNode, SearchTerm As String)
|
||||||
|
Dim oNode As TreeNode
|
||||||
|
For Each oNode In Node.Nodes
|
||||||
|
If oNode.Text = SearchTerm Then
|
||||||
|
Return oNode
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return Node
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GetLowestNode(ByVal Node As TreeNode) As TreeNode
|
||||||
|
If Node.GetNodeCount(False) = 1 Then
|
||||||
|
Return GetLowestNode(Node.Nodes.Item(0))
|
||||||
|
Else
|
||||||
|
Return Node
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function FilterProfilesByClipboardRegex(Profiles As List(Of ProfileData), ClipboardContents As String) As List(Of ProfileData)
|
||||||
|
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||||
|
For Each oProfile In Profiles
|
||||||
|
_Logger.Debug("Current Profile: {0}", oProfile.Name)
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim oRegex As New Regex(oProfile.Regex)
|
||||||
|
Dim oMatch = oRegex.Match(ClipboardContents)
|
||||||
|
If oMatch.Success Then
|
||||||
|
_Logger.Debug("FilterProfilesByClipboardRegex: Clipboard Regex Matched: {0}", ClipboardContents)
|
||||||
|
'TODO: Add Debug Data
|
||||||
|
oFilteredProfiles.Add(oProfile)
|
||||||
|
oProfile.IsMatched = True
|
||||||
|
Dim oNode As New TreeNode($"Profile: {oProfile.Name}")
|
||||||
|
oNode.ImageIndex = 0
|
||||||
|
Dim f = New Font("Tahoma", 9, FontStyle.Bold)
|
||||||
|
oNode.NodeFont = f
|
||||||
|
_TreeView.Nodes.Add(oNode)
|
||||||
|
Dim oSubnode As New TreeNode($"MATCH on Global Clipboard Regex: {oProfile.Regex}")
|
||||||
|
oSubnode.ImageIndex = 1
|
||||||
|
oSubnode.Tag = oProfile.Name & "-REGEX"
|
||||||
|
oNode.Nodes.Add(oSubnode)
|
||||||
|
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", oProfile.Regex, ClipboardContents)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oFilteredProfiles
|
||||||
|
End Function
|
||||||
|
Public Function FilterProfilesByProcess(Profiles As List(Of ProfileData), CurrentProcessName As String) As List(Of ProfileData)
|
||||||
|
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||||
|
Try
|
||||||
|
For Each oProfile In Profiles
|
||||||
|
Dim oGuid = oProfile.Guid
|
||||||
|
|
||||||
|
If oProfile.IsMatched = False Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim oProcesses As New List(Of ProfileData.ProcessData)
|
||||||
|
For Each oProcessDef As ProfileData.ProcessData In oProfile.Processes
|
||||||
|
If oProcessDef.ProfileId <> oGuid Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
_Logger.Debug($"FilterProfilesByProcess: Checking Profile: {oProfile.Name} ...")
|
||||||
|
If oProcessDef.ProcessName.ToLower = CurrentProcessName.ToLower Then
|
||||||
|
_Logger.Debug($"Yes...Processname Matched: {oProcessDef.ProcessName}")
|
||||||
|
'oProfile.MATCH_PROCESSNAME = $"Processname Matched: {oProfile.ProcessName}"
|
||||||
|
'TODO: Add Debug Data
|
||||||
|
oFilteredProfiles.Add(oProfile)
|
||||||
|
oProfile.MatchedProcessID = oProcessDef.Guid
|
||||||
|
oProcessDef.IsMatched = True
|
||||||
|
oProcesses.Add(oProcessDef)
|
||||||
|
oProfile.IsMatched = True
|
||||||
|
oProfile.MatchedProcessID = oProcessDef.Guid
|
||||||
|
Dim oParentNode As TreeNode
|
||||||
|
Dim oExit = False
|
||||||
|
For Each oTreeNode As TreeNode In _TreeView.Nodes
|
||||||
|
For Each oNodes As TreeNode In oTreeNode.Nodes
|
||||||
|
If oExit = True Then Exit For
|
||||||
|
If oNodes.Tag = oProfile.Name & "-REGEX" Then
|
||||||
|
oParentNode = oNodes
|
||||||
|
oExit = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not IsNothing(oParentNode) Then
|
||||||
|
Dim oNode As New TreeNode($"MATCH on Process: {oProcessDef.ProcessName}")
|
||||||
|
oNode.ImageIndex = 4
|
||||||
|
oNode.Tag = oProfile.Name & "-PROCESS"
|
||||||
|
oParentNode.Nodes.Add(oNode)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If oFilteredProfiles.Count > 0 Then
|
||||||
|
oProfile.Processes = oProcesses
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oFilteredProfiles
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Unexpected error in FilterProfilesByProcess...")
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Public Function FilterWindowsByWindowTitleRegex(Profiles As List(Of ProfileData), WindowTitle As String) As List(Of ProfileData)
|
||||||
|
Dim oProfiles As New List(Of ProfileData)
|
||||||
|
|
||||||
|
For Each oProfile As ProfileData In Profiles
|
||||||
|
_Logger.Debug("Checking WindowDefinition for profile: {0}...", oProfile.Name)
|
||||||
|
If oProfile.IsMatched = False Then Continue For
|
||||||
|
Dim oWindows As New List(Of ProfileData.WindowData)
|
||||||
|
|
||||||
|
For Each oWindowDef As ProfileData.WindowData In oProfile.Windows
|
||||||
|
If oWindowDef.WindowProcessID <> oProfile.MatchedProcessID Then Continue For
|
||||||
|
Try
|
||||||
|
If oWindowDef.Regex = String.Empty Then
|
||||||
|
oProfile.MatchedWindowID = oWindowDef.Guid
|
||||||
|
oWindowDef.IsMatched = True
|
||||||
|
oWindows.Add(oWindowDef)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oRegex As New Regex(oWindowDef.Regex)
|
||||||
|
Dim oMatch = oRegex.Match(WindowTitle)
|
||||||
|
|
||||||
|
If oMatch.Success Then
|
||||||
|
_Logger.Debug("MATCH on WindowTitle: {0}", WindowTitle)
|
||||||
|
'TODO: Add Debug Data
|
||||||
|
oProfile.MatchedWindowID = oWindowDef.Guid
|
||||||
|
oWindowDef.IsMatched = True
|
||||||
|
oWindows.Add(oWindowDef)
|
||||||
|
Dim olowestNode As TreeNode = Node_Get_Lowest_Node(oProfile.Name & "-REGEX")
|
||||||
|
If Not IsNothing(olowestNode) Then
|
||||||
|
Dim oNode As New TreeNode($"MATCH on WindowTitle: [{WindowTitle}]")
|
||||||
|
oNode.ImageIndex = 3
|
||||||
|
oNode.Tag = oProfile.Name & "-WINDOW"
|
||||||
|
olowestNode.Nodes.Add(oNode)
|
||||||
|
End If
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", oWindowDef.Regex, WindowTitle)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
If oWindows.Count > 0 Then
|
||||||
|
oProfile.Windows = oWindows
|
||||||
|
oProfile.IsMatched = True
|
||||||
|
oProfiles.Add(oProfile)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oProfiles
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function FilterWindowsByWindowClipboardRegex(Profiles As List(Of ProfileData), ClipboardContents As String) As List(Of ProfileData)
|
||||||
|
Dim oProfiles As New List(Of ProfileData)
|
||||||
|
|
||||||
|
For Each oProfile As ProfileData In Profiles
|
||||||
|
_Logger.Debug("Current Profile: {0}", oProfile.Name)
|
||||||
|
|
||||||
|
Dim oWindows As New List(Of ProfileData.WindowData)
|
||||||
|
|
||||||
|
For Each w As ProfileData.WindowData In oProfile.Windows
|
||||||
|
Try
|
||||||
|
If w.Regex = String.Empty Then
|
||||||
|
oWindows.Add(w)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oRegex As New Regex(w.Regex)
|
||||||
|
Dim oMatch = oRegex.Match(ClipboardContents)
|
||||||
|
|
||||||
|
If oMatch.Success Then
|
||||||
|
_Logger.Debug("Window Clipboard Regex Matched: {0}", ClipboardContents)
|
||||||
|
Dim oResult As TreeNode
|
||||||
|
For Each oTreeNode In _TreeView.Nodes
|
||||||
|
If Not IsNothing(oResult) Then Exit For
|
||||||
|
If oTreeNode.Tag = oProfile.Name & "-REGEX" Then
|
||||||
|
oResult = oTreeNode
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Next
|
||||||
|
If Not IsNothing(oResult) Then
|
||||||
|
Dim oNode As New TreeNode($"MATCH on WINDOW Clipboard Regex: [{w.Regex}]")
|
||||||
|
oNode.ImageIndex = 2
|
||||||
|
oNode.Tag = oProfile.Name & "-WINDOW_REGEX"
|
||||||
|
Dim olowestNode As TreeNode = GetLowestNode(oResult)
|
||||||
|
olowestNode.Nodes.Add(oNode)
|
||||||
|
End If
|
||||||
|
|
||||||
|
oWindows.Add(w)
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", w.Regex, ClipboardContents)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
If oWindows.Count > 0 Then
|
||||||
|
oProfile.Windows = oWindows
|
||||||
|
oProfiles.Add(oProfile)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oProfiles
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function FilterProfilesByFocusedControl(Profiles As List(Of ProfileData), ClipboardContents As String, ControlFocusresult As String) As List(Of ProfileData)
|
||||||
|
Dim oWindow As Window.WindowInfo
|
||||||
|
Dim oFocusedControl As Window.WindowInfo
|
||||||
|
Dim oFocusedControlName As String = String.Empty
|
||||||
|
|
||||||
|
Try
|
||||||
|
oWindow = _Window.GetWindowInfo()
|
||||||
|
oFocusedControl = _Window.GetFocusedControl(oWindow.hWnd)
|
||||||
|
|
||||||
|
If oFocusedControl Is Nothing Then
|
||||||
|
_Logger.Info("Could not get FocusedControl in Window (Old method) {0}", oWindow.WindowTitle)
|
||||||
|
oFocusedControlName = String.Empty
|
||||||
|
Else
|
||||||
|
oFocusedControlName = oFocusedControl.ControlName
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Error while getting Focused control (Old method)")
|
||||||
|
_Logger.Error(ex)
|
||||||
|
oFocusedControlName = String.Empty
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||||
|
|
||||||
|
For Each oProfileMatchedSofar In Profiles
|
||||||
|
If oProfileMatchedSofar.IsMatched = False Then Continue For
|
||||||
|
|
||||||
|
_Logger.Debug("Checking ControlDefiniotion on profile: {0}", oProfileMatchedSofar.Name)
|
||||||
|
If oProfileMatchedSofar.Controls.Count = 0 Then
|
||||||
|
oFilteredProfiles.Add(oProfileMatchedSofar)
|
||||||
|
|
||||||
|
Dim oNode As New TreeNode($"No Controls configured!")
|
||||||
|
oNode.ImageIndex = 2
|
||||||
|
oNode.ForeColor = Color.Blue
|
||||||
|
oNode.Tag = oProfileMatchedSofar.Name & "-NOCONTROLCONFIG"
|
||||||
|
Dim f = New Font("Tahoma", 10, FontStyle.Bold)
|
||||||
|
oNode.NodeFont = f
|
||||||
|
_TreeView.Nodes.Add(oNode)
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oControls As New List(Of ProfileData.ControlData)
|
||||||
|
|
||||||
|
For Each oControlDefinition In oProfileMatchedSofar.Controls
|
||||||
|
Try
|
||||||
|
If oControlDefinition.WindowId <> oProfileMatchedSofar.MatchedWindowID Then Continue For
|
||||||
|
_Logger.Debug($"Working on ControlDefinition: {oControlDefinition.Guid}-{oControlDefinition.ControlName}...")
|
||||||
|
If oControlDefinition.Regex = String.Empty Then
|
||||||
|
oProfileMatchedSofar.MatchedControlID = oControlDefinition.Guid
|
||||||
|
oControlDefinition.IsMatched = True
|
||||||
|
oControls.Add(oControlDefinition)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
'Dim oResult As TreeNode
|
||||||
|
'For Each oTreeNode In CurrMatchTreeView.Nodes
|
||||||
|
' oResult = NodeFind(oTreeNode, $"Global Clipboard Regex Matched [{oProfile.Regex}]")
|
||||||
|
'Next
|
||||||
|
'Dim oNode As TreeNode
|
||||||
|
Dim oNodeCaption As String
|
||||||
|
'Dim oAddNode As Boolean = False
|
||||||
|
Dim oRegex As New Regex(oControlDefinition.Regex)
|
||||||
|
|
||||||
|
Dim oFocusedControlResult As String = ""
|
||||||
|
|
||||||
|
If oControlDefinition.AutomationId <> String.Empty And oControlDefinition.ControlName = String.Empty Then
|
||||||
|
_Logger.Debug($"AutomationID should be used...")
|
||||||
|
If Not IsNothing(ControlFocusresult) Then
|
||||||
|
If ControlFocusresult <> String.Empty Then
|
||||||
|
_Logger.Debug($"AutomationID will be used...")
|
||||||
|
oFocusedControlResult = ControlFocusresult
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ElseIf oControlDefinition.AutomationId = String.Empty And oControlDefinition.ControlName <> String.Empty Then
|
||||||
|
_Logger.Debug($"ControlName should be used...")
|
||||||
|
If Not IsNothing(oFocusedControlName) Then
|
||||||
|
If oFocusedControlName <> String.Empty Then
|
||||||
|
_Logger.Debug($"ControlName will be used...")
|
||||||
|
oFocusedControlResult = oFocusedControlName
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
If oFocusedControlResult <> String.Empty Then
|
||||||
|
Dim oControlRegex As New Regex(oControlDefinition.Regex)
|
||||||
|
Dim oControlMatch = oRegex.Match(oFocusedControlResult)
|
||||||
|
|
||||||
|
If oControlMatch.Success Then
|
||||||
|
_Logger.Debug($"MATCH on Focused Control [{oFocusedControlResult}] with Regex [{oControlDefinition.Regex}]")
|
||||||
|
oProfileMatchedSofar.IsMatched = True
|
||||||
|
oProfileMatchedSofar.MatchedControlID = oControlDefinition.Guid
|
||||||
|
oControlDefinition.IsMatched = True
|
||||||
|
oControls.Add(oControlDefinition)
|
||||||
|
Dim olowestNode As TreeNode = Node_Get_Lowest_Node(oProfileMatchedSofar.Name & "-REGEX")
|
||||||
|
If Not IsNothing(olowestNode) Then
|
||||||
|
Dim oNode As New TreeNode($"MATCH on Focused Control [{oFocusedControlResult}] with Regex [{oControlDefinition.Regex}]")
|
||||||
|
oNode.ImageIndex = 2
|
||||||
|
oNode.Tag = oProfileMatchedSofar.Name & "-CONTROL"
|
||||||
|
olowestNode.Nodes.Add(oNode)
|
||||||
|
End If
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", oControlDefinition.Regex, oFocusedControlName)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
If oControls.Count > 0 Then
|
||||||
|
oProfileMatchedSofar.Controls = oControls
|
||||||
|
oFilteredProfiles.Add(oProfileMatchedSofar)
|
||||||
|
Else
|
||||||
|
Dim olowestNode As TreeNode = Node_Get_Lowest_Node(oProfileMatchedSofar.Name & "-REGEX")
|
||||||
|
If Not IsNothing(olowestNode) Then
|
||||||
|
Dim oNode As New TreeNode($"NO MATCHES on Focused Control, Please check the Config")
|
||||||
|
oNode.ImageIndex = 2
|
||||||
|
oNode.Tag = oProfileMatchedSofar.Name & "-CONTROLNoMatch"
|
||||||
|
olowestNode.Nodes.Add(oNode)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oFilteredProfiles
|
||||||
|
End Function
|
||||||
|
Private Function Node_Get_Lowest_Node(NodeTag As String) As TreeNode
|
||||||
|
Dim oExit = False
|
||||||
|
Dim oParentNode As TreeNode
|
||||||
|
For Each oTreeNode As TreeNode In _TreeView.Nodes
|
||||||
|
For Each oNodes As TreeNode In oTreeNode.Nodes
|
||||||
|
If oExit = True Then Exit For
|
||||||
|
If oNodes.Tag = NodeTag Then
|
||||||
|
oParentNode = oNodes
|
||||||
|
oExit = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
Dim olowestNode As TreeNode = GetLowestNode(oParentNode)
|
||||||
|
|
||||||
|
Return olowestNode
|
||||||
|
End Function
|
||||||
|
Public Function ClearNotMatchedProfiles(Profiles As List(Of ProfileData)) As List(Of ProfileData)
|
||||||
|
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||||
|
For Each oProfile In Profiles
|
||||||
|
If oProfile.IsMatched Then
|
||||||
|
oFilteredProfiles.Add(oProfile)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return oFilteredProfiles
|
||||||
|
End Function
|
||||||
|
Private Function TransformProfiles() As List(Of ProfileData)
|
||||||
|
Dim oList As New List(Of ProfileData)
|
||||||
|
|
||||||
|
For Each oRow As DataRow In _ProfileTable.Rows
|
||||||
|
Dim oProfileId = oRow.Item("GUID")
|
||||||
|
Dim oProcessList As List(Of ProfileData.ProcessData) = TransformProcesses(oProfileId, _ProcessTable)
|
||||||
|
Dim oWindowList As List(Of ProfileData.WindowData) = TransformWindows(oProfileId, _WindowTable)
|
||||||
|
Dim oControlList As List(Of ProfileData.ControlData) = TransformControls(oProfileId, _ControlTable)
|
||||||
|
|
||||||
|
oList.Add(New ProfileData() With {
|
||||||
|
.Guid = oRow.Item("GUID"),
|
||||||
|
.Regex = NotNull(oRow.Item("REGEX_EXPRESSION"), String.Empty),
|
||||||
|
.Name = NotNull(oRow.Item("NAME"), String.Empty),
|
||||||
|
.Comment = NotNull(oRow.Item("COMMENT"), String.Empty),
|
||||||
|
.ProfileType = NotNull(oRow.Item("PROFILE_TYPE"), String.Empty),
|
||||||
|
.Processes = oProcessList,
|
||||||
|
.Windows = oWindowList,
|
||||||
|
.Controls = oControlList
|
||||||
|
})
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function TransformControls(ProfileId As Integer, ControlDatatable As DataTable) As List(Of ProfileData.ControlData)
|
||||||
|
Dim oControlList As New List(Of ProfileData.ControlData)
|
||||||
|
|
||||||
|
For Each oRow As DataRow In ControlDatatable.Rows
|
||||||
|
If oRow.Item("PROFILE_ID") = ProfileId Then
|
||||||
|
oControlList.Add(New ProfileData.ControlData() With {
|
||||||
|
.Guid = oRow.Item("GUID"),
|
||||||
|
.Description = NotNull(oRow.Item("DESCRIPTION"), String.Empty),
|
||||||
|
.Regex = NotNull(oRow.Item("REGEX"), String.Empty),
|
||||||
|
.AutomationId = NotNull(oRow.Item("AUTOMATION_ID"), String.Empty),
|
||||||
|
.WindowId = oRow.Item("WINDOW_ID")
|
||||||
|
})
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oControlList
|
||||||
|
End Function
|
||||||
|
Private Function TransformProcesses(ProfileId As Integer, ProcessDatatable As DataTable) As List(Of ProfileData.ProcessData)
|
||||||
|
Dim oProcessList As New List(Of ProfileData.ProcessData)
|
||||||
|
|
||||||
|
For Each oRow As DataRow In ProcessDatatable.Rows
|
||||||
|
oProcessList.Add(New ProfileData.ProcessData() With {
|
||||||
|
.Guid = oRow.Item("GUID"),
|
||||||
|
.ProfileId = oRow.Item("PROFILE_ID"),
|
||||||
|
.ProcessName = NotNull(oRow.Item("PROC_NAME"), String.Empty)
|
||||||
|
})
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oProcessList
|
||||||
|
End Function
|
||||||
|
Private Function TransformWindows(ProfileId As Integer, WindowDatatable As DataTable) As List(Of ProfileData.WindowData)
|
||||||
|
Dim oWindowList As New List(Of ProfileData.WindowData)
|
||||||
|
|
||||||
|
For Each oRow As DataRow In WindowDatatable.Rows
|
||||||
|
oWindowList.Add(New ProfileData.WindowData() With {
|
||||||
|
.Guid = oRow.Item("GUID"),
|
||||||
|
.WindowProcessID = oRow.Item("PROCESS_ID"),
|
||||||
|
.Title = NotNull(oRow.Item("DESCRIPTION"), String.Empty),
|
||||||
|
.Regex = NotNull(oRow.Item("REGEX"), String.Empty),
|
||||||
|
.Sequence = NotNull(oRow.Item("SEQUENCE"), 0)
|
||||||
|
})
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oWindowList
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
4
Modules/ZooFlow/Environment.vb
Normal file
4
Modules/ZooFlow/Environment.vb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Public Class Environment
|
||||||
|
Public User As State.UserState
|
||||||
|
Public Modules As Dictionary(Of String, State.ModuleState)
|
||||||
|
End Class
|
||||||
13
Modules/ZooFlow/My Project/Application.Designer.vb
generated
Normal file
13
Modules/ZooFlow/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' Dieser Code wurde von einem Tool generiert.
|
||||||
|
' Laufzeitversion:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
' der Code erneut generiert wird.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
10
Modules/ZooFlow/My Project/Application.myapp
Normal file
10
Modules/ZooFlow/My Project/Application.myapp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<MySubMain>false</MySubMain>
|
||||||
|
<SingleInstance>false</SingleInstance>
|
||||||
|
<ShutdownMode>0</ShutdownMode>
|
||||||
|
<EnableVisualStyles>true</EnableVisualStyles>
|
||||||
|
<AuthenticationMode>0</AuthenticationMode>
|
||||||
|
<ApplicationType>1</ApplicationType>
|
||||||
|
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||||
|
</MyApplicationData>
|
||||||
35
Modules/ZooFlow/My Project/AssemblyInfo.vb
Normal file
35
Modules/ZooFlow/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Imports System
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
|
||||||
|
' Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
' die einer Assembly zugeordnet sind.
|
||||||
|
|
||||||
|
' Werte der Assemblyattribute überprüfen
|
||||||
|
|
||||||
|
<Assembly: AssemblyTitle("ZooFlow")>
|
||||||
|
<Assembly: AssemblyDescription("")>
|
||||||
|
<Assembly: AssemblyCompany("")>
|
||||||
|
<Assembly: AssemblyProduct("ZooFlow")>
|
||||||
|
<Assembly: AssemblyCopyright("Copyright © 2019")>
|
||||||
|
<Assembly: AssemblyTrademark("")>
|
||||||
|
|
||||||
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
|
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
|
||||||
|
<Assembly: Guid("0eadc6da-3df6-4afc-9a4f-fb9688daa03f")>
|
||||||
|
|
||||||
|
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
'
|
||||||
|
' Hauptversion
|
||||||
|
' Nebenversion
|
||||||
|
' Buildnummer
|
||||||
|
' Revision
|
||||||
|
'
|
||||||
|
' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
|
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||||
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
63
Modules/ZooFlow/My Project/Resources.Designer.vb
generated
Normal file
63
Modules/ZooFlow/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' Dieser Code wurde von einem Tool generiert.
|
||||||
|
' Laufzeitversion:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
' der Code erneut generiert wird.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
Imports System
|
||||||
|
|
||||||
|
Namespace My.Resources
|
||||||
|
|
||||||
|
'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||||
|
'-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||||
|
'''<summary>
|
||||||
|
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||||
|
Friend Module Resources
|
||||||
|
|
||||||
|
Private resourceMan As Global.System.Resources.ResourceManager
|
||||||
|
|
||||||
|
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
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("DigitalData.Modules.ZooFlow.Resources", GetType(Resources).Assembly)
|
||||||
|
resourceMan = temp
|
||||||
|
End If
|
||||||
|
Return resourceMan
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||||
|
Get
|
||||||
|
Return resourceCulture
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
resourceCulture = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
117
Modules/ZooFlow/My Project/Resources.resx
Normal file
117
Modules/ZooFlow/My Project/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
73
Modules/ZooFlow/My Project/Settings.Designer.vb
generated
Normal file
73
Modules/ZooFlow/My Project/Settings.Designer.vb
generated
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' Dieser Code wurde von einem Tool generiert.
|
||||||
|
' Laufzeitversion:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
' der Code erneut generiert wird.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
|
||||||
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Partial Friend NotInheritable Class MySettings
|
||||||
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
|
|
||||||
|
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||||
|
|
||||||
|
#Region "Automatische My.Settings-Speicherfunktion"
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
Private Shared addedHandler As Boolean
|
||||||
|
|
||||||
|
Private Shared addedHandlerLockObject As New Object
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
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 MySettings
|
||||||
|
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
|
||||||
|
End Namespace
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||||
|
Friend Module MySettingsProperty
|
||||||
|
|
||||||
|
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||||
|
Friend ReadOnly Property Settings() As Global.DigitalData.Modules.ZooFlow.My.MySettings
|
||||||
|
Get
|
||||||
|
Return Global.DigitalData.Modules.ZooFlow.My.MySettings.Default
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
7
Modules/ZooFlow/My Project/Settings.settings
Normal file
7
Modules/ZooFlow/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
5
Modules/ZooFlow/Params/ClipboardWatcherParams.vb
Normal file
5
Modules/ZooFlow/Params/ClipboardWatcherParams.vb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Imports DigitalData.Modules.ZooFlow.Params
|
||||||
|
|
||||||
|
Public Class ClipboardWatcherParams
|
||||||
|
Public MatchingProfiles As List(Of ProfileData)
|
||||||
|
End Class
|
||||||
47
Modules/ZooFlow/Params/ProfileData.vb
Normal file
47
Modules/ZooFlow/Params/ProfileData.vb
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
Namespace Params
|
||||||
|
Public Class ProfileData
|
||||||
|
Public Guid As Integer
|
||||||
|
Public Regex As String
|
||||||
|
Public Name As String
|
||||||
|
Public Comment As String
|
||||||
|
Public ProfileType As Integer
|
||||||
|
|
||||||
|
Public Processes As List(Of ProfileData.ProcessData)
|
||||||
|
Public Windows As List(Of ProfileData.WindowData)
|
||||||
|
Public Controls As List(Of ProfileData.ControlData)
|
||||||
|
|
||||||
|
Public CountDocs As Integer = 0
|
||||||
|
Public CountData As Integer = 0
|
||||||
|
Public IsMatched As Boolean = False
|
||||||
|
Public MatchedProcessID As Integer = 0
|
||||||
|
Public MatchedWindowID As Integer = 0
|
||||||
|
Public MatchedControlID As Integer = 0
|
||||||
|
Public SelectCommand As String
|
||||||
|
|
||||||
|
Public Class ProcessData
|
||||||
|
Public Guid As Integer
|
||||||
|
Public ProfileId As Integer
|
||||||
|
Public ProcessName As String
|
||||||
|
Public IsMatched As Boolean = False
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class ControlData
|
||||||
|
Public Guid As Integer
|
||||||
|
Public WindowId As Integer
|
||||||
|
Public Description As String
|
||||||
|
Public Regex As String
|
||||||
|
Public AutomationId As String
|
||||||
|
Public ControlName As String
|
||||||
|
Public IsMatched As Boolean = False
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class WindowData
|
||||||
|
Public Guid As Integer
|
||||||
|
Public WindowProcessID As Integer
|
||||||
|
Public Title As String
|
||||||
|
Public Regex As String
|
||||||
|
Public Sequence As Integer
|
||||||
|
Public IsMatched As Boolean = False
|
||||||
|
End Class
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
7
Modules/ZooFlow/State/ModuleState.vb
Normal file
7
Modules/ZooFlow/State/ModuleState.vb
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Namespace State
|
||||||
|
Public Class ModuleState
|
||||||
|
Public Property HasAccess As Boolean
|
||||||
|
Public Property IsAdmin As Boolean
|
||||||
|
Public Property LoggedIn As Integer
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
6
Modules/ZooFlow/State/ServiceState.vb
Normal file
6
Modules/ZooFlow/State/ServiceState.vb
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Namespace State
|
||||||
|
Public Class ServiceState
|
||||||
|
Public Property Online As Boolean = True
|
||||||
|
Public Property LastChecked As DateTime = DateTime.Now
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
28
Modules/ZooFlow/State/UserState.vb
Normal file
28
Modules/ZooFlow/State/UserState.vb
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
Imports System.Threading
|
||||||
|
|
||||||
|
Namespace State
|
||||||
|
''' <summary>
|
||||||
|
''' Helper Class to hold User State
|
||||||
|
''' </summary>
|
||||||
|
Public Class UserState
|
||||||
|
Public Property UserId As Integer
|
||||||
|
Public Property UserName As String
|
||||||
|
Public Property Surname As String
|
||||||
|
Public Property GivenName As String
|
||||||
|
Public Property ShortName As String
|
||||||
|
Public Property Email As String
|
||||||
|
Public Property MachineName As String
|
||||||
|
Public Property DateFormat As String
|
||||||
|
Public Property Language As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Initialize user object with values that can be read from the environment
|
||||||
|
''' </summary>
|
||||||
|
Public Sub New()
|
||||||
|
Language = Thread.CurrentThread.CurrentCulture.Name
|
||||||
|
UserName = System.Environment.UserName
|
||||||
|
MachineName = System.Environment.MachineName
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
|
|
||||||
135
Modules/ZooFlow/ZooFlow.vbproj
Normal file
135
Modules/ZooFlow/ZooFlow.vbproj
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{81CAC44F-3711-4C8F-AE98-E02A7448782A}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<RootNamespace>DigitalData.Modules.ZooFlow</RootNamespace>
|
||||||
|
<AssemblyName>DigitalData.Modules.ZooFlow</AssemblyName>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<MyType>Windows</MyType>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DocumentationFile>DigitalData.Modules.ZooFlow.xml</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<DefineDebug>false</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DocumentationFile>DigitalData.Modules.ZooFlow.xml</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionExplicit>On</OptionExplicit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionCompare>Binary</OptionCompare>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionStrict>Off</OptionStrict>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionInfer>On</OptionInfer>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
<Import Include="System" />
|
||||||
|
<Import Include="System.Collections" />
|
||||||
|
<Import Include="System.Collections.Generic" />
|
||||||
|
<Import Include="System.Data" />
|
||||||
|
<Import Include="System.Diagnostics" />
|
||||||
|
<Import Include="System.Linq" />
|
||||||
|
<Import Include="System.Xml.Linq" />
|
||||||
|
<Import Include="System.Threading.Tasks" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="ClassProfileFilter.vb" />
|
||||||
|
<Compile Include="Environment.vb" />
|
||||||
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
|
<Compile Include="My Project\Application.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Resources.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Settings.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Params\ClipboardWatcherParams.vb" />
|
||||||
|
<Compile Include="Params\ProfileData.vb" />
|
||||||
|
<Compile Include="State\ModuleState.vb" />
|
||||||
|
<Compile Include="State\ServiceState.vb" />
|
||||||
|
<Compile Include="State\UserState.vb" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="My Project\Resources.resx">
|
||||||
|
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||||
|
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="My Project\Application.myapp">
|
||||||
|
<Generator>MyApplicationCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="My Project\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<CustomToolNamespace>My</CustomToolNamespace>
|
||||||
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Modules.Language\Language.vbproj">
|
||||||
|
<Project>{d3c8cfed-d6f6-43a8-9bdf-454145d0352f}</Project>
|
||||||
|
<Name>Language</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\Modules.Logging\Logging.vbproj">
|
||||||
|
<Project>{903B2D7D-3B80-4BE9-8713-7447B704E1B0}</Project>
|
||||||
|
<Name>Logging</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\Windows\Windows.vbproj">
|
||||||
|
<Project>{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}</Project>
|
||||||
|
<Name>Windows</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
</Project>
|
||||||
4
Modules/ZooFlow/packages.config
Normal file
4
Modules/ZooFlow/packages.config
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
|
</packages>
|
||||||
@ -43,9 +43,25 @@
|
|||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="DevExpress.Data.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||||
|
<Reference Include="DevExpress.Printing.v18.1.Core, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||||
|
<Reference Include="DevExpress.Sparkline.v18.1.Core, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||||
|
<Reference Include="DevExpress.Utils.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||||
|
<Reference Include="DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Data.Linq" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@ -91,6 +107,7 @@
|
|||||||
<EmbeddedResource Include="frmMatch.resx">
|
<EmbeddedResource Include="frmMatch.resx">
|
||||||
<DependentUpon>frmMatch.vb</DependentUpon>
|
<DependentUpon>frmMatch.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="My Project\licenses.licx" />
|
||||||
<EmbeddedResource Include="My Project\Resources.resx">
|
<EmbeddedResource Include="My Project\Resources.resx">
|
||||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||||
@ -108,6 +125,7 @@
|
|||||||
<CustomToolNamespace>My</CustomToolNamespace>
|
<CustomToolNamespace>My</CustomToolNamespace>
|
||||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Modules.Config\Config.vbproj">
|
<ProjectReference Include="..\Modules.Config\Config.vbproj">
|
||||||
@ -118,14 +136,22 @@
|
|||||||
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
|
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
|
||||||
<Name>Database</Name>
|
<Name>Database</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Modules.Language\Language.vbproj">
|
||||||
|
<Project>{d3c8cfed-d6f6-43a8-9bdf-454145d0352f}</Project>
|
||||||
|
<Name>Language</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Modules.Logging\Logging.vbproj">
|
<ProjectReference Include="..\Modules.Logging\Logging.vbproj">
|
||||||
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
|
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
|
||||||
<Name>Logging</Name>
|
<Name>Logging</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\ZooFlow\ZooFlow.vbproj">
|
<ProjectReference Include="..\Modules\ZooFlow\ZooFlow.vbproj">
|
||||||
<Project>{D0FB36EB-783D-40E1-B71E-A0B84B2FE567}</Project>
|
<Project>{81cac44f-3711-4c8f-ae98-e02a7448782a}</Project>
|
||||||
<Name>ZooFlow</Name>
|
<Name>ZooFlow</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Windows\Windows.vbproj">
|
||||||
|
<Project>{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}</Project>
|
||||||
|
<Name>Windows</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
1
Products.ClipboardWatcher/My Project/licenses.licx
Normal file
1
Products.ClipboardWatcher/My Project/licenses.licx
Normal file
@ -0,0 +1 @@
|
|||||||
|
DevExpress.XtraEditors.TileControl, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
62
Products.ClipboardWatcher/frmMatch.Designer.vb
generated
62
Products.ClipboardWatcher/frmMatch.Designer.vb
generated
@ -22,16 +22,78 @@ Partial Class frmMatch
|
|||||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
|
Me.TileControlMatch = New DevExpress.XtraEditors.TileControl()
|
||||||
|
Me.TileGroupDocumentsData = New DevExpress.XtraEditors.TileGroup()
|
||||||
|
Me.TileGroupDocuments = New DevExpress.XtraEditors.TileGroup()
|
||||||
|
Me.TileGroupData = New DevExpress.XtraEditors.TileGroup()
|
||||||
|
Me.Label1 = New System.Windows.Forms.Label()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
|
'TileControlMatch
|
||||||
|
'
|
||||||
|
Me.TileControlMatch.AllowDragTilesBetweenGroups = False
|
||||||
|
Me.TileControlMatch.AppearanceGroupText.BackColor = System.Drawing.Color.Transparent
|
||||||
|
Me.TileControlMatch.AppearanceGroupText.Font = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.TileControlMatch.AppearanceGroupText.ForeColor = System.Drawing.Color.White
|
||||||
|
Me.TileControlMatch.AppearanceGroupText.Options.UseBackColor = True
|
||||||
|
Me.TileControlMatch.AppearanceGroupText.Options.UseFont = True
|
||||||
|
Me.TileControlMatch.AppearanceGroupText.Options.UseForeColor = True
|
||||||
|
Me.TileControlMatch.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||||
|
Me.TileControlMatch.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.TileControlMatch.Groups.Add(Me.TileGroupDocumentsData)
|
||||||
|
Me.TileControlMatch.Groups.Add(Me.TileGroupDocuments)
|
||||||
|
Me.TileControlMatch.Groups.Add(Me.TileGroupData)
|
||||||
|
Me.TileControlMatch.Location = New System.Drawing.Point(0, 0)
|
||||||
|
Me.TileControlMatch.Name = "TileControlMatch"
|
||||||
|
Me.TileControlMatch.ShowGroupText = True
|
||||||
|
Me.TileControlMatch.Size = New System.Drawing.Size(800, 450)
|
||||||
|
Me.TileControlMatch.TabIndex = 0
|
||||||
|
Me.TileControlMatch.Text = "TileControl1"
|
||||||
|
'
|
||||||
|
'TileGroupDocumentsData
|
||||||
|
'
|
||||||
|
Me.TileGroupDocumentsData.Name = "TileGroupDocumentsData"
|
||||||
|
Me.TileGroupDocumentsData.Text = "Kombiniert"
|
||||||
|
'
|
||||||
|
'TileGroupDocuments
|
||||||
|
'
|
||||||
|
Me.TileGroupDocuments.Name = "TileGroupDocuments"
|
||||||
|
Me.TileGroupDocuments.Text = "Dokumente"
|
||||||
|
'
|
||||||
|
'TileGroupData
|
||||||
|
'
|
||||||
|
Me.TileGroupData.Name = "TileGroupData"
|
||||||
|
Me.TileGroupData.Text = "Daten"
|
||||||
|
'
|
||||||
|
'Label1
|
||||||
|
'
|
||||||
|
Me.Label1.AutoSize = True
|
||||||
|
Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||||
|
Me.Label1.Font = New System.Drawing.Font("Segoe UI Semibold", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.Label1.ForeColor = System.Drawing.Color.White
|
||||||
|
Me.Label1.Location = New System.Drawing.Point(12, 9)
|
||||||
|
Me.Label1.Name = "Label1"
|
||||||
|
Me.Label1.Size = New System.Drawing.Size(401, 21)
|
||||||
|
Me.Label1.TabIndex = 1
|
||||||
|
Me.Label1.Text = "Es wurde mehr als ein Match für Ihre Suche gefunden:"
|
||||||
|
'
|
||||||
'frmMatch
|
'frmMatch
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(800, 450)
|
Me.ClientSize = New System.Drawing.Size(800, 450)
|
||||||
|
Me.Controls.Add(Me.Label1)
|
||||||
|
Me.Controls.Add(Me.TileControlMatch)
|
||||||
Me.Name = "frmMatch"
|
Me.Name = "frmMatch"
|
||||||
Me.Text = "frmMatch"
|
Me.Text = "frmMatch"
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
|
Me.PerformLayout()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend WithEvents TileControlMatch As DevExpress.XtraEditors.TileControl
|
||||||
|
Friend WithEvents TileGroupDocumentsData As DevExpress.XtraEditors.TileGroup
|
||||||
|
Friend WithEvents TileGroupDocuments As DevExpress.XtraEditors.TileGroup
|
||||||
|
Friend WithEvents TileGroupData As DevExpress.XtraEditors.TileGroup
|
||||||
|
Friend WithEvents Label1 As Windows.Forms.Label
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -1,5 +1,11 @@
|
|||||||
Imports DigitalData.Modules.Logging
|
Imports System.Drawing
|
||||||
Imports ZooFlow
|
Imports System.Windows.Forms
|
||||||
|
Imports DevExpress.XtraEditors
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
Imports DigitalData.Modules.Windows
|
||||||
|
Imports DigitalData.Modules.ZooFlow
|
||||||
|
Imports DigitalData.Modules.ZooFlow.Params
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
'''
|
'''
|
||||||
''' Selfcontained:
|
''' Selfcontained:
|
||||||
@ -16,15 +22,134 @@ Imports ZooFlow
|
|||||||
''' - Clipboard Content as String
|
''' - Clipboard Content as String
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Class frmMatch
|
Public Class frmMatch
|
||||||
Public Sub New(LogConfig As LogConfig, Environment As ClassEnvironment)
|
Private _LogConfig As LogConfig
|
||||||
|
Private _Logger As Logger
|
||||||
|
Private _Environment As Environment
|
||||||
|
Private _Params As ClipboardWatcherParams
|
||||||
|
|
||||||
|
Private PrimaryFont As New Font("Segoe UI", 12, FontStyle.Bold)
|
||||||
|
Private SecondaryFont As New Font("Segoe UI", 10)
|
||||||
|
|
||||||
|
Private Const NO_COUNT_SQL As Integer = 99998
|
||||||
|
Private Const INVALID_COUNT_SQL As Integer = 99999
|
||||||
|
|
||||||
|
Private Enum ProfileType
|
||||||
|
ANY = 0
|
||||||
|
DOCS_ONLY = 1
|
||||||
|
DATA_ONLY = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Sub New(LogConfig As LogConfig, Environment As Environment, Params As ClipboardWatcherParams)
|
||||||
' Dieser Aufruf ist für den Designer erforderlich.
|
' Dieser Aufruf ist für den Designer erforderlich.
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
|
|
||||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||||
|
_LogConfig = LogConfig
|
||||||
|
_Logger = LogConfig.GetLogger()
|
||||||
|
_Environment = Environment
|
||||||
|
_Params = Params
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmMatch_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmMatch_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
Dim oCreatedTiles = CreateTiles()
|
||||||
|
|
||||||
|
If oCreatedTiles = -1 Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Function CreateTiles() As Integer
|
||||||
|
Try
|
||||||
|
Dim oCreatedTiles As Integer = 0
|
||||||
|
Dim oDocumentGroup = TileControlMatch.Groups.Item("TileGroupDocuments")
|
||||||
|
Dim oDataGroup = TileControlMatch.Groups.Item("TileGroupData")
|
||||||
|
Dim oDataDocumentsGroup = TileControlMatch.Groups.Item("TileGroupDocumentsData")
|
||||||
|
|
||||||
|
oDocumentGroup.Items.Clear()
|
||||||
|
oDataGroup.Items.Clear()
|
||||||
|
|
||||||
|
For Each oProfile As ProfileData In _Params.MatchingProfiles
|
||||||
|
If oProfile.ProfileType = ProfileType.ANY Then
|
||||||
|
If oProfile.CountData > 0 And oProfile.CountDocs > 0 Then
|
||||||
|
Dim oCountText = oProfile.CountData + oProfile.CountDocs
|
||||||
|
Dim oItem = CreateTile(oProfile, $"{oCountText} Ergebnisse")
|
||||||
|
oDataDocumentsGroup.Items.Add(oItem)
|
||||||
|
oCreatedTiles += 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If oProfile.ProfileType = ProfileType.ANY Or oProfile.ProfileType = ProfileType.DOCS_ONLY Then
|
||||||
|
If oProfile.CountDocs > 0 Then
|
||||||
|
Dim oItem = CreateTile(oProfile, $"{oProfile.CountDocs} Dokumente")
|
||||||
|
oDocumentGroup.Items.Add(oItem)
|
||||||
|
oCreatedTiles += 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If oProfile.ProfileType = ProfileType.ANY Or oProfile.ProfileType = ProfileType.DATA_ONLY Then
|
||||||
|
If oProfile.CountData > 0 Then
|
||||||
|
Dim oItem = CreateTile(oProfile, $"{oProfile.CountData} Datensätze")
|
||||||
|
oDataGroup.Items.Add(oItem)
|
||||||
|
oCreatedTiles += 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oCreatedTiles
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
MsgBox("Error while creating profile tiles!" & vbNewLine & ex.Message)
|
||||||
|
Return -1
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function CreateTile(Profile As ProfileData, CountText As String) As TileItem
|
||||||
|
Dim oItem As New TileItem() With {.Tag = Profile.Guid}
|
||||||
|
oItem.Elements.Clear()
|
||||||
|
|
||||||
|
Dim oNameElement = New TileItemElement With {
|
||||||
|
.Text = Profile.Name,
|
||||||
|
.TextAlignment = TileItemContentAlignment.TopLeft
|
||||||
|
}
|
||||||
|
oNameElement.Appearance.Normal.Font = PrimaryFont
|
||||||
|
oItem.Elements.Add(oNameElement)
|
||||||
|
|
||||||
|
Dim oCommentElement = New TileItemElement With {
|
||||||
|
.Text = Profile.Comment,
|
||||||
|
.TextAlignment = TileItemContentAlignment.MiddleLeft
|
||||||
|
}
|
||||||
|
oCommentElement.Appearance.Normal.Font = SecondaryFont
|
||||||
|
oItem.Elements.Add(oCommentElement)
|
||||||
|
|
||||||
|
Dim oCountElement = New TileItemElement With {
|
||||||
|
.Text = GetCountText(Profile, CountText),
|
||||||
|
.TextAlignment = TileItemContentAlignment.BottomRight
|
||||||
|
}
|
||||||
|
oCountElement.Appearance.Normal.Font = SecondaryFont
|
||||||
|
oItem.Elements.Add(oCountElement)
|
||||||
|
|
||||||
|
Return oItem
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GetCountText(Profile As ProfileData, CountText As String) As String
|
||||||
|
Dim oText As String = "No implemented"
|
||||||
|
|
||||||
|
If Profile.CountData = INVALID_COUNT_SQL Then
|
||||||
|
oText = "Invalid SQL!"
|
||||||
|
ElseIf Profile.CountData = NO_COUNT_SQL Then
|
||||||
|
oText = "No SQL!"
|
||||||
|
Else
|
||||||
|
oText = CountText
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Profile.CountDocs = INVALID_COUNT_SQL Then
|
||||||
|
oText = "Invalid SQL!"
|
||||||
|
ElseIf Profile.CountDocs = NO_COUNT_SQL Then
|
||||||
|
oText = "No SQL!"
|
||||||
|
Else
|
||||||
|
oText = CountText
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return oText
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
4
Products.ClipboardWatcher/packages.config
Normal file
4
Products.ClipboardWatcher/packages.config
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
|
</packages>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.6.2\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Quartz, Version=3.0.7.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
|
<Reference Include="Quartz, Version=3.0.7.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Quartz.3.0.7\lib\net452\Quartz.dll</HintPath>
|
<HintPath>..\packages\Quartz.3.0.7\lib\net452\Quartz.dll</HintPath>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.6.2" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
<package id="Quartz" version="3.0.7" targetFramework="net461" />
|
<package id="Quartz" version="3.0.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
13
Windows/My Project/Application.Designer.vb
generated
Normal file
13
Windows/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' Dieser Code wurde von einem Tool generiert.
|
||||||
|
' Laufzeitversion:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
' der Code erneut generiert wird.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
10
Windows/My Project/Application.myapp
Normal file
10
Windows/My Project/Application.myapp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<MySubMain>false</MySubMain>
|
||||||
|
<SingleInstance>false</SingleInstance>
|
||||||
|
<ShutdownMode>0</ShutdownMode>
|
||||||
|
<EnableVisualStyles>true</EnableVisualStyles>
|
||||||
|
<AuthenticationMode>0</AuthenticationMode>
|
||||||
|
<ApplicationType>1</ApplicationType>
|
||||||
|
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||||
|
</MyApplicationData>
|
||||||
35
Windows/My Project/AssemblyInfo.vb
Normal file
35
Windows/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Imports System
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
|
||||||
|
' Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
' die einer Assembly zugeordnet sind.
|
||||||
|
|
||||||
|
' Werte der Assemblyattribute überprüfen
|
||||||
|
|
||||||
|
<Assembly: AssemblyTitle("Windows")>
|
||||||
|
<Assembly: AssemblyDescription("")>
|
||||||
|
<Assembly: AssemblyCompany("")>
|
||||||
|
<Assembly: AssemblyProduct("Windows")>
|
||||||
|
<Assembly: AssemblyCopyright("Copyright © 2019")>
|
||||||
|
<Assembly: AssemblyTrademark("")>
|
||||||
|
|
||||||
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
|
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
|
||||||
|
<Assembly: Guid("d7df823b-4cf4-4986-9d1b-740166125b49")>
|
||||||
|
|
||||||
|
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
'
|
||||||
|
' Hauptversion
|
||||||
|
' Nebenversion
|
||||||
|
' Buildnummer
|
||||||
|
' Revision
|
||||||
|
'
|
||||||
|
' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
|
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||||
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
63
Windows/My Project/Resources.Designer.vb
generated
Normal file
63
Windows/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' Dieser Code wurde von einem Tool generiert.
|
||||||
|
' Laufzeitversion:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
' der Code erneut generiert wird.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
Imports System
|
||||||
|
|
||||||
|
Namespace My.Resources
|
||||||
|
|
||||||
|
'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||||
|
'-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||||
|
'''<summary>
|
||||||
|
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||||
|
Friend Module Resources
|
||||||
|
|
||||||
|
Private resourceMan As Global.System.Resources.ResourceManager
|
||||||
|
|
||||||
|
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
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("DigitalData.Modules.Windows.Resources", GetType(Resources).Assembly)
|
||||||
|
resourceMan = temp
|
||||||
|
End If
|
||||||
|
Return resourceMan
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||||
|
Get
|
||||||
|
Return resourceCulture
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
resourceCulture = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
117
Windows/My Project/Resources.resx
Normal file
117
Windows/My Project/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
73
Windows/My Project/Settings.Designer.vb
generated
Normal file
73
Windows/My Project/Settings.Designer.vb
generated
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' Dieser Code wurde von einem Tool generiert.
|
||||||
|
' Laufzeitversion:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
' der Code erneut generiert wird.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
|
||||||
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Partial Friend NotInheritable Class MySettings
|
||||||
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
|
|
||||||
|
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||||
|
|
||||||
|
#Region "Automatische My.Settings-Speicherfunktion"
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
Private Shared addedHandler As Boolean
|
||||||
|
|
||||||
|
Private Shared addedHandlerLockObject As New Object
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
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 MySettings
|
||||||
|
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
|
||||||
|
End Namespace
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||||
|
Friend Module MySettingsProperty
|
||||||
|
|
||||||
|
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||||
|
Friend ReadOnly Property Settings() As Global.DigitalData.Modules.Windows.My.MySettings
|
||||||
|
Get
|
||||||
|
Return Global.DigitalData.Modules.Windows.My.MySettings.Default
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
7
Windows/My Project/Settings.settings
Normal file
7
Windows/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
102
Windows/NativeMethods.vb
Normal file
102
Windows/NativeMethods.vb
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
Public Class NativeMethods
|
||||||
|
<DllImport("user32.dll")>
|
||||||
|
Public Shared Function AttachThreadInput(ByVal idAttach As IntPtr, ByVal idAttachTo As IntPtr, fAttach As Boolean) As Boolean
|
||||||
|
End Function
|
||||||
|
<DllImport("user32.dll")>
|
||||||
|
Public Shared Function GetFocus() As IntPtr
|
||||||
|
End Function
|
||||||
|
<DllImport("user32.dll")>
|
||||||
|
Public Shared Function GetForegroundWindow() As IntPtr
|
||||||
|
End Function
|
||||||
|
<DllImport("user32.dll")>
|
||||||
|
Public Shared Function GetWindowText(ByVal hWnd As IntPtr, ByVal WinTitle As String, ByVal MaxLength As Integer) As Integer
|
||||||
|
End Function
|
||||||
|
<DllImport("user32.dll")>
|
||||||
|
Public Shared Function GetWindowTextLength(ByVal hwnd As Int32) As Integer
|
||||||
|
End Function
|
||||||
|
<DllImport("user32.dll")>
|
||||||
|
Public Shared Function GetWindowThreadProcessId(ByVal hwnd As IntPtr, ByRef lpdwProcessID As Integer) As Integer
|
||||||
|
End Function
|
||||||
|
<DllImport("user32.dll")>
|
||||||
|
Public Shared Function GetClassName(ByVal hwnd As Integer, ByVal lpClassName As StringBuilder, ByVal nMaxCount As Integer) As Integer
|
||||||
|
End Function
|
||||||
|
<DllImport("kernel32.dll")>
|
||||||
|
Public Shared Function OpenProcess(ByVal dwDesiredAccess As UInteger, ByVal bInheritHandle As Boolean, ByVal dwProcessId As UInteger) As IntPtr
|
||||||
|
End Function
|
||||||
|
<DllImport("kernel32.dll")>
|
||||||
|
Public Shared Function VirtualAllocEx(ByVal hProcess As IntPtr, ByVal lpAddress As IntPtr, ByVal dwSize As UIntPtr, ByVal flAllocationType As UInteger, ByVal flProtect As PageProtection) As IntPtr
|
||||||
|
End Function
|
||||||
|
<DllImport("user32.dll", SetLastError:=True)>
|
||||||
|
Public Shared Function GetWindowThreadProcessId(ByVal hWnd As IntPtr, <Out> ByRef lpdwProcessId As UInteger) As UInteger
|
||||||
|
End Function
|
||||||
|
<DllImport("kernel32.dll")>
|
||||||
|
Public Shared Function VirtualFreeEx(ByVal hProcess As IntPtr, ByVal lpAddress As IntPtr, ByVal dwSize As UIntPtr, ByVal dwFreeType As UInteger) As Boolean
|
||||||
|
End Function
|
||||||
|
<DllImport("kernel32.dll")>
|
||||||
|
Public Shared Function CloseHandle(ByVal hObject As IntPtr) As Boolean
|
||||||
|
End Function
|
||||||
|
<DllImport("kernel32.dll")>
|
||||||
|
Public Shared Function MapViewOfFile(ByVal hFileMappingObject As IntPtr, ByVal dwDesiredAccess As UInteger, ByVal dwFileOffsetHigh As UInteger, ByVal dwFileOffsetLow As UInteger, ByVal dwNumberOfBytesToMap As UIntPtr) As IntPtr
|
||||||
|
End Function
|
||||||
|
<DllImport("kernel32.dll")>
|
||||||
|
Public Shared Function UnmapViewOfFile(ByVal lpBaseAddress As IntPtr) As Boolean
|
||||||
|
End Function
|
||||||
|
<DllImport("kernel32.dll", SetLastError:=True)>
|
||||||
|
Public Shared Function CreateFileMapping(ByVal hFile As IntPtr, ByVal lpFileMappingAttributes As IntPtr, ByVal flProtect As PageProtection, ByVal dwMaximumSizeHigh As Integer, ByVal dwMaximumSizeLow As Integer, ByVal lpName As String) As IntPtr
|
||||||
|
End Function
|
||||||
|
<DllImport("user32.dll")>
|
||||||
|
Public Shared Function SendMessage(ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
|
||||||
|
End Function
|
||||||
|
<DllImport("kernel32.dll")>
|
||||||
|
Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr,
|
||||||
|
<Out> ByVal lpBuffer As Byte(), ByVal nSize As UIntPtr, ByVal lpNumberOfBytesRead As IntPtr) As Boolean
|
||||||
|
End Function
|
||||||
|
<DllImport("Kernel32.dll", EntryPoint:="RtlMoveMemory", SetLastError:=False)>
|
||||||
|
Public Shared Sub MoveMemoryFromByte(ByVal dest As IntPtr, ByRef src As Byte, ByVal size As Integer)
|
||||||
|
End Sub
|
||||||
|
<DllImport("Kernel32.dll", EntryPoint:="RtlMoveMemory", SetLastError:=False)>
|
||||||
|
Public Shared Sub MoveMemoryToByte(ByRef dest As Byte, ByVal src As IntPtr, ByVal size As Integer)
|
||||||
|
End Sub
|
||||||
|
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)>
|
||||||
|
Public Shared Function RegisterWindowMessage(ByVal lpString As String) As Integer
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Const STANDARD_RIGHTS_REQUIRED As Integer = &HF0000
|
||||||
|
Public Const SECTION_QUERY As Short = &H1
|
||||||
|
Public Const SECTION_MAP_WRITE As Short = &H2
|
||||||
|
Public Const SECTION_MAP_READ As Short = &H4
|
||||||
|
Public Const SECTION_MAP_EXECUTE As Short = &H8
|
||||||
|
Public Const SECTION_EXTEND_SIZE As Short = &H10
|
||||||
|
Public Const SECTION_ALL_ACCESS As Integer = STANDARD_RIGHTS_REQUIRED Or SECTION_QUERY Or SECTION_MAP_WRITE Or SECTION_MAP_READ Or SECTION_MAP_EXECUTE Or SECTION_EXTEND_SIZE
|
||||||
|
Public Const FILE_MAP_ALL_ACCESS As Integer = SECTION_ALL_ACCESS
|
||||||
|
Public Const PROCESS_VM_OPERATION As Short = &H8
|
||||||
|
Public Const PROCESS_VM_READ As Short = &H10
|
||||||
|
Public Const PROCESS_VM_WRITE As Short = &H20
|
||||||
|
Public Const PROCESS_ALL_ACCESS As Long = &H1F0FFF
|
||||||
|
Public Const MEM_COMMIT As Short = &H1000
|
||||||
|
Public Const MEM_RESERVE As Short = &H2000
|
||||||
|
Public Const MEM_DECOMMIT As Short = &H4000
|
||||||
|
Public Const MEM_RELEASE As Integer = &H8000
|
||||||
|
Public Const MEM_FREE As Integer = &H10000
|
||||||
|
Public Const MEM_PRIVATE As Integer = &H20000
|
||||||
|
Public Const MEM_MAPPED As Integer = &H40000
|
||||||
|
Public Const MEM_TOP_DOWN As Integer = &H100000
|
||||||
|
Public Const INVALID_HANDLE_VALUE As Integer = -1
|
||||||
|
|
||||||
|
Public Enum PageProtection As UInteger
|
||||||
|
NoAccess = &H1
|
||||||
|
[Readonly] = &H2
|
||||||
|
ReadWrite = &H4
|
||||||
|
WriteCopy = &H8
|
||||||
|
Execute = &H10
|
||||||
|
ExecuteRead = &H20
|
||||||
|
ExecuteReadWrite = &H40
|
||||||
|
ExecuteWriteCopy = &H80
|
||||||
|
Guard = &H100
|
||||||
|
NoCache = &H200
|
||||||
|
WriteCombine = &H400
|
||||||
|
End Enum
|
||||||
|
End Class
|
||||||
96
Windows/Utils.vb
Normal file
96
Windows/Utils.vb
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
Imports System.Text
|
||||||
|
Imports System.ComponentModel
|
||||||
|
|
||||||
|
Public Class Utils
|
||||||
|
Private Shared GetControlNameMessage As Integer = 0
|
||||||
|
|
||||||
|
Public Shared Function GetWinFormsId(ByVal hWnd As IntPtr) As String
|
||||||
|
GetControlNameMessage = NativeMethods.RegisterWindowMessage("WM_GETCONTROLNAME")
|
||||||
|
Return XProcGetControlName(hWnd, GetControlNameMessage)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Protected Shared Function XProcGetControlName(ByVal hwnd As IntPtr, ByVal msg As Integer) As String
|
||||||
|
Dim bytearray As Byte() = New Byte(65535) {}
|
||||||
|
Dim bufferMem As IntPtr = IntPtr.Zero
|
||||||
|
Dim written As IntPtr = IntPtr.Zero
|
||||||
|
Dim retHandle As IntPtr = IntPtr.Zero
|
||||||
|
Dim retVal As Boolean
|
||||||
|
Dim processHandle As IntPtr = IntPtr.Zero
|
||||||
|
Dim fileHandle As IntPtr = IntPtr.Zero
|
||||||
|
|
||||||
|
If Not (Environment.OSVersion.Platform = PlatformID.Win32Windows) Then
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim size As UInteger
|
||||||
|
size = 65536
|
||||||
|
processHandle = NativeMethods.OpenProcess(NativeMethods.PROCESS_VM_OPERATION Or NativeMethods.PROCESS_VM_READ Or NativeMethods.PROCESS_VM_WRITE, False, GetProcessIdFromHWnd(hwnd))
|
||||||
|
|
||||||
|
If processHandle.ToInt64() = 0 Then
|
||||||
|
Throw New Win32Exception()
|
||||||
|
End If
|
||||||
|
|
||||||
|
bufferMem = NativeMethods.VirtualAllocEx(processHandle, IntPtr.Zero, New UIntPtr(size), NativeMethods.MEM_RESERVE Or NativeMethods.MEM_COMMIT, NativeMethods.PageProtection.ReadWrite)
|
||||||
|
|
||||||
|
If bufferMem.ToInt64() = 0 Then
|
||||||
|
Throw New Win32Exception()
|
||||||
|
End If
|
||||||
|
|
||||||
|
retHandle = NativeMethods.SendMessage(hwnd, msg, New IntPtr(size), bufferMem)
|
||||||
|
retVal = NativeMethods.ReadProcessMemory(processHandle, bufferMem, bytearray, New UIntPtr(size), written)
|
||||||
|
|
||||||
|
If Not retVal Then
|
||||||
|
Throw New Win32Exception()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Finally
|
||||||
|
retVal = NativeMethods.VirtualFreeEx(processHandle, bufferMem, New UIntPtr(0), NativeMethods.MEM_RELEASE)
|
||||||
|
|
||||||
|
If Not retVal Then
|
||||||
|
Throw New Win32Exception()
|
||||||
|
End If
|
||||||
|
|
||||||
|
NativeMethods.CloseHandle(processHandle)
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim size2 As Integer
|
||||||
|
size2 = 65536
|
||||||
|
fileHandle = NativeMethods.CreateFileMapping(New IntPtr(NativeMethods.INVALID_HANDLE_VALUE), IntPtr.Zero, NativeMethods.PageProtection.ReadWrite, 0, size2, Nothing)
|
||||||
|
|
||||||
|
If fileHandle.ToInt64() = 0 Then
|
||||||
|
Throw New Win32Exception()
|
||||||
|
End If
|
||||||
|
|
||||||
|
bufferMem = NativeMethods.MapViewOfFile(fileHandle, NativeMethods.FILE_MAP_ALL_ACCESS, 0, 0, New UIntPtr(0))
|
||||||
|
|
||||||
|
If bufferMem.ToInt64() = 0 Then
|
||||||
|
Throw New Win32Exception()
|
||||||
|
End If
|
||||||
|
|
||||||
|
NativeMethods.MoveMemoryFromByte(bufferMem, bytearray(0), size2)
|
||||||
|
retHandle = NativeMethods.SendMessage(hwnd, msg, New IntPtr(size2), bufferMem)
|
||||||
|
NativeMethods.MoveMemoryToByte(bytearray(0), bufferMem, 1024)
|
||||||
|
Finally
|
||||||
|
NativeMethods.UnmapViewOfFile(bufferMem)
|
||||||
|
NativeMethods.CloseHandle(fileHandle)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return ByteArrayToString(bytearray)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Function GetProcessIdFromHWnd(ByVal hwnd As IntPtr) As UInteger
|
||||||
|
Dim pid As UInteger
|
||||||
|
NativeMethods.GetWindowThreadProcessId(hwnd, pid)
|
||||||
|
Return pid
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Function ByteArrayToString(ByVal bytes As Byte()) As String
|
||||||
|
If Environment.OSVersion.Platform = PlatformID.Win32Windows Then
|
||||||
|
Return Encoding.[Default].GetString(bytes).TrimEnd(vbNullChar)
|
||||||
|
Else
|
||||||
|
Return Encoding.Unicode.GetString(bytes).TrimEnd(vbNullChar)
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
121
Windows/Window.vb
Normal file
121
Windows/Window.vb
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
Imports System.Text
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
|
Public Class Window
|
||||||
|
Private _Logger As Logger
|
||||||
|
|
||||||
|
Public Class WindowInfo
|
||||||
|
Public WindowTitle As String = ""
|
||||||
|
Public ProcessName As String = ""
|
||||||
|
Public ClassName As String = ""
|
||||||
|
Public ProcessId As Integer = 0
|
||||||
|
Public ControlName As String = ""
|
||||||
|
Public hWnd As IntPtr
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Sub New(LogConfig As LogConfig)
|
||||||
|
_Logger = LogConfig.getLogger()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns Information about the currently focused window
|
||||||
|
''' </summary>
|
||||||
|
Public Function GetWindowInfo() As WindowInfo
|
||||||
|
Dim hWnd As IntPtr = NativeMethods.GetForegroundWindow()
|
||||||
|
If hWnd = IntPtr.Zero Then
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return GetWindowInfo(hWnd)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns Information about the Window with `hWnd`
|
||||||
|
''' </summary>
|
||||||
|
Public Function GetWindowInfo(ByVal hWnd As IntPtr) As WindowInfo
|
||||||
|
Dim oPID As Integer = 0
|
||||||
|
Dim oTitleLength As Int32 = NativeMethods.GetWindowTextLength(hWnd)
|
||||||
|
Dim oWindowTitle As String = StrDup(oTitleLength + 1, "*")
|
||||||
|
Dim oClassBuilder As New StringBuilder(64)
|
||||||
|
|
||||||
|
NativeMethods.GetWindowText(hWnd, oWindowTitle, oTitleLength + 1)
|
||||||
|
NativeMethods.GetWindowThreadProcessId(hWnd, oPID)
|
||||||
|
|
||||||
|
If oPID = 0 Then
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oProcess As Process = Process.GetProcessById(oPID)
|
||||||
|
|
||||||
|
If oProcess Is Nothing Then
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
NativeMethods.GetClassName(hWnd, oClassBuilder, 64)
|
||||||
|
|
||||||
|
Return New WindowInfo With {
|
||||||
|
.hWnd = hWnd,
|
||||||
|
.ClassName = oClassBuilder.ToString,
|
||||||
|
.ProcessId = oProcess.Id,
|
||||||
|
.ProcessName = oProcess.ProcessName,
|
||||||
|
.WindowTitle = oWindowTitle.Replace(vbNullChar, String.Empty)
|
||||||
|
}
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function FocusedControlinActiveWindow(WindowHandle As IntPtr) As IntPtr
|
||||||
|
Try
|
||||||
|
Dim oActiveWindowHandle As IntPtr = NativeMethods.GetForegroundWindow
|
||||||
|
Dim oActiveWindowThread As IntPtr = NativeMethods.GetWindowThreadProcessId(oActiveWindowHandle, 0)
|
||||||
|
Dim oThisWindowThread As IntPtr = NativeMethods.GetWindowThreadProcessId(WindowHandle, 0)
|
||||||
|
NativeMethods.AttachThreadInput(oActiveWindowThread, oThisWindowThread, True)
|
||||||
|
Dim oFocusedControlHandle As IntPtr = NativeMethods.GetFocus()
|
||||||
|
NativeMethods.AttachThreadInput(oActiveWindowThread, oThisWindowThread, False)
|
||||||
|
Return oFocusedControlHandle
|
||||||
|
Catch ex As Exception
|
||||||
|
Return Nothing
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns the currently focused control
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="WindowHandle">Current window handle; can be obtained from Me.Handle</param>
|
||||||
|
Public Function GetFocusedControl(WindowHandle As IntPtr) As WindowInfo
|
||||||
|
Try
|
||||||
|
Dim oWindow = GetWindowInfo()
|
||||||
|
|
||||||
|
If oWindow Is Nothing Then
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oThreadId As IntPtr = NativeMethods.GetWindowThreadProcessId(oWindow.hWnd, 0)
|
||||||
|
Dim oMyThreadId As IntPtr = NativeMethods.GetWindowThreadProcessId(WindowHandle, 0)
|
||||||
|
|
||||||
|
If NativeMethods.AttachThreadInput(oThreadId, oMyThreadId, True) Then
|
||||||
|
Try
|
||||||
|
Dim oControlhWnd = NativeMethods.GetFocus()
|
||||||
|
Dim oControl As WindowInfo = GetWindowInfo(oControlhWnd)
|
||||||
|
|
||||||
|
If oControl Is Nothing Then
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oName = Utils.GetWinFormsId(oControlhWnd)
|
||||||
|
oControl.ControlName = oName
|
||||||
|
|
||||||
|
Return oControl
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
Finally
|
||||||
|
NativeMethods.AttachThreadInput(oThreadId, oMyThreadId, False)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Nothing
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
Return Nothing
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
121
Windows/Windows.vbproj
Normal file
121
Windows/Windows.vbproj
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<RootNamespace>DigitalData.Modules.Windows</RootNamespace>
|
||||||
|
<AssemblyName>DigitalData.Modules.Windows</AssemblyName>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<MyType>Windows</MyType>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DocumentationFile>DigitalData.Modules.Windows.xml</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<DefineDebug>false</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DocumentationFile>DigitalData.Modules.Windows.xml</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionExplicit>On</OptionExplicit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionCompare>Binary</OptionCompare>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionStrict>Off</OptionStrict>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionInfer>On</OptionInfer>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
<Import Include="System" />
|
||||||
|
<Import Include="System.Collections" />
|
||||||
|
<Import Include="System.Collections.Generic" />
|
||||||
|
<Import Include="System.Data" />
|
||||||
|
<Import Include="System.Diagnostics" />
|
||||||
|
<Import Include="System.Linq" />
|
||||||
|
<Import Include="System.Xml.Linq" />
|
||||||
|
<Import Include="System.Threading.Tasks" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="NativeMethods.vb" />
|
||||||
|
<Compile Include="Utils.vb" />
|
||||||
|
<Compile Include="Window.vb" />
|
||||||
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
|
<Compile Include="My Project\Application.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Resources.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Settings.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="My Project\Resources.resx">
|
||||||
|
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||||
|
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="My Project\Application.myapp">
|
||||||
|
<Generator>MyApplicationCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="My Project\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<CustomToolNamespace>My</CustomToolNamespace>
|
||||||
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Modules.Logging\Logging.vbproj">
|
||||||
|
<Project>{903B2D7D-3B80-4BE9-8713-7447B704E1B0}</Project>
|
||||||
|
<Name>Logging</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
</Project>
|
||||||
4
Windows/packages.config
Normal file
4
Windows/packages.config
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
|
</packages>
|
||||||
@ -19,6 +19,7 @@ Namespace My
|
|||||||
|
|
||||||
Public Sub App_Startup() Handles Me.Startup
|
Public Sub App_Startup() Handles Me.Startup
|
||||||
Dim oLogConfig As New LogConfig(PathType.AppData)
|
Dim oLogConfig As New LogConfig(PathType.AppData)
|
||||||
|
oLogConfig.Debug = True
|
||||||
|
|
||||||
' System Config files like Service Url will be saved in %LocalAppdata% so they will remain on the machine
|
' System Config files like Service Url will be saved in %LocalAppdata% so they will remain on the machine
|
||||||
Dim oSystemConfigManager As New ConfigManager(Of ClassConfig)(oLogConfig,
|
Dim oSystemConfigManager As New ConfigManager(Of ClassConfig)(oLogConfig,
|
||||||
|
|||||||
@ -6,6 +6,7 @@ Imports DigitalData.Modules.Language.Utils
|
|||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports ZooFlow.ClassInitLoader
|
Imports ZooFlow.ClassInitLoader
|
||||||
Imports ZooFlow.ClassConstants
|
Imports ZooFlow.ClassConstants
|
||||||
|
Imports ZooFlow.State
|
||||||
|
|
||||||
Public Class ClassInit
|
Public Class ClassInit
|
||||||
Private _MainForm As frmMain
|
Private _MainForm As frmMain
|
||||||
@ -45,6 +46,7 @@ Public Class ClassInit
|
|||||||
oInit.Run()
|
oInit.Run()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function SetupDatabase() As Boolean
|
Private Function SetupDatabase() As Boolean
|
||||||
If My.SystemConfig.ConnectionString = String.Empty Then
|
If My.SystemConfig.ConnectionString = String.Empty Then
|
||||||
Dim oResult = frmConfigDatabase.ShowDialog()
|
Dim oResult = frmConfigDatabase.ShowDialog()
|
||||||
@ -67,8 +69,7 @@ Public Class ClassInit
|
|||||||
If Not IsNothing(e.Error) Then
|
If Not IsNothing(e.Error) Then
|
||||||
MsgBox("Beim Initialisieren des Programms ist folgender Fehler aufgetreten:" & vbNewLine & vbNewLine & e.Error.Message, MsgBoxStyle.Critical, _MainForm.Text)
|
MsgBox("Beim Initialisieren des Programms ist folgender Fehler aufgetreten:" & vbNewLine & vbNewLine & e.Error.Message, MsgBoxStyle.Critical, _MainForm.Text)
|
||||||
Application.ExitThread()
|
Application.ExitThread()
|
||||||
End If
|
Else
|
||||||
|
|
||||||
' Copy back state from MyApplication Helper to My.Application
|
' Copy back state from MyApplication Helper to My.Application
|
||||||
Dim oMyApplication As My.MyApplication = DirectCast(e.Result, My.MyApplication)
|
Dim oMyApplication As My.MyApplication = DirectCast(e.Result, My.MyApplication)
|
||||||
My.Application.User = oMyApplication.User
|
My.Application.User = oMyApplication.User
|
||||||
@ -76,6 +77,7 @@ Public Class ClassInit
|
|||||||
My.Application.ModulesActive = oMyApplication.ModulesActive
|
My.Application.ModulesActive = oMyApplication.ModulesActive
|
||||||
|
|
||||||
RaiseEvent Completed(sender, Nothing)
|
RaiseEvent Completed(sender, Nothing)
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CheckConnectivity(MyApplication As My.MyApplication)
|
Private Sub CheckConnectivity(MyApplication As My.MyApplication)
|
||||||
@ -94,7 +96,7 @@ Public Class ClassInit
|
|||||||
|
|
||||||
Private Sub InitializeUser(MyApplication As My.MyApplication)
|
Private Sub InitializeUser(MyApplication As My.MyApplication)
|
||||||
Try
|
Try
|
||||||
Dim oSql As String = My.Common.Queries.FNDD_MODULE_INIT(MyApplication.User.UserName)
|
Dim oSql As String = My.Queries.Common.FNDD_MODULE_INIT(Environment.UserName)
|
||||||
Dim oDatatable As DataTable = My.Database.GetDatatable(oSql)
|
Dim oDatatable As DataTable = My.Database.GetDatatable(oSql)
|
||||||
|
|
||||||
If oDatatable.Rows.Count <= 1 Then
|
If oDatatable.Rows.Count <= 1 Then
|
||||||
@ -148,7 +150,7 @@ Public Class ClassInit
|
|||||||
Dim oName As String = Row.Item("NAME").ToString
|
Dim oName As String = Row.Item("NAME").ToString
|
||||||
|
|
||||||
If Not MyApplication.Modules.ContainsKey(ModuleName) Then
|
If Not MyApplication.Modules.ContainsKey(ModuleName) Then
|
||||||
MyApplication.Modules.Item(ModuleName) = New ClassModuleState()
|
MyApplication.Modules.Item(ModuleName) = New DigitalData.Modules.ZooFlow.State.ModuleState()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Select Case oName
|
Select Case oName
|
||||||
|
|||||||
495
ZooFlow/ClassProfileFilter.vb
Normal file
495
ZooFlow/ClassProfileFilter.vb
Normal file
@ -0,0 +1,495 @@
|
|||||||
|
Imports System.Text.RegularExpressions
|
||||||
|
Imports DigitalData.Modules.Language.Utils
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
Imports DigitalData.Modules.Windows
|
||||||
|
Imports DigitalData.Modules.ZooFlow.Params
|
||||||
|
|
||||||
|
Public Class ClassProfileFilter
|
||||||
|
Private _ProfileTable As DataTable
|
||||||
|
Private _ProcessTable As DataTable
|
||||||
|
Private _WindowTable As DataTable
|
||||||
|
Private _ControlTable As DataTable
|
||||||
|
Private _Profiles As List(Of ProfileData)
|
||||||
|
Private _DebugData As DebugData
|
||||||
|
Private _Logger As Logger
|
||||||
|
Private _Window As Window
|
||||||
|
|
||||||
|
Private _TreeView As New TreeView
|
||||||
|
|
||||||
|
' TODO: Fill this Class!!!! :D
|
||||||
|
Class DebugData
|
||||||
|
Public ProcessMatch As List(Of String)
|
||||||
|
Public ClipboardMatch As List(Of String)
|
||||||
|
Public WindowMatch As List(Of String)
|
||||||
|
Public WindowRegexMatch As List(Of String)
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public ReadOnly Property Profiles As List(Of ProfileData)
|
||||||
|
Get
|
||||||
|
Return _Profiles
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property DebugTree As TreeView
|
||||||
|
Get
|
||||||
|
Return _TreeView
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub New(LogConfig As LogConfig, ProfileDatatable As DataTable, ProcessTable As DataTable, WindowDatatable As DataTable, ControlDatatable As DataTable)
|
||||||
|
Try
|
||||||
|
_Logger = LogConfig.GetLogger()
|
||||||
|
_DebugData = New DebugData()
|
||||||
|
_ProfileTable = ProfileDatatable
|
||||||
|
_ProcessTable = ProcessTable
|
||||||
|
_WindowTable = WindowDatatable
|
||||||
|
_ControlTable = ControlDatatable
|
||||||
|
_Profiles = TransformProfiles()
|
||||||
|
_Window = New Window(LogConfig)
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
Throw ex
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function ToList() As List(Of ProfileData)
|
||||||
|
Return _Profiles
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function FindNode(ByVal Node As TreeNode, SearchTerm As String)
|
||||||
|
Dim oNode As TreeNode
|
||||||
|
For Each oNode In Node.Nodes
|
||||||
|
If oNode.Text = SearchTerm Then
|
||||||
|
Return oNode
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return Node
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GetLowestNode(ByVal Node As TreeNode) As TreeNode
|
||||||
|
If Node.GetNodeCount(False) = 1 Then
|
||||||
|
Return GetLowestNode(Node.Nodes.Item(0))
|
||||||
|
Else
|
||||||
|
Return Node
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function FilterProfilesByClipboardRegex(Profiles As List(Of ProfileData), ClipboardContents As String) As List(Of ProfileData)
|
||||||
|
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||||
|
For Each oProfile In Profiles
|
||||||
|
_Logger.Debug("Current Profile: {0}", oProfile.Name)
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim oRegex As New Regex(oProfile.Regex)
|
||||||
|
Dim oMatch = oRegex.Match(ClipboardContents)
|
||||||
|
If oMatch.Success Then
|
||||||
|
_Logger.Debug("FilterProfilesByClipboardRegex: Clipboard Regex Matched: {0}", ClipboardContents)
|
||||||
|
'TODO: Add Debug Data
|
||||||
|
oFilteredProfiles.Add(oProfile)
|
||||||
|
oProfile.IsMatched = True
|
||||||
|
Dim oNode As New TreeNode($"Profile: {oProfile.Name}")
|
||||||
|
oNode.ImageIndex = 0
|
||||||
|
Dim f = New Font("Tahoma", 9, FontStyle.Bold)
|
||||||
|
oNode.NodeFont = f
|
||||||
|
_TreeView.Nodes.Add(oNode)
|
||||||
|
Dim oSubnode As New TreeNode($"MATCH on Global Clipboard Regex: {oProfile.Regex}")
|
||||||
|
oSubnode.ImageIndex = 1
|
||||||
|
oSubnode.Tag = oProfile.Name & "-REGEX"
|
||||||
|
oNode.Nodes.Add(oSubnode)
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", oProfile.Regex, ClipboardContents)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oFilteredProfiles
|
||||||
|
End Function
|
||||||
|
Public Function FilterProfilesByProcess(Profiles As List(Of ProfileData), CurrentProcessName As String) As List(Of ProfileData)
|
||||||
|
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||||
|
Try
|
||||||
|
For Each oProfile In Profiles
|
||||||
|
Dim oGuid = oProfile.Guid
|
||||||
|
|
||||||
|
If oProfile.IsMatched = False Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim oProcesses As New List(Of ProfileData.ProcessData)
|
||||||
|
For Each oProcessDef As ProfileData.ProcessData In oProfile.Processes
|
||||||
|
If oProcessDef.ProfileId <> oGuid Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
_Logger.Debug($"FilterProfilesByProcess: Checking Profile: {oProfile.Name} ...")
|
||||||
|
If oProcessDef.ProcessName.ToLower = CurrentProcessName.ToLower Then
|
||||||
|
_Logger.Debug($"Yes...Processname Matched: {oProcessDef.ProcessName}")
|
||||||
|
'oProfile.MATCH_PROCESSNAME = $"Processname Matched: {oProfile.ProcessName}"
|
||||||
|
'TODO: Add Debug Data
|
||||||
|
oFilteredProfiles.Add(oProfile)
|
||||||
|
oProfile.MatchedProcessID = oProcessDef.Guid
|
||||||
|
oProcessDef.IsMatched = True
|
||||||
|
oProcesses.Add(oProcessDef)
|
||||||
|
oProfile.IsMatched = True
|
||||||
|
oProfile.MatchedProcessID = oProcessDef.Guid
|
||||||
|
Dim oParentNode As TreeNode
|
||||||
|
Dim oExit = False
|
||||||
|
For Each oTreeNode As TreeNode In _TreeView.Nodes
|
||||||
|
For Each oNodes As TreeNode In oTreeNode.Nodes
|
||||||
|
If oExit = True Then Exit For
|
||||||
|
If oNodes.Tag = oProfile.Name & "-REGEX" Then
|
||||||
|
oParentNode = oNodes
|
||||||
|
oExit = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not IsNothing(oParentNode) Then
|
||||||
|
Dim oNode As New TreeNode($"MATCH on Process: {oProcessDef.ProcessName}")
|
||||||
|
oNode.ImageIndex = 4
|
||||||
|
oNode.Tag = oProfile.Name & "-PROCESS"
|
||||||
|
oParentNode.Nodes.Add(oNode)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If oFilteredProfiles.Count > 0 Then
|
||||||
|
oProfile.Processes = oProcesses
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oFilteredProfiles
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Unexpected error in FilterProfilesByProcess...")
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Public Function FilterWindowsByWindowTitleRegex(Profiles As List(Of ProfileData), WindowTitle As String) As List(Of ProfileData)
|
||||||
|
Dim oProfiles As New List(Of ProfileData)
|
||||||
|
|
||||||
|
For Each oProfile As ProfileData In Profiles
|
||||||
|
_Logger.Debug("Checking WindowDefinition for profile: {0}...", oProfile.Name)
|
||||||
|
If oProfile.IsMatched = False Then Continue For
|
||||||
|
Dim oWindows As New List(Of ProfileData.WindowData)
|
||||||
|
|
||||||
|
For Each oWindowDef As ProfileData.WindowData In oProfile.Windows
|
||||||
|
If oWindowDef.WindowProcessID <> oProfile.MatchedProcessID Then Continue For
|
||||||
|
Try
|
||||||
|
If oWindowDef.Regex = String.Empty Then
|
||||||
|
oProfile.MatchedWindowID = oWindowDef.Guid
|
||||||
|
oWindowDef.IsMatched = True
|
||||||
|
oWindows.Add(oWindowDef)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oRegex As New Regex(oWindowDef.Regex)
|
||||||
|
Dim oMatch = oRegex.Match(WindowTitle)
|
||||||
|
|
||||||
|
If oMatch.Success Then
|
||||||
|
_Logger.Debug("MATCH on WindowTitle: {0}", WindowTitle)
|
||||||
|
'TODO: Add Debug Data
|
||||||
|
oProfile.MatchedWindowID = oWindowDef.Guid
|
||||||
|
oWindowDef.IsMatched = True
|
||||||
|
oWindows.Add(oWindowDef)
|
||||||
|
Dim olowestNode As TreeNode = Node_Get_Lowest_Node(oProfile.Name & "-REGEX")
|
||||||
|
If Not IsNothing(olowestNode) Then
|
||||||
|
Dim oNode As New TreeNode($"MATCH on WindowTitle: [{WindowTitle}]")
|
||||||
|
oNode.ImageIndex = 3
|
||||||
|
oNode.Tag = oProfile.Name & "-WINDOW"
|
||||||
|
olowestNode.Nodes.Add(oNode)
|
||||||
|
End If
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", oWindowDef.Regex, WindowTitle)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
If oWindows.Count > 0 Then
|
||||||
|
oProfile.Windows = oWindows
|
||||||
|
oProfile.IsMatched = True
|
||||||
|
oProfiles.Add(oProfile)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oProfiles
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function FilterWindowsByWindowClipboardRegex(Profiles As List(Of ProfileData), ClipboardContents As String) As List(Of ProfileData)
|
||||||
|
Dim oProfiles As New List(Of ProfileData)
|
||||||
|
|
||||||
|
For Each oProfile As ProfileData In Profiles
|
||||||
|
_Logger.Debug("Current Profile: {0}", oProfile.Name)
|
||||||
|
|
||||||
|
Dim oWindows As New List(Of ProfileData.WindowData)
|
||||||
|
|
||||||
|
For Each w As ProfileData.WindowData In oProfile.Windows
|
||||||
|
Try
|
||||||
|
If w.Regex = String.Empty Then
|
||||||
|
oWindows.Add(w)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oRegex As New Regex(w.Regex)
|
||||||
|
Dim oMatch = oRegex.Match(ClipboardContents)
|
||||||
|
|
||||||
|
If oMatch.Success Then
|
||||||
|
_Logger.Debug("Window Clipboard Regex Matched: {0}", ClipboardContents)
|
||||||
|
Dim oResult As TreeNode
|
||||||
|
For Each oTreeNode In _TreeView.Nodes
|
||||||
|
If Not IsNothing(oResult) Then Exit For
|
||||||
|
If oTreeNode.Tag = oProfile.Name & "-REGEX" Then
|
||||||
|
oResult = oTreeNode
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Next
|
||||||
|
If Not IsNothing(oResult) Then
|
||||||
|
Dim oNode As New TreeNode($"MATCH on WINDOW Clipboard Regex: [{w.Regex}]")
|
||||||
|
oNode.ImageIndex = 2
|
||||||
|
oNode.Tag = oProfile.Name & "-WINDOW_REGEX"
|
||||||
|
Dim olowestNode As TreeNode = GetLowestNode(oResult)
|
||||||
|
olowestNode.Nodes.Add(oNode)
|
||||||
|
End If
|
||||||
|
|
||||||
|
oWindows.Add(w)
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", w.Regex, ClipboardContents)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
If oWindows.Count > 0 Then
|
||||||
|
oProfile.Windows = oWindows
|
||||||
|
oProfiles.Add(oProfile)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oProfiles
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function FilterProfilesByFocusedControl(Profiles As List(Of ProfileData), ClipboardContents As String, ControlFocusresult As String) As List(Of ProfileData)
|
||||||
|
Dim oWindow As Window.WindowInfo
|
||||||
|
Dim oFocusedControl As Window.WindowInfo
|
||||||
|
Dim oFocusedControlName As String = String.Empty
|
||||||
|
|
||||||
|
Try
|
||||||
|
oWindow = _Window.GetWindowInfo()
|
||||||
|
oFocusedControl = _Window.GetFocusedControl(oWindow.hWnd)
|
||||||
|
|
||||||
|
If oFocusedControl Is Nothing Then
|
||||||
|
_Logger.Info("Could not get FocusedControl in Window (Old method) {0}", oWindow.WindowTitle)
|
||||||
|
oFocusedControlName = String.Empty
|
||||||
|
Else
|
||||||
|
oFocusedControlName = oFocusedControl.ControlName
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Error while getting Focused control (Old method)")
|
||||||
|
_Logger.Error(ex)
|
||||||
|
oFocusedControlName = String.Empty
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||||
|
|
||||||
|
For Each oProfileMatchedSofar In Profiles
|
||||||
|
If oProfileMatchedSofar.IsMatched = False Then Continue For
|
||||||
|
|
||||||
|
_Logger.Debug("Checking ControlDefiniotion on profile: {0}", oProfileMatchedSofar.Name)
|
||||||
|
If oProfileMatchedSofar.Controls.Count = 0 Then
|
||||||
|
oFilteredProfiles.Add(oProfileMatchedSofar)
|
||||||
|
|
||||||
|
Dim oNode As New TreeNode($"No Controls configured!")
|
||||||
|
oNode.ImageIndex = 2
|
||||||
|
oNode.ForeColor = Color.Blue
|
||||||
|
oNode.Tag = oProfileMatchedSofar.Name & "-NOCONTROLCONFIG"
|
||||||
|
Dim f = New Font("Tahoma", 10, FontStyle.Bold)
|
||||||
|
oNode.NodeFont = f
|
||||||
|
_TreeView.Nodes.Add(oNode)
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oControls As New List(Of ProfileData.ControlData)
|
||||||
|
|
||||||
|
For Each oControlDefinition In oProfileMatchedSofar.Controls
|
||||||
|
Try
|
||||||
|
If oControlDefinition.WindowId <> oProfileMatchedSofar.MatchedWindowID Then Continue For
|
||||||
|
_Logger.Debug($"Working on ControlDefinition: {oControlDefinition.Guid}-{oControlDefinition.ControlName}...")
|
||||||
|
If oControlDefinition.Regex = String.Empty Then
|
||||||
|
oProfileMatchedSofar.MatchedControlID = oControlDefinition.Guid
|
||||||
|
oControlDefinition.IsMatched = True
|
||||||
|
oControls.Add(oControlDefinition)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
'Dim oResult As TreeNode
|
||||||
|
'For Each oTreeNode In CurrMatchTreeView.Nodes
|
||||||
|
' oResult = NodeFind(oTreeNode, $"Global Clipboard Regex Matched [{oProfile.Regex}]")
|
||||||
|
'Next
|
||||||
|
'Dim oNode As TreeNode
|
||||||
|
Dim oNodeCaption As String
|
||||||
|
'Dim oAddNode As Boolean = False
|
||||||
|
Dim oRegex As New Regex(oControlDefinition.Regex)
|
||||||
|
|
||||||
|
Dim oFocusedControlResult As String = ""
|
||||||
|
|
||||||
|
If oControlDefinition.AutomationId <> String.Empty And oControlDefinition.ControlName = String.Empty Then
|
||||||
|
_Logger.Debug($"AutomationID should be used...")
|
||||||
|
If Not IsNothing(ControlFocusresult) Then
|
||||||
|
If ControlFocusresult <> String.Empty Then
|
||||||
|
_Logger.Debug($"AutomationID will be used...")
|
||||||
|
oFocusedControlResult = ControlFocusresult
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ElseIf oControlDefinition.AutomationId = String.Empty And oControlDefinition.ControlName <> String.Empty Then
|
||||||
|
_Logger.Debug($"ControlName should be used...")
|
||||||
|
If Not IsNothing(oFocusedControlName) Then
|
||||||
|
If oFocusedControlName <> String.Empty Then
|
||||||
|
_Logger.Debug($"ControlName will be used...")
|
||||||
|
oFocusedControlResult = oFocusedControlName
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
If oFocusedControlResult <> String.Empty Then
|
||||||
|
Dim oControlRegex As New Regex(oControlDefinition.Regex)
|
||||||
|
Dim oControlMatch = oRegex.Match(oFocusedControlResult)
|
||||||
|
|
||||||
|
If oControlMatch.Success Then
|
||||||
|
_Logger.Debug($"MATCH on Focused Control [{oFocusedControlResult}] with Regex [{oControlDefinition.Regex}]")
|
||||||
|
oProfileMatchedSofar.IsMatched = True
|
||||||
|
oProfileMatchedSofar.MatchedControlID = oControlDefinition.Guid
|
||||||
|
oControlDefinition.IsMatched = True
|
||||||
|
oControls.Add(oControlDefinition)
|
||||||
|
Dim olowestNode As TreeNode = Node_Get_Lowest_Node(oProfileMatchedSofar.Name & "-REGEX")
|
||||||
|
If Not IsNothing(olowestNode) Then
|
||||||
|
Dim oNode As New TreeNode($"MATCH on Focused Control [{oFocusedControlResult}] with Regex [{oControlDefinition.Regex}]")
|
||||||
|
oNode.ImageIndex = 2
|
||||||
|
oNode.Tag = oProfileMatchedSofar.Name & "-CONTROL"
|
||||||
|
olowestNode.Nodes.Add(oNode)
|
||||||
|
End If
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", oControlDefinition.Regex, oFocusedControlName)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
If oControls.Count > 0 Then
|
||||||
|
oProfileMatchedSofar.Controls = oControls
|
||||||
|
oFilteredProfiles.Add(oProfileMatchedSofar)
|
||||||
|
Else
|
||||||
|
Dim olowestNode As TreeNode = Node_Get_Lowest_Node(oProfileMatchedSofar.Name & "-REGEX")
|
||||||
|
If Not IsNothing(olowestNode) Then
|
||||||
|
Dim oNode As New TreeNode($"NO MATCHES on Focused Control, Please check the Config")
|
||||||
|
oNode.ImageIndex = 2
|
||||||
|
oNode.Tag = oProfileMatchedSofar.Name & "-CONTROLNoMatch"
|
||||||
|
olowestNode.Nodes.Add(oNode)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oFilteredProfiles
|
||||||
|
End Function
|
||||||
|
Private Function Node_Get_Lowest_Node(NodeTag As String) As TreeNode
|
||||||
|
Dim oExit = False
|
||||||
|
Dim oParentNode As TreeNode
|
||||||
|
For Each oTreeNode As TreeNode In _TreeView.Nodes
|
||||||
|
For Each oNodes As TreeNode In oTreeNode.Nodes
|
||||||
|
If oExit = True Then Exit For
|
||||||
|
If oNodes.Tag = NodeTag Then
|
||||||
|
oParentNode = oNodes
|
||||||
|
oExit = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
Dim olowestNode As TreeNode = GetLowestNode(oParentNode)
|
||||||
|
|
||||||
|
Return olowestNode
|
||||||
|
End Function
|
||||||
|
Public Function ClearNotMatchedProfiles(Profiles As List(Of ProfileData)) As List(Of ProfileData)
|
||||||
|
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||||
|
For Each oProfile In Profiles
|
||||||
|
If oProfile.IsMatched Then
|
||||||
|
oFilteredProfiles.Add(oProfile)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return oFilteredProfiles
|
||||||
|
End Function
|
||||||
|
Private Function TransformProfiles() As List(Of ProfileData)
|
||||||
|
Dim oList As New List(Of ProfileData)
|
||||||
|
|
||||||
|
For Each oRow As DataRow In _ProfileTable.Rows
|
||||||
|
Dim oProfileId = oRow.Item("GUID")
|
||||||
|
Dim oProcessList As List(Of ProfileData.ProcessData) = TransformProcesses(oProfileId, _ProcessTable)
|
||||||
|
Dim oWindowList As List(Of ProfileData.WindowData) = TransformWindows(oProfileId, _WindowTable)
|
||||||
|
Dim oControlList As List(Of ProfileData.ControlData) = TransformControls(oProfileId, _ControlTable)
|
||||||
|
|
||||||
|
oList.Add(New ProfileData() With {
|
||||||
|
.Guid = oRow.Item("GUID"),
|
||||||
|
.Regex = NotNull(oRow.Item("REGEX_EXPRESSION"), String.Empty),
|
||||||
|
.Name = NotNull(oRow.Item("NAME"), String.Empty),
|
||||||
|
.Comment = NotNull(oRow.Item("COMMENT"), String.Empty),
|
||||||
|
.ProfileType = NotNull(oRow.Item("PROFILE_TYPE"), String.Empty),
|
||||||
|
.Processes = oProcessList,
|
||||||
|
.Windows = oWindowList,
|
||||||
|
.Controls = oControlList
|
||||||
|
})
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function TransformControls(ProfileId As Integer, ControlDatatable As DataTable) As List(Of ProfileData.ControlData)
|
||||||
|
Dim oControlList As New List(Of ProfileData.ControlData)
|
||||||
|
|
||||||
|
For Each oRow As DataRow In ControlDatatable.Rows
|
||||||
|
If oRow.Item("PROFILE_ID") = ProfileId Then
|
||||||
|
oControlList.Add(New ProfileData.ControlData() With {
|
||||||
|
.Guid = oRow.Item("GUID"),
|
||||||
|
.Description = NotNull(oRow.Item("DESCRIPTION"), String.Empty),
|
||||||
|
.Regex = NotNull(oRow.Item("REGEX"), String.Empty),
|
||||||
|
.AutomationId = NotNull(oRow.Item("AUTOMATION_ID"), String.Empty),
|
||||||
|
.WindowId = oRow.Item("WINDOW_ID")
|
||||||
|
})
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oControlList
|
||||||
|
End Function
|
||||||
|
Private Function TransformProcesses(ProfileId As Integer, ProcessDatatable As DataTable) As List(Of ProfileData.ProcessData)
|
||||||
|
Dim oProcessList As New List(Of ProfileData.ProcessData)
|
||||||
|
|
||||||
|
For Each oRow As DataRow In ProcessDatatable.Rows
|
||||||
|
oProcessList.Add(New ProfileData.ProcessData() With {
|
||||||
|
.Guid = oRow.Item("GUID"),
|
||||||
|
.ProfileId = oRow.Item("PROFILE_ID"),
|
||||||
|
.ProcessName = NotNull(oRow.Item("PROC_NAME"), String.Empty)
|
||||||
|
})
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oProcessList
|
||||||
|
End Function
|
||||||
|
Private Function TransformWindows(ProfileId As Integer, WindowDatatable As DataTable) As List(Of ProfileData.WindowData)
|
||||||
|
Dim oWindowList As New List(Of ProfileData.WindowData)
|
||||||
|
|
||||||
|
For Each oRow As DataRow In WindowDatatable.Rows
|
||||||
|
oWindowList.Add(New ProfileData.WindowData() With {
|
||||||
|
.Guid = oRow.Item("GUID"),
|
||||||
|
.WindowProcessID = oRow.Item("PROCESS_ID"),
|
||||||
|
.Title = NotNull(oRow.Item("DESCRIPTION"), String.Empty),
|
||||||
|
.Regex = NotNull(oRow.Item("REGEX"), String.Empty),
|
||||||
|
.Sequence = NotNull(oRow.Item("SEQUENCE"), 0)
|
||||||
|
})
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oWindowList
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
8
ZooFlow/ClipboardWatcher/State.vb
Normal file
8
ZooFlow/ClipboardWatcher/State.vb
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Namespace ClipboardWatcher
|
||||||
|
Public Class State
|
||||||
|
Public UserProfiles As DataTable
|
||||||
|
Public ProfileProcesses As DataTable
|
||||||
|
Public ProfileWindows As DataTable
|
||||||
|
Public ProfileControls As DataTable
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
@ -1,3 +0,0 @@
|
|||||||
Public Class ClassCommon
|
|
||||||
Public Property Queries As New ClassCommonQueries
|
|
||||||
End Class
|
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
This file is automatically generated by Visual Studio .Net. It is
|
||||||
|
used to store generic object data source configuration information.
|
||||||
|
Renaming the file extension or editing the content of this file may
|
||||||
|
cause the file to be unrecognizable by the program.
|
||||||
|
-->
|
||||||
|
<GenericObjectDataSource DisplayName="ClassUserState" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||||
|
<TypeInfo>ZooFlow.State.ClassUserState, ZooFlow, Version=0.0.1.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
||||||
|
</GenericObjectDataSource>
|
||||||
@ -1,8 +1,9 @@
|
|||||||
DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
Imports DigitalData.Modules.Config
|
Imports DigitalData.Modules.Config
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
|
Imports DigitalData.Modules.ZooFlow
|
||||||
|
Imports ZooFlow.State
|
||||||
|
|
||||||
Namespace My
|
Namespace My
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@ -26,21 +28,19 @@ Namespace My
|
|||||||
Property LogConfig As LogConfig
|
Property LogConfig As LogConfig
|
||||||
Property MainForm As frmMain
|
Property MainForm As frmMain
|
||||||
Property Database As MSSQLServer
|
Property Database As MSSQLServer
|
||||||
|
Property Queries As New ClassQueries
|
||||||
Property Common As New ClassCommon
|
|
||||||
End Module
|
End Module
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Extends the My.Application Namespace to hold Application State
|
''' Extends the My.Application Namespace to hold Application State
|
||||||
''' Example: My.Application.User
|
''' Example: My.Application.User
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Partial Class MyApplication
|
Partial Friend Class MyApplication
|
||||||
' User Config
|
Public Property User As New State.UserState
|
||||||
Public User As New ClassUserState()
|
Public Property Service As New State.ServiceState
|
||||||
Public Service As New ClassServiceState()
|
Public Property Modules As New Dictionary(Of String, State.ModuleState)
|
||||||
Public Modules As New Dictionary(Of String, ClassModuleState)
|
Public Property ModulesActive As New List(Of String)
|
||||||
Public ModulesActive As New List(Of String)
|
Public Property ClipboardWatcher As New ClipboardWatcher.State
|
||||||
End Class
|
End Class
|
||||||
End Namespace
|
End Namespace
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
17
ZooFlow/Queries/ClassClipboardWatcherQueries.vb
Normal file
17
ZooFlow/Queries/ClassClipboardWatcherQueries.vb
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Public Class ClassClipboardWatcherQueries
|
||||||
|
Public Function VWCW_USER_PROFILE(UserId As Integer) As String
|
||||||
|
Return $"SELECT DISTINCT GUID, NAME, REGEX_EXPRESSION, COMMENT, PROC_NAME, PROFILE_TYPE FROM VWCW_USER_PROFILE WHERE USER_ID = {UserId} OR GROUP_ID IN (SELECT DISTINCT GUID FROM TBDD_GROUPS WHERE GUID IN (SELECT GROUP_ID FROM TBDD_GROUPS_USER WHERE USER_ID = {0}))"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function TBCW_PROFILE_PROCESS(UserId As Integer) As String
|
||||||
|
Return $"SELECT T.* FROM TBCW_PROFILE_PROCESS T, VWCW_USER_PROFILE T1 WHERE T.PROFILE_ID = T1.GUID AND T1.USER_ID = {UserId}"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function VWCW_PROFILE_REL_WINDOW(UserId As Integer) As String
|
||||||
|
Return $"SELECT * FROM VWCW_PROFILE_REL_WINDOW WHERE USER_ID = {UserId}"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function VWCW_PROFILE_REL_CONTROL(UserId As Integer) As String
|
||||||
|
Return $"SELECT * FROM VWCW_PROFILE_REL_CONTROL WHERE USER_ID = {UserId}"
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
4
ZooFlow/Queries/ClassQueries.vb
Normal file
4
ZooFlow/Queries/ClassQueries.vb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Public Class ClassQueries
|
||||||
|
Public Property Common As New ClassCommonQueries
|
||||||
|
Public Property ClipboardWatcher As New ClassClipboardWatcherQueries
|
||||||
|
End Class
|
||||||
@ -1,5 +0,0 @@
|
|||||||
Public Class ClassModuleState
|
|
||||||
Public HasAccess As Boolean
|
|
||||||
Public IsAdmin As Boolean
|
|
||||||
Public LoggedIn As Integer
|
|
||||||
End Class
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
Public Class ClassServiceState
|
|
||||||
Public Property Online As Boolean = True
|
|
||||||
Public Property LastChecked As DateTime = DateTime.Now
|
|
||||||
End Class
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
Imports System.Threading
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Helper Class to hold User State
|
|
||||||
''' </summary>
|
|
||||||
Public Class ClassUserState
|
|
||||||
Public UserId As Integer
|
|
||||||
Public UserName As String
|
|
||||||
Public Surname As String
|
|
||||||
Public GivenName As String
|
|
||||||
Public ShortName As String
|
|
||||||
Public Email As String
|
|
||||||
Public MachineName As String
|
|
||||||
Public DateFormat As String
|
|
||||||
Public Language As String
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Initialize user object with values that can be read from the environment
|
|
||||||
''' </summary>
|
|
||||||
Public Sub New()
|
|
||||||
Language = Thread.CurrentThread.CurrentCulture.Name
|
|
||||||
UserName = Environment.UserName
|
|
||||||
MachineName = Environment.MachineName
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
@ -51,9 +51,11 @@
|
|||||||
<Reference Include="DevExpress.XtraBars.v18.1" />
|
<Reference Include="DevExpress.XtraBars.v18.1" />
|
||||||
<Reference Include="DevExpress.Sparkline.v18.1.Core" />
|
<Reference Include="DevExpress.Sparkline.v18.1.Core" />
|
||||||
<Reference Include="DevExpress.XtraEditors.v18.1" />
|
<Reference Include="DevExpress.XtraEditors.v18.1" />
|
||||||
|
<Reference Include="DevExpress.XtraGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||||
<Reference Include="DevExpress.XtraLayout.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
<Reference Include="DevExpress.XtraLayout.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||||
|
<Reference Include="DevExpress.XtraPrinting.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
@ -87,8 +89,10 @@
|
|||||||
<Compile Include="Base\BaseClass.vb" />
|
<Compile Include="Base\BaseClass.vb" />
|
||||||
<Compile Include="ClassClipboardWatcher.vb" />
|
<Compile Include="ClassClipboardWatcher.vb" />
|
||||||
<Compile Include="ClassInit.vb" />
|
<Compile Include="ClassInit.vb" />
|
||||||
<Compile Include="Common\ClassCommon.vb" />
|
<Compile Include="ClassProfileFilter.vb" />
|
||||||
<Compile Include="Common\ClassCommonQueries.vb" />
|
<Compile Include="ClipboardWatcher\State.vb" />
|
||||||
|
<Compile Include="Queries\ClassClipboardWatcherQueries.vb" />
|
||||||
|
<Compile Include="Queries\ClassCommonQueries.vb" />
|
||||||
<Compile Include="Config\ClassConfig.vb" />
|
<Compile Include="Config\ClassConfig.vb" />
|
||||||
<Compile Include="ClassConstants.vb" />
|
<Compile Include="ClassConstants.vb" />
|
||||||
<Compile Include="ClassEnvironment.vb" />
|
<Compile Include="ClassEnvironment.vb" />
|
||||||
@ -132,9 +136,7 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
<Compile Include="MyApplication.vb" />
|
<Compile Include="MyApplication.vb" />
|
||||||
<Compile Include="State\ClassModuleState.vb" />
|
<Compile Include="Queries\ClassQueries.vb" />
|
||||||
<Compile Include="State\ClassServiceState.vb" />
|
|
||||||
<Compile Include="State\ClassUserState.vb" />
|
|
||||||
<EmbeddedResource Include="frmConfigDatabase.resx">
|
<EmbeddedResource Include="frmConfigDatabase.resx">
|
||||||
<DependentUpon>frmConfigDatabase.vb</DependentUpon>
|
<DependentUpon>frmConfigDatabase.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
@ -162,6 +164,7 @@
|
|||||||
<DependentUpon>Resources.resx</DependentUpon>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<None Include="My Project\DataSources\ZooFlow.State.ClassUserState.datasource" />
|
||||||
<None Include="My Project\Settings.settings">
|
<None Include="My Project\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
@ -206,7 +209,20 @@
|
|||||||
<Project>{903B2D7D-3B80-4BE9-8713-7447B704E1B0}</Project>
|
<Project>{903B2D7D-3B80-4BE9-8713-7447B704E1B0}</Project>
|
||||||
<Name>Logging</Name>
|
<Name>Logging</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Modules\ZooFlow\ZooFlow.vbproj">
|
||||||
|
<Project>{81cac44f-3711-4c8f-ae98-e02a7448782a}</Project>
|
||||||
|
<Name>ZooFlow</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Products.ClipboardWatcher\ClipboardWatcher.vbproj">
|
||||||
|
<Project>{1fba063d-60a5-4fc8-a529-a3d1ecfd640c}</Project>
|
||||||
|
<Name>ClipboardWatcher</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Windows\Windows.vbproj">
|
||||||
|
<Project>{5efaef9b-90b9-4f05-9f70-f79ad77fff86}</Project>
|
||||||
|
<Name>Windows</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|||||||
30
ZooFlow/frmMain.Designer.vb
generated
30
ZooFlow/frmMain.Designer.vb
generated
@ -31,6 +31,7 @@
|
|||||||
Me.ApplicationMenu = New DevExpress.XtraBars.Ribbon.ApplicationMenu(Me.components)
|
Me.ApplicationMenu = New DevExpress.XtraBars.Ribbon.ApplicationMenu(Me.components)
|
||||||
Me.ButtonSettings = New DevExpress.XtraBars.BarButtonItem()
|
Me.ButtonSettings = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.ButtonExit = New DevExpress.XtraBars.BarButtonItem()
|
Me.ButtonExit = New DevExpress.XtraBars.BarButtonItem()
|
||||||
|
Me.SkinDropDownButtonItem1 = New DevExpress.XtraBars.SkinDropDownButtonItem()
|
||||||
Me.ribbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
Me.ribbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||||
Me.ribbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.ribbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
Me.NotifyIconMain = New System.Windows.Forms.NotifyIcon(Me.components)
|
Me.NotifyIconMain = New System.Windows.Forms.NotifyIcon(Me.components)
|
||||||
@ -42,7 +43,8 @@
|
|||||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
Me.BeendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.BeendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.ToastNotificationsManager = New DevExpress.XtraBars.ToastNotifications.ToastNotificationsManager(Me.components)
|
Me.ToastNotificationsManager = New DevExpress.XtraBars.ToastNotifications.ToastNotificationsManager(Me.components)
|
||||||
Me.SkinDropDownButtonItem1 = New DevExpress.XtraBars.SkinDropDownButtonItem()
|
Me.TimerRefreshData = New System.Windows.Forms.Timer(Me.components)
|
||||||
|
Me.ImageListDebugTree = New System.Windows.Forms.ImageList(Me.components)
|
||||||
CType(Me.ribbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.ribbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.ApplicationMenu, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.ApplicationMenu, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.ContextMenuStripMain.SuspendLayout()
|
Me.ContextMenuStripMain.SuspendLayout()
|
||||||
@ -76,16 +78,21 @@
|
|||||||
'
|
'
|
||||||
Me.ButtonSettings.Caption = "Einstellungen"
|
Me.ButtonSettings.Caption = "Einstellungen"
|
||||||
Me.ButtonSettings.Id = 1
|
Me.ButtonSettings.Id = 1
|
||||||
Me.ButtonSettings.ImageOptions.Image = CType(resources.GetObject("BarButtonItem1.ImageOptions.Image"), System.Drawing.Image)
|
Me.ButtonSettings.ImageOptions.Image = CType(resources.GetObject("ButtonSettings.ImageOptions.Image"), System.Drawing.Image)
|
||||||
Me.ButtonSettings.Name = "ButtonSettings"
|
Me.ButtonSettings.Name = "ButtonSettings"
|
||||||
'
|
'
|
||||||
'ButtonExit
|
'ButtonExit
|
||||||
'
|
'
|
||||||
Me.ButtonExit.Caption = "Beenden"
|
Me.ButtonExit.Caption = "Beenden"
|
||||||
Me.ButtonExit.Id = 2
|
Me.ButtonExit.Id = 2
|
||||||
Me.ButtonExit.ImageOptions.Image = CType(resources.GetObject("BarButtonItem2.ImageOptions.Image"), System.Drawing.Image)
|
Me.ButtonExit.ImageOptions.Image = CType(resources.GetObject("ButtonExit.ImageOptions.Image"), System.Drawing.Image)
|
||||||
Me.ButtonExit.Name = "ButtonExit"
|
Me.ButtonExit.Name = "ButtonExit"
|
||||||
'
|
'
|
||||||
|
'SkinDropDownButtonItem1
|
||||||
|
'
|
||||||
|
Me.SkinDropDownButtonItem1.Id = 3
|
||||||
|
Me.SkinDropDownButtonItem1.Name = "SkinDropDownButtonItem1"
|
||||||
|
'
|
||||||
'ribbonPage1
|
'ribbonPage1
|
||||||
'
|
'
|
||||||
Me.ribbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.ribbonPageGroup1})
|
Me.ribbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.ribbonPageGroup1})
|
||||||
@ -152,10 +159,19 @@
|
|||||||
"ncididunt ut labore et dolore magna aliqua.", "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor i" &
|
"ncididunt ut labore et dolore magna aliqua.", "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor i" &
|
||||||
"ncididunt ut labore et dolore magna aliqua.", DevExpress.XtraBars.ToastNotifications.ToastNotificationTemplate.Text01)})
|
"ncididunt ut labore et dolore magna aliqua.", DevExpress.XtraBars.ToastNotifications.ToastNotificationTemplate.Text01)})
|
||||||
'
|
'
|
||||||
'SkinDropDownButtonItem1
|
'TimerRefreshData
|
||||||
'
|
'
|
||||||
Me.SkinDropDownButtonItem1.Id = 3
|
Me.TimerRefreshData.Interval = 5000
|
||||||
Me.SkinDropDownButtonItem1.Name = "SkinDropDownButtonItem1"
|
'
|
||||||
|
'ImageListDebugTree
|
||||||
|
'
|
||||||
|
Me.ImageListDebugTree.ImageStream = CType(resources.GetObject("ImageListDebugTree.ImageStream"), System.Windows.Forms.ImageListStreamer)
|
||||||
|
Me.ImageListDebugTree.TransparentColor = System.Drawing.Color.Transparent
|
||||||
|
Me.ImageListDebugTree.Images.SetKeyName(0, "WorkItem_32xMD.png")
|
||||||
|
Me.ImageListDebugTree.Images.SetKeyName(1, "key_16xLG.png")
|
||||||
|
Me.ImageListDebugTree.Images.SetKeyName(2, "ResultstoFile_9946.png")
|
||||||
|
Me.ImageListDebugTree.Images.SetKeyName(3, "WindowsForm_817.ico")
|
||||||
|
Me.ImageListDebugTree.Images.SetKeyName(4, "process_16xMD.png")
|
||||||
'
|
'
|
||||||
'frmMain
|
'frmMain
|
||||||
'
|
'
|
||||||
@ -193,4 +209,6 @@
|
|||||||
Friend WithEvents ButtonSettings As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents ButtonSettings As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents ButtonExit As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents ButtonExit As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents SkinDropDownButtonItem1 As DevExpress.XtraBars.SkinDropDownButtonItem
|
Friend WithEvents SkinDropDownButtonItem1 As DevExpress.XtraBars.SkinDropDownButtonItem
|
||||||
|
Friend WithEvents TimerRefreshData As Timer
|
||||||
|
Friend WithEvents ImageListDebugTree As ImageList
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -121,7 +121,7 @@
|
|||||||
<value>702, 17</value>
|
<value>702, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="BarButtonItem1.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="ButtonSettings.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACt0RVh0VGl0
|
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACt0RVh0VGl0
|
||||||
bGUAU2V0dXA7Q3VzdG9taXo7RGVzaWduO1NldHRpbmc7UHJvcGVydDgftSEAAApzSURBVFhHnVdnVFVX
|
bGUAU2V0dXA7Q3VzdG9taXo7RGVzaWduO1NldHRpbmc7UHJvcGVydDgftSEAAApzSURBVFhHnVdnVFVX
|
||||||
@ -172,7 +172,7 @@
|
|||||||
UVnFoWBr+TznI5VPNdUJyXP+R5GkfwMPT3OfchuhBQAAAABJRU5ErkJggg==
|
UVnFoWBr+TznI5VPNdUJyXP+R5GkfwMPT3OfchuhBQAAAABJRU5ErkJggg==
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BarButtonItem2.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="ButtonExit.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACN0RVh0VGl0
|
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACN0RVh0VGl0
|
||||||
bGUAQ2FuY2VsO1N0b3A7RXhpdDtCYXJzO1JpYmJvbjtMlpayAAALFUlEQVRYR5WXB1RVxxaGx/dSfEGM
|
bGUAQ2FuY2VsO1N0b3A7RXhpdDtCYXJzO1JpYmJvbjtMlpayAAALFUlEQVRYR5WXB1RVxxaGx/dSfEGM
|
||||||
@ -369,4 +369,66 @@
|
|||||||
<metadata name="ToastNotificationsManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="ToastNotificationsManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>503, 17</value>
|
<value>503, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="TimerRefreshData.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>847, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="ImageListDebugTree.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>996, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<data name="ImageListDebugTree.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABU
|
||||||
|
CwAAAk1TRnQBSQFMAgEBBQEAATABAAEwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
|
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
|
||||||
|
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
|
||||||
|
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
|
||||||
|
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
|
||||||
|
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
|
||||||
|
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
|
||||||
|
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
|
||||||
|
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
|
||||||
|
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
|
||||||
|
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
|
||||||
|
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
|
||||||
|
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
|
||||||
|
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
|
||||||
|
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
|
||||||
|
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
|
||||||
|
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
|
||||||
|
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
|
||||||
|
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
|
||||||
|
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
|
||||||
|
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
|
||||||
|
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
|
||||||
|
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
|
||||||
|
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
|
||||||
|
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
|
||||||
|
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/4UABvQ5AAH0AfAB9AJt
|
||||||
|
AfQB8AH0NwAB9AHwARQBbQITAW0BFAHwAfQ2AAL0AW0BkgL0AZIBbQP0NQAB9AFtAeoB9AKSAfQBEwFt
|
||||||
|
AfQB8AH0NAAB9AFtAeoB9AKSAfQBEwFtAbwBFAHwAfQzAAL0AW0BkgL0AZIBbQH0AQcBbQL0MwAB9AHw
|
||||||
|
ARQBbQITAW0BFAHwAfQBEwFtAfQ0AAH0AfAB9AJtAfQB8AHxAfQBEwFtAfQ1AAP0AbwBBwL0AZIBbQL0
|
||||||
|
NgAB9AHwARQBbQITAW0BFAHwAfQ3AAH0AfAB9AJtAfQB8AH0OQAG9JcADPQZAAH0GgAB9AoUAfQUAAL0
|
||||||
|
AgAD9BkAAfQKFAH0AQAP9AMAAfQBvAHtAvQB8AEUAfQZAAH0AhQG9AIUAfQBAAH0DRQB9AQAAfQB6gEU
|
||||||
|
AbwCFAH0BwAF9AEABvQGAAH0AhQG9AIUAfQBAAH0ARQL9AEUAfQEAAH/AfQEFAH0Af8GAAH0ARQB9AEU
|
||||||
|
AvQB8wFtAhQBbQHzAfQFAAH0AhQG9AIUAfQBAAH0ARQB9AMUBfQBFAH0ARQB9AQAAfQB8AQUARMB9AH/
|
||||||
|
BAAC9AEUAfQBFAL0AW0EFAFtAfQFAAH0AhQG9AIUAfQBAAH0ARQF9AUUAfQBFAH0AwAB9AHwBhQBEwP0
|
||||||
|
AgAB9AcUARMC8gIUAfIFAAH0AhQG9AIUAfQBAAH0ARQL9AEUAfQDAAH0AQcCFAETBhQB8wH0AQAB9AcU
|
||||||
|
ARMC8gIUAfQDAAP0Ae8BFAb0AhQB9AEAAfQBFAH0AxQF9AEUAfQBFAH0BAAE9AETBBQBbQH0AgAH9AFt
|
||||||
|
BBQBbQH0AwAB9AG0AYoBtAHvBPQDFAHsAfQBAAH0ARQF9AUUAfQBFAH0BwAB/wH0ARMCFAHsAfQJAAH0
|
||||||
|
AfMBbQIUAW0B8wH0AQAE9AG0AYoBtAT0AhQB7AH0Af8BAAH0ARQL9AEUAfQIAAH0AbwBFAHsAfQLAAb0
|
||||||
|
AgAB9AaKAbQB7wMUAewB9AH/AgAB9A0UAfQJAAH0AewB9BQAAfQGigG0Ae8CFAHsAfQB/wMAAfQNFAH0
|
||||||
|
CQAC9BUABPQBtAGKAbQF9AH/BAAP9CIAAfQBtAGKAbQB9AH/OgAE9AH/GQABQgFNAT4HAAE+AwABKAMA
|
||||||
|
AUADAAEgAwABAQEAAQEGAAEBFgAD/wEAAv8GAAL/BgAB8AE/BgAB4AEfBgABwAEPBgABwAEHBgABwAED
|
||||||
|
BgABwAEBBgABwAEBBgABwAEBBgAB4AEBBgAB8AEBBgAB+AEBBgAB/AEDBgAB/gEHBgAC/wYABP8B8AEA
|
||||||
|
A/8BvwL/AfABAAL/AfMBHwL/AfABAAGAAQAB4AEfAv8B8AEAAYABAAHwAR8BwQEDAfABAAGAAQAB8AEP
|
||||||
|
AcABAQHwAQABgAEAAfABBwGAAQEB8AEAAYABAAHgAQEBgAEBAfABAAGAAQAB4AEAAYABAQHAAQABgAEA
|
||||||
|
AfABAQGAAQEBwAEAAYABAAH+AQMB/gEBAgABgAEAAf8BBwH/AQMBAAEBAYABAAH/AY8C/wEAAQMBgAEA
|
||||||
|
Af8BnwL/AQABBwGAAQAE/wHAB/8BwQP/Cw==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@ -1,10 +1,10 @@
|
|||||||
Imports System.ComponentModel
|
Imports DevExpress.XtraSplashScreen
|
||||||
Imports DevExpress.XtraSplashScreen
|
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.Filesystem
|
Imports DigitalData.Modules.Windows
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.ZooFlow
|
||||||
Imports DevExpress.LookAndFeel
|
Imports DevExpress.LookAndFeel
|
||||||
Imports ZooFlow.ClassConstants
|
Imports DigitalData.Products.ClipboardWatcher
|
||||||
|
Imports DigitalData.Modules.ZooFlow.Params
|
||||||
|
|
||||||
Partial Public Class frmMain
|
Partial Public Class frmMain
|
||||||
Private WithEvents FlowForm As frmFlowForm
|
Private WithEvents FlowForm As frmFlowForm
|
||||||
@ -16,7 +16,7 @@ Partial Public Class frmMain
|
|||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
' === Initialization ===
|
' === Initialization ===
|
||||||
Init = New ClassInit(My.LogConfig, Me)
|
Init = New ClassInit(My.LogConfig, Me)
|
||||||
AddHandler Init.Completed, AddressOf Init_Completed
|
AddHandler Init.Completed, AddressOf Init_Completed
|
||||||
@ -27,13 +27,25 @@ Partial Public Class frmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Init_Completed(sender As Object, e As EventArgs)
|
Private Sub Init_Completed(sender As Object, e As EventArgs)
|
||||||
' Initialization Complete
|
' === Initialization Complete ===
|
||||||
Loading = False
|
Loading = False
|
||||||
SplashScreenManager.CloseForm(False)
|
SplashScreenManager.CloseForm(False)
|
||||||
|
|
||||||
' Setup Flow Form
|
' === Setup Timers ===
|
||||||
|
AddHandler TimerRefreshData.Tick, AddressOf TimerRefreshData_Tick
|
||||||
|
TimerRefreshData.Enabled = True
|
||||||
|
|
||||||
|
' === Setup Flow Form ===
|
||||||
FlowForm = New frmFlowForm(My.Application.ModulesActive)
|
FlowForm = New frmFlowForm(My.Application.ModulesActive)
|
||||||
FlowForm.Show()
|
FlowForm.Show()
|
||||||
|
|
||||||
|
' === Load Data ===
|
||||||
|
RefreshData()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub TimerRefreshData_Tick(sender As Object, e As EventArgs)
|
||||||
|
RefreshData()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||||
@ -41,7 +53,53 @@ Partial Public Class frmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FlowForm_ClipboardChanged(sender As Object, e As IDataObject) Handles FlowForm.ClipboardChanged
|
Private Sub FlowForm_ClipboardChanged(sender As Object, e As IDataObject) Handles FlowForm.ClipboardChanged
|
||||||
MsgBox("Clipboard Changed!")
|
If My.Application.ClipboardWatcher.UserProfiles.Rows.Count = 0 Then
|
||||||
|
Logger.Warn("Clipboard Changed but no profiles configured!")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oProfileFilter As ClassProfileFilter
|
||||||
|
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 oClipboardContents As String = Clipboard.GetText()
|
||||||
|
|
||||||
|
Try
|
||||||
|
oProfileFilter = New ClassProfileFilter(My.LogConfig, My.Application.ClipboardWatcher.UserProfiles, My.Application.ClipboardWatcher.ProfileProcesses, My.Application.ClipboardWatcher.ProfileWindows, My.Application.ClipboardWatcher.ProfileControls)
|
||||||
|
|
||||||
|
oMatchingProfiles = oProfileFilter.Profiles
|
||||||
|
Logger.Debug("Profiles before filtering: {0}", oMatchingProfiles.Count)
|
||||||
|
oMatchingProfiles = oProfileFilter.FilterProfilesByClipboardRegex(oMatchingProfiles, oClipboardContents)
|
||||||
|
Logger.Debug("Profiles after FilterProfilesByClipboardRegex: {0}", oMatchingProfiles.Count)
|
||||||
|
oMatchingProfiles = oProfileFilter.FilterProfilesByProcess(oMatchingProfiles, oWindowInfo.ProcessName)
|
||||||
|
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)
|
||||||
|
Logger.Debug("Profiles after FilterProfilesByFocusedControl: {0}", oMatchingProfiles.Count)
|
||||||
|
oMatchingProfiles = oProfileFilter.ClearNotMatchedProfiles(oMatchingProfiles)
|
||||||
|
Logger.Debug("Profiles after ClearNotMatchedProfiles: {0}", oMatchingProfiles.Count)
|
||||||
|
oMatchingProfiles = oMatchingProfiles.ToList()
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox("Fehler beim Laden der Profile. Möglicherweise liegt ein Konfigurationsfehler vor.", MsgBoxStyle.Critical, Text)
|
||||||
|
Exit Sub
|
||||||
|
End Try
|
||||||
|
|
||||||
|
If oMatchingProfiles.Count = 0 Then
|
||||||
|
Logger.Warn("No matching Profiles found")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oEnvironment As New Environment() With {
|
||||||
|
.User = My.Application.User,
|
||||||
|
.Modules = My.Application.Modules
|
||||||
|
}
|
||||||
|
Dim oParams As New ClipboardWatcherParams() With {
|
||||||
|
.MatchingProfiles = oMatchingProfiles
|
||||||
|
}
|
||||||
|
Dim oForm As New frmMatch(My.LogConfig, oEnvironment, oParams)
|
||||||
|
oForm.Show()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "Notify Icon Menu"
|
#Region "Notify Icon Menu"
|
||||||
@ -71,11 +129,6 @@ Partial Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ProgressChanged(sender As Object, Progress As ClassInitLoader.InitProgress)
|
|
||||||
SplashScreenManager.Default.SendCommand(frmSplash.SplashScreenCommand.SetProgress, Progress.CurrentPercent)
|
|
||||||
SplashScreenManager.Default.SendCommand(frmSplash.SplashScreenCommand.SetActionName, Progress.CurrentStep.Name)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ButtonSettings_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonSettings.ItemClick
|
Private Sub ButtonSettings_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonSettings.ItemClick
|
||||||
frmSettings.ShowDialog()
|
frmSettings.ShowDialog()
|
||||||
End Sub
|
End Sub
|
||||||
@ -90,4 +143,27 @@ Partial Public Class frmMain
|
|||||||
My.UIConfigManager.Save()
|
My.UIConfigManager.Save()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub RefreshData()
|
||||||
|
Try
|
||||||
|
Dim oUserId As Integer = My.Application.User.UserId
|
||||||
|
Dim oSql As String = My.Queries.ClipboardWatcher.VWCW_USER_PROFILE(oUserId)
|
||||||
|
My.Application.ClipboardWatcher.UserProfiles = My.Database.GetDatatable(oSql)
|
||||||
|
|
||||||
|
If My.Application.ClipboardWatcher.UserProfiles.Rows.Count = 0 Then
|
||||||
|
MsgBox("No profiles configured for this user so far!", MsgBoxStyle.Exclamation)
|
||||||
|
Else
|
||||||
|
oSql = My.Queries.ClipboardWatcher.TBCW_PROFILE_PROCESS(oUserId)
|
||||||
|
My.Application.ClipboardWatcher.ProfileProcesses = My.Database.GetDatatable(oSql)
|
||||||
|
|
||||||
|
oSql = My.Queries.ClipboardWatcher.VWCW_PROFILE_REL_WINDOW(oUserId)
|
||||||
|
My.Application.ClipboardWatcher.ProfileWindows = My.Database.GetDatatable(oSql)
|
||||||
|
|
||||||
|
oSql = My.Queries.ClipboardWatcher.VWCW_PROFILE_REL_CONTROL(oUserId)
|
||||||
|
My.Application.ClipboardWatcher.ProfileControls = My.Database.GetDatatable(oSql)
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
147
ZooFlow/frmSettings.Designer.vb
generated
147
ZooFlow/frmSettings.Designer.vb
generated
@ -19,16 +19,163 @@ Partial Class frmSettings
|
|||||||
'Do not modify it using the code editor.
|
'Do not modify it using the code editor.
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
|
Me.components = New System.ComponentModel.Container()
|
||||||
|
Dim UserIdLabel As System.Windows.Forms.Label
|
||||||
|
Dim Label1 As System.Windows.Forms.Label
|
||||||
|
Dim Label2 As System.Windows.Forms.Label
|
||||||
|
Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl()
|
||||||
|
Me.PageModules = New DevExpress.XtraTab.XtraTabPage()
|
||||||
|
Me.txtGivenName = New System.Windows.Forms.TextBox()
|
||||||
|
Me.UserStateBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
||||||
|
Me.txtUsername = New System.Windows.Forms.TextBox()
|
||||||
|
Me.txtUserId = New System.Windows.Forms.TextBox()
|
||||||
|
Me.XtraTabPage2 = New DevExpress.XtraTab.XtraTabPage()
|
||||||
|
Me.GridControl1 = New DevExpress.XtraGrid.GridControl()
|
||||||
|
Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||||
|
Me.classModuleStateBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
||||||
|
UserIdLabel = New System.Windows.Forms.Label()
|
||||||
|
Label1 = New System.Windows.Forms.Label()
|
||||||
|
Label2 = New System.Windows.Forms.Label()
|
||||||
|
CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
Me.XtraTabControl1.SuspendLayout()
|
||||||
|
Me.PageModules.SuspendLayout()
|
||||||
|
CType(Me.UserStateBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.classModuleStateBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
|
'UserIdLabel
|
||||||
|
'
|
||||||
|
UserIdLabel.AutoSize = True
|
||||||
|
UserIdLabel.Location = New System.Drawing.Point(15, 24)
|
||||||
|
UserIdLabel.Name = "UserIdLabel"
|
||||||
|
UserIdLabel.Size = New System.Drawing.Size(43, 13)
|
||||||
|
UserIdLabel.TabIndex = 0
|
||||||
|
UserIdLabel.Text = "UserId:"
|
||||||
|
'
|
||||||
|
'Label1
|
||||||
|
'
|
||||||
|
Label1.AutoSize = True
|
||||||
|
Label1.Location = New System.Drawing.Point(15, 51)
|
||||||
|
Label1.Name = "Label1"
|
||||||
|
Label1.Size = New System.Drawing.Size(59, 13)
|
||||||
|
Label1.TabIndex = 0
|
||||||
|
Label1.Text = "Username:"
|
||||||
|
'
|
||||||
|
'Label2
|
||||||
|
'
|
||||||
|
Label2.AutoSize = True
|
||||||
|
Label2.Location = New System.Drawing.Point(15, 78)
|
||||||
|
Label2.Name = "Label2"
|
||||||
|
Label2.Size = New System.Drawing.Size(68, 13)
|
||||||
|
Label2.TabIndex = 0
|
||||||
|
Label2.Text = "Given Name:"
|
||||||
|
'
|
||||||
|
'XtraTabControl1
|
||||||
|
'
|
||||||
|
Me.XtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.XtraTabControl1.Location = New System.Drawing.Point(0, 0)
|
||||||
|
Me.XtraTabControl1.Name = "XtraTabControl1"
|
||||||
|
Me.XtraTabControl1.SelectedTabPage = Me.PageModules
|
||||||
|
Me.XtraTabControl1.Size = New System.Drawing.Size(784, 419)
|
||||||
|
Me.XtraTabControl1.TabIndex = 0
|
||||||
|
Me.XtraTabControl1.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.PageModules, Me.XtraTabPage2})
|
||||||
|
'
|
||||||
|
'PageModules
|
||||||
|
'
|
||||||
|
Me.PageModules.Controls.Add(Me.GridControl1)
|
||||||
|
Me.PageModules.Controls.Add(Label2)
|
||||||
|
Me.PageModules.Controls.Add(Label1)
|
||||||
|
Me.PageModules.Controls.Add(Me.txtGivenName)
|
||||||
|
Me.PageModules.Controls.Add(Me.txtUsername)
|
||||||
|
Me.PageModules.Controls.Add(UserIdLabel)
|
||||||
|
Me.PageModules.Controls.Add(Me.txtUserId)
|
||||||
|
Me.PageModules.Name = "PageModules"
|
||||||
|
Me.PageModules.Size = New System.Drawing.Size(778, 391)
|
||||||
|
Me.PageModules.Text = "Module && Lizenzen"
|
||||||
|
'
|
||||||
|
'txtGivenName
|
||||||
|
'
|
||||||
|
Me.txtGivenName.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.UserStateBindingSource, "GivenName", True))
|
||||||
|
Me.txtGivenName.Location = New System.Drawing.Point(89, 75)
|
||||||
|
Me.txtGivenName.Name = "txtGivenName"
|
||||||
|
Me.txtGivenName.Size = New System.Drawing.Size(100, 21)
|
||||||
|
Me.txtGivenName.TabIndex = 1
|
||||||
|
'
|
||||||
|
'UserStateBindingSource
|
||||||
|
'
|
||||||
|
Me.UserStateBindingSource.DataSource = GetType(DigitalData.Modules.ZooFlow.State.UserState)
|
||||||
|
'
|
||||||
|
'txtUsername
|
||||||
|
'
|
||||||
|
Me.txtUsername.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.UserStateBindingSource, "UserName", True))
|
||||||
|
Me.txtUsername.Location = New System.Drawing.Point(89, 48)
|
||||||
|
Me.txtUsername.Name = "txtUsername"
|
||||||
|
Me.txtUsername.Size = New System.Drawing.Size(100, 21)
|
||||||
|
Me.txtUsername.TabIndex = 1
|
||||||
|
'
|
||||||
|
'txtUserId
|
||||||
|
'
|
||||||
|
Me.txtUserId.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.UserStateBindingSource, "UserId", True))
|
||||||
|
Me.txtUserId.Location = New System.Drawing.Point(89, 21)
|
||||||
|
Me.txtUserId.Name = "txtUserId"
|
||||||
|
Me.txtUserId.Size = New System.Drawing.Size(100, 21)
|
||||||
|
Me.txtUserId.TabIndex = 1
|
||||||
|
'
|
||||||
|
'XtraTabPage2
|
||||||
|
'
|
||||||
|
Me.XtraTabPage2.Name = "XtraTabPage2"
|
||||||
|
Me.XtraTabPage2.Size = New System.Drawing.Size(778, 391)
|
||||||
|
Me.XtraTabPage2.Text = "XtraTabPage2"
|
||||||
|
'
|
||||||
|
'GridControl1
|
||||||
|
'
|
||||||
|
Me.GridControl1.DataSource = Me.classModuleStateBindingSource
|
||||||
|
Me.GridControl1.Location = New System.Drawing.Point(324, 48)
|
||||||
|
Me.GridControl1.MainView = Me.GridView1
|
||||||
|
Me.GridControl1.Name = "GridControl1"
|
||||||
|
Me.GridControl1.Size = New System.Drawing.Size(400, 200)
|
||||||
|
Me.GridControl1.TabIndex = 2
|
||||||
|
Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1})
|
||||||
|
'
|
||||||
|
'GridView1
|
||||||
|
'
|
||||||
|
Me.GridView1.GridControl = Me.GridControl1
|
||||||
|
Me.GridView1.Name = "GridView1"
|
||||||
|
'
|
||||||
|
'classModuleStateBindingSource
|
||||||
|
'
|
||||||
|
Me.classModuleStateBindingSource.DataSource = GetType(DigitalData.Modules.ZooFlow.State.ModuleState)
|
||||||
|
'
|
||||||
'frmSettings
|
'frmSettings
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(784, 419)
|
Me.ClientSize = New System.Drawing.Size(784, 419)
|
||||||
|
Me.Controls.Add(Me.XtraTabControl1)
|
||||||
Me.Name = "frmSettings"
|
Me.Name = "frmSettings"
|
||||||
Me.Text = "frmSettings"
|
Me.Text = "frmSettings"
|
||||||
|
CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
Me.XtraTabControl1.ResumeLayout(False)
|
||||||
|
Me.PageModules.ResumeLayout(False)
|
||||||
|
Me.PageModules.PerformLayout()
|
||||||
|
CType(Me.UserStateBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.classModuleStateBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend WithEvents XtraTabControl1 As DevExpress.XtraTab.XtraTabControl
|
||||||
|
Friend WithEvents PageModules As DevExpress.XtraTab.XtraTabPage
|
||||||
|
Friend WithEvents XtraTabPage2 As DevExpress.XtraTab.XtraTabPage
|
||||||
|
Friend WithEvents txtUserId As TextBox
|
||||||
|
Friend WithEvents UserStateBindingSource As BindingSource
|
||||||
|
Friend WithEvents txtGivenName As TextBox
|
||||||
|
Friend WithEvents txtUsername As TextBox
|
||||||
|
Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl
|
||||||
|
Friend WithEvents classModuleStateBindingSource As BindingSource
|
||||||
|
Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -117,4 +117,22 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<metadata name="UserIdLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>False</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Label1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>False</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Label2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>False</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="classModuleStateBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>200, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="UserStateBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="UserStateBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
||||||
@ -1,3 +1,5 @@
|
|||||||
Public Class frmSettings
|
Public Class frmSettings
|
||||||
|
Private Sub frmSettings_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
UserStateBindingSource.DataSource = My.Application.User
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
Loading…
x
Reference in New Issue
Block a user