diff --git a/ClipboardWatcher/My Project/licenses.licx b/ClipboardWatcher/My Project/licenses.licx index ed708931..b39b3920 100644 --- a/ClipboardWatcher/My Project/licenses.licx +++ b/ClipboardWatcher/My Project/licenses.licx @@ -1 +1,2 @@ +DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.TileControl, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/ClipboardWatcher/frmMatch.Designer.vb b/ClipboardWatcher/frmMatch.Designer.vb index 396743b6..398ee8f6 100644 --- a/ClipboardWatcher/frmMatch.Designer.vb +++ b/ClipboardWatcher/frmMatch.Designer.vb @@ -1,6 +1,6 @@  _ Partial Class frmMatch - Inherits System.Windows.Forms.Form + Inherits DevExpress.XtraEditors.XtraForm 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. _ @@ -27,6 +27,7 @@ Partial Class frmMatch Me.TileGroupDocuments = New DevExpress.XtraEditors.TileGroup() Me.TileGroupData = New DevExpress.XtraEditors.TileGroup() Me.Label1 = New System.Windows.Forms.Label() + Me.Label2 = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'TileControlMatch @@ -73,15 +74,29 @@ Partial Class frmMatch 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.Size = New System.Drawing.Size(368, 21) Me.Label1.TabIndex = 1 - Me.Label1.Text = "Es wurde mehr als ein Match für Ihre Suche gefunden:" + Me.Label1.Text = "Es wurde(n) {0} für Ihre Suche nach '{1}' gefunden:" + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer)) + Me.Label2.Cursor = System.Windows.Forms.Cursors.Hand + Me.Label2.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label2.ForeColor = System.Drawing.SystemColors.Control + Me.Label2.Location = New System.Drawing.Point(12, 424) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(232, 17) + Me.Label2.TabIndex = 3 + Me.Label2.Text = "Wie wurden die Ergebnisse gefunden?" ' 'frmMatch ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.TileControlMatch) Me.Name = "frmMatch" @@ -96,4 +111,5 @@ Partial Class frmMatch Friend WithEvents TileGroupDocuments As DevExpress.XtraEditors.TileGroup Friend WithEvents TileGroupData As DevExpress.XtraEditors.TileGroup Friend WithEvents Label1 As System.Windows.Forms.Label + Friend WithEvents Label2 As System.Windows.Forms.Label End Class diff --git a/ClipboardWatcher/frmMatch.vb b/ClipboardWatcher/frmMatch.vb index 673e6e22..c3d7fcc4 100644 --- a/ClipboardWatcher/frmMatch.vb +++ b/ClipboardWatcher/frmMatch.vb @@ -1,6 +1,7 @@ Imports System.Drawing Imports System.Windows.Forms Imports DevExpress.XtraEditors +Imports DigitalData.GUIs.Common Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Windows Imports DigitalData.Modules.ZooFlow @@ -30,6 +31,9 @@ Public Class frmMatch Private PrimaryFont As New Font("Segoe UI", 12, FontStyle.Bold) Private SecondaryFont As New Font("Segoe UI", 10) + Private OpenForms As New List(Of IResultForm) + Private ShouldHideInitially As Boolean = False + Private Const NO_COUNT_SQL As Integer = 99998 Private Const INVALID_COUNT_SQL As Integer = 99999 @@ -56,6 +60,19 @@ Public Class frmMatch If oCreatedTiles = -1 Then Exit Sub End If + + If oCreatedTiles = 0 Then + _Logger.Warn("No Results found for ""{0}""", _Params.ClipboardContents) + Close() + End If + + Dim oMatchString = IIf(oCreatedTiles = 1, "1 Match", $"{oCreatedTiles} Matches") + Label1.Text = String.Format(Label1.Text, oMatchString, _Params.ClipboardContents) + + If oCreatedTiles = 1 Then + Dim oProfile As ProfileData = _Params.MatchingProfiles.First() + ' TODO Open Result Forms + End If End Sub Function CreateTiles() As Integer @@ -152,4 +169,84 @@ Public Class frmMatch Return oText End Function + + Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click + Dim oForm As New frmTreeView(_Params.MatchTreeView.Nodes) With { + .StartPosition = FormStartPosition.CenterScreen + } + oForm.ShowDialog() + End Sub + + Private Sub TileControlMatch_ItemClick(sender As Object, e As TileItemEventArgs) Handles TileControlMatch.ItemClick + Dim oItem As TileItem = e.Item + Dim oProfileId As Integer = oItem.Tag + + Select Case oItem.Group.Name + Case TileGroupData.Name + OpenResultForms(oProfileId, ProfileType.DATA_ONLY) + + Case TileGroupDocuments.Name + OpenResultForms(oProfileId, ProfileType.DOCS_ONLY) + + Case Else + OpenResultForms(oProfileId, ProfileType.ANY) + End Select + + Hide() + End Sub + + Private Sub OpenResultForms(ProfileId As Integer, OpenType As ProfileType) + Dim oMatchingProfiles As New List(Of ProfileData) + + ' TODO: Implement Show All + + ' Click on specific profile + Dim oProfile As ProfileData = _Params.MatchingProfiles. + Where(Function(p) p.Guid = ProfileId). + First() + oMatchingProfiles.Add(oProfile) + + If OpenType = ProfileType.ANY Or OpenType = ProfileType.DOCS_ONLY Then + ' Show Result Document Form + Dim oForm As New frmDocumentResult(_LogConfig, _Environment, _Params) + AddHandler oForm.FormClosed, AddressOf ProfileResultForm_Closed + OpenForms.Add(oForm) + + oForm.Show() + End If + + 'If OpenType = ProfileType.ANY Or OpenType = ProfileType.DATA_ONLY Then + ' ' Show Result Data Form + ' Dim oForm As New frmResultSQL(Me, oMatchingProfiles) + ' AddHandler oForm.FormClosed, AddressOf ProfileResultForm_Closed + ' OpenForms.Add(oForm) + + ' oForm.Show() + 'End If + End Sub + + Private Sub ProfileResultForm_Closed(sender As Object, e As FormClosedEventArgs) + Dim oShouldOpenAgain As Boolean = False + Dim oThisForm = New List(Of IResultForm) From {sender} + + If TypeOf sender Is frmResultDoc Or TypeOf sender Is frmDocumentResult Then + For Each oForm As IResultForm In OpenForms + ' Determine if frmProfileMatch should be shown + If oForm.ShouldReturnToMatchForm Then + oShouldOpenAgain = True + End If + Next + End If + + ' If frmProfileMatch should be shown, close all windows of this profile + If oShouldOpenAgain Then + For Each oForm As Form In OpenForms.Except(oThisForm) + ' Remove the Handler to prevent a loop + RemoveHandler oForm.FormClosed, AddressOf ProfileResultForm_Closed + oForm.Close() + Next + + Show() + End If + End Sub End Class diff --git a/ClipboardWatcher/frmTreeView.Designer.vb b/ClipboardWatcher/frmTreeView.Designer.vb index bfb5523b..d12f50d5 100644 --- a/ClipboardWatcher/frmTreeView.Designer.vb +++ b/ClipboardWatcher/frmTreeView.Designer.vb @@ -1,6 +1,6 @@  _ Partial Class frmTreeView - Inherits System.Windows.Forms.Form + Inherits DevExpress.XtraEditors.XtraForm 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. _ @@ -22,18 +22,23 @@ Partial Class frmTreeView 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. _ Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmTreeView)) - Me.TreeView1 = New System.Windows.Forms.TreeView() - Me.ImageList1 = New System.Windows.Forms.ImageList() + Me.tvProfileMatch = New System.Windows.Forms.TreeView() + Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components) Me.SuspendLayout() ' - 'TreeView1 + 'tvProfileMatch ' - Me.TreeView1.Dock = System.Windows.Forms.DockStyle.Fill - Me.TreeView1.Location = New System.Drawing.Point(0, 0) - Me.TreeView1.Name = "TreeView1" - Me.TreeView1.Size = New System.Drawing.Size(800, 450) - Me.TreeView1.TabIndex = 0 + Me.tvProfileMatch.Dock = System.Windows.Forms.DockStyle.Fill + Me.tvProfileMatch.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.tvProfileMatch.ImageIndex = 0 + Me.tvProfileMatch.ImageList = Me.ImageList1 + Me.tvProfileMatch.Location = New System.Drawing.Point(0, 0) + Me.tvProfileMatch.Name = "tvProfileMatch" + Me.tvProfileMatch.SelectedImageIndex = 0 + Me.tvProfileMatch.Size = New System.Drawing.Size(800, 450) + Me.tvProfileMatch.TabIndex = 0 ' 'ImageList1 ' @@ -50,13 +55,13 @@ Partial Class frmTreeView Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(800, 450) - Me.Controls.Add(Me.TreeView1) + Me.Controls.Add(Me.tvProfileMatch) Me.Name = "frmTreeView" Me.Text = "frmTreeView" Me.ResumeLayout(False) End Sub - Friend WithEvents TreeView1 As System.Windows.Forms.TreeView + Friend WithEvents tvProfileMatch As System.Windows.Forms.TreeView Friend WithEvents ImageList1 As System.Windows.Forms.ImageList End Class diff --git a/ClipboardWatcher/frmTreeView.resx b/ClipboardWatcher/frmTreeView.resx index 03550cdc..a51aba27 100644 --- a/ClipboardWatcher/frmTreeView.resx +++ b/ClipboardWatcher/frmTreeView.resx @@ -124,8 +124,8 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADo - CwAAAk1TRnQBSQFMAgEBBQEAAQgBAAEIAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADm + CwAAAk1TRnQBSQFMAgEBBQEAARgBAAEYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -165,17 +165,17 @@ AfcBBwIAAfYBWQF6ApoFegErARoCAAG0Bf8I9AH/Ac8BtAXzBwcB8wHPAQAB7wL0AvIC8QHwBgcBvAGS AQABGwEyAXoBwwOaA3oCmgFSAXkB/wG0B/8G9AH/Ac8BtA3zAc8BAAHvAvQC8wHyAvEGBwG8AfcBAAVZ AXoCmgF6BFkBMQEbAbQJ/wT0Af8BzwG0BfQBBwb/AfQBzwEAAe8C9AHzAfIBBwG8AvABvAHvAwcBvAH3 - AQAB/wH1AvYBmgFTApoBWQGaA/QB9gEAAbQL/wL0Af8CtAH0A7QB9AEHBv8B9AG0AQAB7wH0AfMC8QEH - AfEC/wHxAQcB8AIHAbwB9wQAAb0B4wFTAXoBmgEyARcBvQQAAbQO/wK0BfQHBwH0AbQBAAHvAfECvAHw - Ae8E/wHvAfABvAIHAZIDAAG9AeMBFgHjATgBegFTARYBFwG9AwABtA7wArQN9AG0AQAB8AHvAfAC/wEH - Ae8C9wHvAQcC/wHwAe8BvAMAAeMBFgHjAUcBUwFZAUcB4wEWAUcDAB+0AgAB7wP/AfIB7wLwAe8B8gP/ - Ae8EAAHjAZQCRwFNAVMCRwEWAUcDAAG1ARkHCQHuAQkB7gEJAU0BCQG0AbUNCQG0AgAB8gEHAvcB7wHw - Av8B8AHvAvcBBwHyBAAB4wGUBkcBFgFHAwABCQG7DLQBtQG7AfEBuwu0AbUB8QUAAf8B7wT/Ae8B/wcA - AeMBlAZHARYBFygAAfIBBwL3AQcB8gUAAUIBTQE+BwABPgMAASgDAAFAAwABIAMAAQEBAAEBBgABARYA - A/8BAAL/BgAC/wcAAQEHAAEBBwABAQcAAQEHAAEBBwABAQcAAQEHAAEBBwABAQcAAQEHAAEBBwABAQcA - AQEGAAL/BgAB4wHHBv8B4AGHAgAC/wH8AT8B4AEHAwABAQHwAQ8B8AEHAwABAQHAAQMB8AEPAwABAQIA - AeABBwMAAQECAAHAAQMDAAEBAgABgAQAAQECAAGABAABAQIAAYABAQMAAQECAAHwAQ8DAAEBAgAB4AEH - AwABAQIAAeABBwMAAQEBgAEBAeABBwMAAQEBgAEBAeABBwMAAQEB8AEPAeABBwT/AfgBHws= + AQAC/wL2AZoBUwKaAVkBmgP0AfYBAAG0C/8C9AH/ArQB9AO0AfQBBwb/AfQBtAEAAe8B9AHzAvEBBwHx + Av8B8QEHAfACBwG8AfcEAAG9AeMBUwF6AZoBMgEXAb0EAAG0Dv8CtAX0BwcB9AG0AQAB7wHxArwB8AHv + BP8B7wHwAbwCBwGSAwABvQHjARYB4wE4AXoBUwEWARcBvQMAAbQO8AK0DfQBtAEAAfAB7wHwAv8BBwHv + AvcB7wEHAv8B8AHvAbwDAAHjARYB4wFHAVMBWQFHAeMBFgFHAwAftAIAAe8D/wHyAe8C8AHvAfID/wHv + BAAB4wGUAkcBTQFTAkcBFgFHAwABtQEZBwkBvAEJAbwBCQFNAQkBtAG1DQkBtAIAAfIBBwL3Ae8B8AL/ + AfAB7wL3AQcB8gQAAeMBlAZHARYBRwMAAQkBuwy0AbUBuwHxAbsLtAG1AfEFAAH/Ae8E/wHvAf8HAAHj + AZQGRwEWARcoAAHyAQcC9wEHAfIFAAFCAU0BPgcAAT4DAAEoAwABQAMAASADAAEBAQABAQYAAQEWAAP/ + AQAC/wYAAv8HAAEBBwABAQcAAQEHAAEBBwABAQcAAQEHAAEBBwABAQcAAQEHAAEBBwABAQcAAQEHAAEB + BgAC/wYAAeMBxwb/AeABhwIAAv8B/AE/AeABBwMAAQEB8AEPAfABBwMAAQEBwAEDAfABDwMAAQECAAHg + AQcDAAEBAgABwAEDAwABAQIAAYAEAAEBAgABgAQAAQECAAGAAQEDAAEBAgAB8AEPAwABAQIAAeABBwMA + AQECAAHgAQcDAAEBAYABAQHgAQcDAAEBAYABAQHgAQcDAAEBAfABDwHgAQcE/wH4AR8L \ No newline at end of file diff --git a/ClipboardWatcher/frmTreeView.vb b/ClipboardWatcher/frmTreeView.vb index a7f1848d..e49e7280 100644 --- a/ClipboardWatcher/frmTreeView.vb +++ b/ClipboardWatcher/frmTreeView.vb @@ -1,3 +1,25 @@ -Public Class frmTreeView +Imports System.Windows.Forms +Public Class frmTreeView + Private _Nodes As TreeNodeCollection + + Public Sub New(Nodes As TreeNodeCollection) + ' Dieser Aufruf ist für den Designer erforderlich. + InitializeComponent() + + ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. + _Nodes = Nodes + End Sub + + Private Sub frmTreeView_Load(sender As Object, e As EventArgs) Handles MyBase.Load + tvProfileMatch.BeginUpdate() + tvProfileMatch.Nodes.Clear() + + For Each oNode As TreeNode In _Nodes + tvProfileMatch.Nodes.Add(oNode.Clone()) + Next + + tvProfileMatch.ExpandAll() + tvProfileMatch.EndUpdate() + End Sub End Class \ No newline at end of file diff --git a/Common/Common.vbproj b/Common/Common.vbproj new file mode 100644 index 00000000..9a893c69 --- /dev/null +++ b/Common/Common.vbproj @@ -0,0 +1,187 @@ + + + + + Debug + AnyCPU + {D20A6BF2-C7C6-4A7A-B34D-FA27D775A049} + Library + DigitalData.GUIs.Common + DigitalData.GUIs.Common + 512 + Windows + v4.6.1 + + + true + full + true + true + bin\Debug\ + DigitalData.GUIs.Common.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + pdbonly + false + true + true + bin\Release\ + DigitalData.GUIs.Common.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + + + + + + + + + + ..\packages\NLog.4.6.7\lib\net45\NLog.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + frmDocumentResult.vb + + + Form + + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + frmDocumentResult.vb + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + + {EAF0EA75-5FA7-485D-89C7-B2D843B03A96} + Database + + + {903B2D7D-3B80-4BE9-8713-7447B704E1B0} + Logging + + + {81CAC44F-3711-4C8F-AE98-E02A7448782A} + ZooFlow + + + {7C3B0C7E-59FE-4E1A-A655-27AE119F9444} + Patterns + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Common/IResultForm.vb b/Common/IResultForm.vb new file mode 100644 index 00000000..d455f8e6 --- /dev/null +++ b/Common/IResultForm.vb @@ -0,0 +1,3 @@ +Public Interface IResultForm + Property ShouldReturnToMatchForm As Boolean +End Interface diff --git a/Common/My Project/Application.Designer.vb b/Common/My Project/Application.Designer.vb new file mode 100644 index 00000000..8ab460ba --- /dev/null +++ b/Common/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' 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. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/Common/My Project/Application.myapp b/Common/My Project/Application.myapp new file mode 100644 index 00000000..758895de --- /dev/null +++ b/Common/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 1 + true + diff --git a/Common/My Project/AssemblyInfo.vb b/Common/My Project/AssemblyInfo.vb new file mode 100644 index 00000000..bbd0aea3 --- /dev/null +++ b/Common/My Project/AssemblyInfo.vb @@ -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 + + + + + + + + + + +'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird. + + +' 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: +' + + + diff --git a/Common/My Project/Resources.Designer.vb b/Common/My Project/Resources.Designer.vb new file mode 100644 index 00000000..3026d918 --- /dev/null +++ b/Common/My Project/Resources.Designer.vb @@ -0,0 +1,183 @@ +'------------------------------------------------------------------------------ +' +' 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. +' +'------------------------------------------------------------------------------ + +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. + ''' + ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + ''' + _ + 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.GUIs.Common.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property _blank() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("_blank", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property _page() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("_page", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property doc() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("doc", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property dwg() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("dwg", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property dxf() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("dxf", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property jpg() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("jpg", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property pdf() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("pdf", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property png() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("png", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property ppt() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("ppt", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property tiff() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("tiff", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property txt() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("txt", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property xls() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("xls", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + End Module +End Namespace diff --git a/Common/My Project/Resources.resx b/Common/My Project/Resources.resx new file mode 100644 index 00000000..76ae8170 --- /dev/null +++ b/Common/My Project/Resources.resx @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\doc.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\dwg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\dxf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\jpg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\pdf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\png.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ppt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\tiff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\txt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\xls.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\_blank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\_page.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Common/My Project/Settings.Designer.vb b/Common/My Project/Settings.Designer.vb new file mode 100644 index 00000000..84ca6129 --- /dev/null +++ b/Common/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' 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. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + 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 + + _ + 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 + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.DigitalData.GUIs.Common.My.MySettings + Get + Return Global.DigitalData.GUIs.Common.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/Common/My Project/Settings.settings b/Common/My Project/Settings.settings new file mode 100644 index 00000000..85b890b3 --- /dev/null +++ b/Common/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Common/My Project/licenses.licx b/Common/My Project/licenses.licx new file mode 100644 index 00000000..2658b273 --- /dev/null +++ b/Common/My Project/licenses.licx @@ -0,0 +1,2 @@ +DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/Common/Resources/_blank.png b/Common/Resources/_blank.png new file mode 100644 index 00000000..fd57dfcf Binary files /dev/null and b/Common/Resources/_blank.png differ diff --git a/Common/Resources/_page.png b/Common/Resources/_page.png new file mode 100644 index 00000000..d56d3f43 Binary files /dev/null and b/Common/Resources/_page.png differ diff --git a/Common/Resources/doc.png b/Common/Resources/doc.png new file mode 100644 index 00000000..a42f3914 Binary files /dev/null and b/Common/Resources/doc.png differ diff --git a/Common/Resources/dwg.png b/Common/Resources/dwg.png new file mode 100644 index 00000000..698eb4c6 Binary files /dev/null and b/Common/Resources/dwg.png differ diff --git a/Common/Resources/dxf.png b/Common/Resources/dxf.png new file mode 100644 index 00000000..ca30be92 Binary files /dev/null and b/Common/Resources/dxf.png differ diff --git a/Common/Resources/jpg.png b/Common/Resources/jpg.png new file mode 100644 index 00000000..0e7ace35 Binary files /dev/null and b/Common/Resources/jpg.png differ diff --git a/Common/Resources/pdf.png b/Common/Resources/pdf.png new file mode 100644 index 00000000..b2efd2cc Binary files /dev/null and b/Common/Resources/pdf.png differ diff --git a/Common/Resources/png.png b/Common/Resources/png.png new file mode 100644 index 00000000..b698be69 Binary files /dev/null and b/Common/Resources/png.png differ diff --git a/Common/Resources/ppt.png b/Common/Resources/ppt.png new file mode 100644 index 00000000..39601ae9 Binary files /dev/null and b/Common/Resources/ppt.png differ diff --git a/Common/Resources/tiff.png b/Common/Resources/tiff.png new file mode 100644 index 00000000..4ea16f79 Binary files /dev/null and b/Common/Resources/tiff.png differ diff --git a/Common/Resources/txt.png b/Common/Resources/txt.png new file mode 100644 index 00000000..62527117 Binary files /dev/null and b/Common/Resources/txt.png differ diff --git a/Common/Resources/xls.png b/Common/Resources/xls.png new file mode 100644 index 00000000..997a0ff1 Binary files /dev/null and b/Common/Resources/xls.png differ diff --git a/Common/frmDocumentResult.Designer.vb b/Common/frmDocumentResult.Designer.vb new file mode 100644 index 00000000..c6569c34 --- /dev/null +++ b/Common/frmDocumentResult.Designer.vb @@ -0,0 +1,334 @@ + _ +Partial Class frmDocumentResult + Inherits DevExpress.XtraEditors.XtraForm + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + MyBase.Dispose(disposing) + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.XtraTabControl = New DevExpress.XtraTab.XtraTabControl() + Me.XtraTabPage1 = New DevExpress.XtraTab.XtraTabPage() + Me.GridControl1 = New DevExpress.XtraGrid.GridControl() + Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.BarManager1 = New DevExpress.XtraBars.BarManager() + Me.Bar2 = New DevExpress.XtraBars.Bar() + Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem() + Me.Bar3 = New DevExpress.XtraBars.Bar() + Me.barDockControlTop = New DevExpress.XtraBars.BarDockControl() + Me.barDockControlBottom = New DevExpress.XtraBars.BarDockControl() + Me.barDockControlLeft = New DevExpress.XtraBars.BarDockControl() + Me.barDockControlRight = New DevExpress.XtraBars.BarDockControl() + Me.XtraTabPage2 = New DevExpress.XtraTab.XtraTabPage() + Me.GridControl2 = New DevExpress.XtraGrid.GridControl() + Me.GridView2 = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.XtraTabPage3 = New DevExpress.XtraTab.XtraTabPage() + Me.GridControl3 = New DevExpress.XtraGrid.GridControl() + Me.GridView3 = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.XtraTabPage4 = New DevExpress.XtraTab.XtraTabPage() + Me.GridControl4 = New DevExpress.XtraGrid.GridControl() + Me.GridView4 = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.XtraTabPage5 = New DevExpress.XtraTab.XtraTabPage() + Me.GridControl5 = New DevExpress.XtraGrid.GridControl() + Me.GridView5 = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.LabelStatus = New DevExpress.XtraBars.BarStaticItem() + CType(Me.XtraTabControl, System.ComponentModel.ISupportInitialize).BeginInit() + Me.XtraTabControl.SuspendLayout() + Me.XtraTabPage1.SuspendLayout() + CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.BarManager1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.XtraTabPage2.SuspendLayout() + CType(Me.GridControl2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridView2, System.ComponentModel.ISupportInitialize).BeginInit() + Me.XtraTabPage3.SuspendLayout() + CType(Me.GridControl3, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridView3, System.ComponentModel.ISupportInitialize).BeginInit() + Me.XtraTabPage4.SuspendLayout() + CType(Me.GridControl4, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridView4, System.ComponentModel.ISupportInitialize).BeginInit() + Me.XtraTabPage5.SuspendLayout() + CType(Me.GridControl5, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridView5, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'XtraTabControl + ' + Me.XtraTabControl.Dock = System.Windows.Forms.DockStyle.Fill + Me.XtraTabControl.Location = New System.Drawing.Point(0, 20) + Me.XtraTabControl.Name = "XtraTabControl" + Me.XtraTabControl.SelectedTabPage = Me.XtraTabPage1 + Me.XtraTabControl.Size = New System.Drawing.Size(697, 483) + Me.XtraTabControl.TabIndex = 0 + Me.XtraTabControl.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage1, Me.XtraTabPage2, Me.XtraTabPage3, Me.XtraTabPage4, Me.XtraTabPage5}) + ' + 'XtraTabPage1 + ' + Me.XtraTabPage1.Controls.Add(Me.GridControl1) + Me.XtraTabPage1.Name = "XtraTabPage1" + Me.XtraTabPage1.Size = New System.Drawing.Size(691, 455) + Me.XtraTabPage1.Text = "XtraTabPage1" + ' + 'GridControl1 + ' + Me.GridControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridControl1.Location = New System.Drawing.Point(0, 0) + Me.GridControl1.MainView = Me.GridView1 + Me.GridControl1.MenuManager = Me.BarManager1 + Me.GridControl1.Name = "GridControl1" + Me.GridControl1.Size = New System.Drawing.Size(691, 455) + Me.GridControl1.TabIndex = 0 + Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1}) + ' + 'GridView1 + ' + Me.GridView1.GridControl = Me.GridControl1 + Me.GridView1.Name = "GridView1" + ' + 'BarManager1 + ' + Me.BarManager1.Bars.AddRange(New DevExpress.XtraBars.Bar() {Me.Bar2, Me.Bar3}) + Me.BarManager1.DockControls.Add(Me.barDockControlTop) + Me.BarManager1.DockControls.Add(Me.barDockControlBottom) + Me.BarManager1.DockControls.Add(Me.barDockControlLeft) + Me.BarManager1.DockControls.Add(Me.barDockControlRight) + Me.BarManager1.Form = Me + Me.BarManager1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.BarButtonItem1, Me.LabelStatus}) + Me.BarManager1.MainMenu = Me.Bar2 + Me.BarManager1.MaxItemId = 2 + Me.BarManager1.StatusBar = Me.Bar3 + ' + 'Bar2 + ' + Me.Bar2.BarName = "Hauptmenü" + Me.Bar2.DockCol = 0 + Me.Bar2.DockRow = 0 + Me.Bar2.DockStyle = DevExpress.XtraBars.BarDockStyle.Top + Me.Bar2.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.BarButtonItem1)}) + Me.Bar2.OptionsBar.DisableClose = True + Me.Bar2.OptionsBar.DrawBorder = False + Me.Bar2.OptionsBar.UseWholeRow = True + Me.Bar2.Text = "Hauptmenü" + ' + 'BarButtonItem1 + ' + Me.BarButtonItem1.Caption = "Zurück zur Profilauswahl" + Me.BarButtonItem1.Id = 0 + Me.BarButtonItem1.Name = "BarButtonItem1" + ' + 'Bar3 + ' + Me.Bar3.BarName = "Statusleiste" + Me.Bar3.CanDockStyle = DevExpress.XtraBars.BarCanDockStyle.Bottom + Me.Bar3.DockCol = 0 + Me.Bar3.DockRow = 0 + Me.Bar3.DockStyle = DevExpress.XtraBars.BarDockStyle.Bottom + Me.Bar3.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.LabelStatus)}) + Me.Bar3.OptionsBar.AllowQuickCustomization = False + Me.Bar3.OptionsBar.DrawDragBorder = False + Me.Bar3.OptionsBar.UseWholeRow = True + Me.Bar3.Text = "Statusleiste" + ' + 'barDockControlTop + ' + Me.barDockControlTop.CausesValidation = False + Me.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top + Me.barDockControlTop.Location = New System.Drawing.Point(0, 0) + Me.barDockControlTop.Manager = Me.BarManager1 + Me.barDockControlTop.Size = New System.Drawing.Size(697, 20) + ' + 'barDockControlBottom + ' + Me.barDockControlBottom.CausesValidation = False + Me.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom + Me.barDockControlBottom.Location = New System.Drawing.Point(0, 503) + Me.barDockControlBottom.Manager = Me.BarManager1 + Me.barDockControlBottom.Size = New System.Drawing.Size(697, 25) + ' + 'barDockControlLeft + ' + Me.barDockControlLeft.CausesValidation = False + Me.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left + Me.barDockControlLeft.Location = New System.Drawing.Point(0, 20) + Me.barDockControlLeft.Manager = Me.BarManager1 + Me.barDockControlLeft.Size = New System.Drawing.Size(0, 483) + ' + 'barDockControlRight + ' + Me.barDockControlRight.CausesValidation = False + Me.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right + Me.barDockControlRight.Location = New System.Drawing.Point(697, 20) + Me.barDockControlRight.Manager = Me.BarManager1 + Me.barDockControlRight.Size = New System.Drawing.Size(0, 483) + ' + 'XtraTabPage2 + ' + Me.XtraTabPage2.Controls.Add(Me.GridControl2) + Me.XtraTabPage2.Name = "XtraTabPage2" + Me.XtraTabPage2.Size = New System.Drawing.Size(691, 457) + Me.XtraTabPage2.Text = "XtraTabPage2" + ' + 'GridControl2 + ' + Me.GridControl2.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridControl2.Location = New System.Drawing.Point(0, 0) + Me.GridControl2.MainView = Me.GridView2 + Me.GridControl2.MenuManager = Me.BarManager1 + Me.GridControl2.Name = "GridControl2" + Me.GridControl2.Size = New System.Drawing.Size(691, 457) + Me.GridControl2.TabIndex = 0 + Me.GridControl2.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView2}) + ' + 'GridView2 + ' + Me.GridView2.GridControl = Me.GridControl2 + Me.GridView2.Name = "GridView2" + ' + 'XtraTabPage3 + ' + Me.XtraTabPage3.Controls.Add(Me.GridControl3) + Me.XtraTabPage3.Name = "XtraTabPage3" + Me.XtraTabPage3.Size = New System.Drawing.Size(691, 457) + Me.XtraTabPage3.Text = "XtraTabPage3" + ' + 'GridControl3 + ' + Me.GridControl3.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridControl3.Location = New System.Drawing.Point(0, 0) + Me.GridControl3.MainView = Me.GridView3 + Me.GridControl3.MenuManager = Me.BarManager1 + Me.GridControl3.Name = "GridControl3" + Me.GridControl3.Size = New System.Drawing.Size(691, 457) + Me.GridControl3.TabIndex = 0 + Me.GridControl3.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView3}) + ' + 'GridView3 + ' + Me.GridView3.GridControl = Me.GridControl3 + Me.GridView3.Name = "GridView3" + ' + 'XtraTabPage4 + ' + Me.XtraTabPage4.Controls.Add(Me.GridControl4) + Me.XtraTabPage4.Name = "XtraTabPage4" + Me.XtraTabPage4.Size = New System.Drawing.Size(691, 457) + Me.XtraTabPage4.Text = "XtraTabPage4" + ' + 'GridControl4 + ' + Me.GridControl4.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridControl4.Location = New System.Drawing.Point(0, 0) + Me.GridControl4.MainView = Me.GridView4 + Me.GridControl4.MenuManager = Me.BarManager1 + Me.GridControl4.Name = "GridControl4" + Me.GridControl4.Size = New System.Drawing.Size(691, 457) + Me.GridControl4.TabIndex = 0 + Me.GridControl4.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView4}) + ' + 'GridView4 + ' + Me.GridView4.GridControl = Me.GridControl4 + Me.GridView4.Name = "GridView4" + ' + 'XtraTabPage5 + ' + Me.XtraTabPage5.Controls.Add(Me.GridControl5) + Me.XtraTabPage5.Name = "XtraTabPage5" + Me.XtraTabPage5.Size = New System.Drawing.Size(691, 457) + Me.XtraTabPage5.Text = "XtraTabPage5" + ' + 'GridControl5 + ' + Me.GridControl5.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridControl5.Location = New System.Drawing.Point(0, 0) + Me.GridControl5.MainView = Me.GridView5 + Me.GridControl5.MenuManager = Me.BarManager1 + Me.GridControl5.Name = "GridControl5" + Me.GridControl5.Size = New System.Drawing.Size(691, 457) + Me.GridControl5.TabIndex = 0 + Me.GridControl5.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView5}) + ' + 'GridView5 + ' + Me.GridView5.GridControl = Me.GridControl5 + Me.GridView5.Name = "GridView5" + ' + 'LabelStatus + ' + Me.LabelStatus.Caption = "Status" + Me.LabelStatus.Id = 1 + Me.LabelStatus.Name = "LabelStatus" + ' + 'frmDocumentResult + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(697, 528) + Me.Controls.Add(Me.XtraTabControl) + Me.Controls.Add(Me.barDockControlLeft) + Me.Controls.Add(Me.barDockControlRight) + Me.Controls.Add(Me.barDockControlBottom) + Me.Controls.Add(Me.barDockControlTop) + Me.Name = "frmDocumentResult" + Me.Text = "frmDocumentResult" + CType(Me.XtraTabControl, System.ComponentModel.ISupportInitialize).EndInit() + Me.XtraTabControl.ResumeLayout(False) + Me.XtraTabPage1.ResumeLayout(False) + CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.BarManager1, System.ComponentModel.ISupportInitialize).EndInit() + Me.XtraTabPage2.ResumeLayout(False) + CType(Me.GridControl2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridView2, System.ComponentModel.ISupportInitialize).EndInit() + Me.XtraTabPage3.ResumeLayout(False) + CType(Me.GridControl3, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridView3, System.ComponentModel.ISupportInitialize).EndInit() + Me.XtraTabPage4.ResumeLayout(False) + CType(Me.GridControl4, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridView4, System.ComponentModel.ISupportInitialize).EndInit() + Me.XtraTabPage5.ResumeLayout(False) + CType(Me.GridControl5, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridView5, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents XtraTabControl As DevExpress.XtraTab.XtraTabControl + Friend WithEvents XtraTabPage1 As DevExpress.XtraTab.XtraTabPage + Friend WithEvents XtraTabPage2 As DevExpress.XtraTab.XtraTabPage + Friend WithEvents BarManager1 As DevExpress.XtraBars.BarManager + Friend WithEvents Bar2 As DevExpress.XtraBars.Bar + Friend WithEvents Bar3 As DevExpress.XtraBars.Bar + Friend WithEvents barDockControlTop As DevExpress.XtraBars.BarDockControl + Friend WithEvents barDockControlBottom As DevExpress.XtraBars.BarDockControl + Friend WithEvents barDockControlLeft As DevExpress.XtraBars.BarDockControl + Friend WithEvents barDockControlRight As DevExpress.XtraBars.BarDockControl + Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl + Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents GridControl2 As DevExpress.XtraGrid.GridControl + Friend WithEvents GridView2 As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents XtraTabPage3 As DevExpress.XtraTab.XtraTabPage + Friend WithEvents GridControl3 As DevExpress.XtraGrid.GridControl + Friend WithEvents GridView3 As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents XtraTabPage4 As DevExpress.XtraTab.XtraTabPage + Friend WithEvents GridControl4 As DevExpress.XtraGrid.GridControl + Friend WithEvents GridView4 As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents XtraTabPage5 As DevExpress.XtraTab.XtraTabPage + Friend WithEvents GridControl5 As DevExpress.XtraGrid.GridControl + Friend WithEvents GridView5 As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents LabelStatus As DevExpress.XtraBars.BarStaticItem +End Class diff --git a/Common/frmDocumentResult.resx b/Common/frmDocumentResult.resx new file mode 100644 index 00000000..3a681462 --- /dev/null +++ b/Common/frmDocumentResult.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Common/frmDocumentResult.vb b/Common/frmDocumentResult.vb new file mode 100644 index 00000000..baadb2c9 --- /dev/null +++ b/Common/frmDocumentResult.vb @@ -0,0 +1,292 @@ +Imports System.Drawing +Imports DevExpress.Utils +Imports DevExpress.XtraGrid +Imports DevExpress.XtraGrid.Columns +Imports DevExpress.XtraGrid.Views.Grid +Imports DigitalData.GUIs.Common +Imports DigitalData.Modules.Database +Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.ZooFlow +Imports DigitalData.Modules.ZooFlow.Params +Imports Patterns.ClassPatterns + +Public Class frmDocumentResult + Implements IResultForm + + Private _LogConfig As LogConfig + Private _Logger As Logger + Private _Params As ClipboardWatcherParams + Private _Environment As Environment + Private _DocumentSearches As DataTable + Private _MatchingProfiles As List(Of ProfileData) + Private _Database As MSSQLServer + + Private Class DocSearch + Public DataTable As DataTable + Public TabIndex As Integer + Public TabCaption As String + Public ProfileId As Integer + Public SQLCommand As String + End Class + + Public Property ShouldReturnToMatchForm As Boolean = False Implements IResultForm.ShouldReturnToMatchForm + + Public Sub New(LogConfig As LogConfig, Environment As Environment, Params As ClipboardWatcherParams) + ' Dieser Aufruf ist für den Designer erforderlich. + InitializeComponent() + + ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. + _MatchingProfiles = Params.MatchingProfiles + _LogConfig = LogConfig + _Logger = LogConfig.GetLogger + End Sub + + Private Async Sub frmDocumentResult_Load(sender As Object, e As EventArgs) Handles MyBase.Load + GridView1.ShowLoadingPanel() + + Dim oSearches = Await LoadSearchesAsync() + + For Each oSearch As DocSearch In oSearches + RefreshTabDoc(oSearch.ProfileId, oSearch.DataTable, oSearch.TabIndex, oSearch.TabCaption) + Next + + GridView1.HideLoadingPanel() + End Sub + + Private Async Function LoadSearchesAsync() As Task(Of List(Of DocSearch)) + Return Await Task.Run(AddressOf DoLoadSearches) + End Function + + Private Function DoLoadSearches() As List(Of DocSearch) + Dim oMatchingIds = String.Join(",", _MatchingProfiles.Select(Function(p) p.Guid).ToArray()) + Dim oSQL As String = $"SELECT * FROM TBCW_PROF_DOC_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID in ({oMatchingIds}) ORDER BY TAB_INDEX" + Dim oSearchesDataTable = _Database.GetDatatable(oSQL) + Dim oDocSearches As New List(Of DocSearch) + Dim oCounter As Integer = 0 + Dim oPatterns As New Patterns.ClassPatterns(_LogConfig) + + _DocumentSearches = oSearchesDataTable + + For Each oRow As DataRow In oSearchesDataTable.Rows + Dim oProfileId As Integer = oRow.Item("PROFILE_ID") + Dim oTabTitle As String = oRow.Item("TAB_TITLE") + Dim oConnectionId As Integer = oRow.Item("CONN_ID") + + oSQL = oRow.Item("SQL_COMMAND") + oSQL = oPatterns.ReplaceUserValues(oSQL, _Environment.User) + oSQL = oPatterns.ReplaceInternalValues(oSQL) + + Dim oDatatable As DataTable = _Database.GetDatatable(oSQL, oConnectionId) + oDocSearches.Add(New DocSearch() With { + .DataTable = oDatatable, + .ProfileId = oProfileId, + .TabCaption = oTabTitle, + .TabIndex = oCounter, + .SQLCommand = oSQL + }) + + oCounter += 1 + Next + + Return oDocSearches + End Function + + Sub RefreshTabDoc(ProfileId As Integer, Datatable As DataTable, TabIndex As Integer, TabCaption As String) + Try + Dim oSelectedGridControl As GridControl = GridControl1 + Dim oSelectedGridView As GridView = GridView1 + + Select Case TabIndex + Case 0 + GridControl1.DataSource = Nothing + GridView1.Columns.Clear() + oSelectedGridView = GridView1 + oSelectedGridControl = GridControl1 + Case 1 + GridControl2.DataSource = Nothing + GridView2.Columns.Clear() + oSelectedGridView = GridView2 + oSelectedGridControl = GridControl2 + Case 2 + GridControl3.DataSource = Nothing + GridView3.Columns.Clear() + oSelectedGridView = GridView3 + oSelectedGridControl = GridControl3 + Case 3 + GridControl4.DataSource = Nothing + GridView4.Columns.Clear() + oSelectedGridControl = GridControl4 + oSelectedGridView = GridView4 + Case 4 + GridControl5.DataSource = Nothing + GridView5.Columns.Clear() + oSelectedGridControl = GridControl5 + oSelectedGridView = GridView5 + End Select + + 'oSelectedGridControl.ContextMenuStrip = ContextMenuStripWMFile + + If Not IsNothing(Datatable) Then + XtraTabControl.TabPages(TabIndex).Text = $"{TabCaption} ({Datatable.Rows.Count})" + 'clsWMDocGrid.DTDocuments = Datatable + + Create_GridControl(oSelectedGridView, Datatable) + 'Dim oxmlPath As String = Get_DocGrid_Layout_Filename(XtraTabControlDocs.SelectedTabPageIndex) + + 'If File.Exists(oxmlPath) Then + ' oSelectedGridView.RestoreLayoutFromXml(oxmlPath) + ' oSelectedGridView.GuessAutoFilterRowValuesFromFilter() + 'End If + LabelStatus.Caption = $"Tab [{TabCaption}] refreshed - {Now}" + XtraTabControl.TabPages(TabIndex).PageVisible = True + Else + 'clsWMDocGrid.DTDocuments = Nothing + End If + Catch ex As Exception + _Logger.Error(ex) + End Try + End Sub + + Private Sub Create_GridControl(MyGridView As GridView, _datatable As DataTable) + Dim oMyDocDatatable As New DataTable + Try + 'Die Icon Colum erstellen und konfigurieren + Dim oColIcon As New DataColumn() With { + .DataType = GetType(Image), + .ColumnName = "ICON", + .Caption = "" + } + oMyDocDatatable.Columns.Add(oColIcon) + + Dim oColPath As New DataColumn() With { + .DataType = GetType(String), + .ColumnName = "FULL_FILENAME", + .Caption = "Fullpath" + } + oMyDocDatatable.Columns.Add(oColPath) + + Dim oColDocID As New DataColumn() With { + .DataType = GetType(Int32), + .ColumnName = "DocID", + .Caption = "DocID" + } + oMyDocDatatable.Columns.Add(oColDocID) + + Dim oRestColArray As New List(Of String) + For Each oCol As DataColumn In _datatable.Columns + Dim onewColumn As New DataColumn() + If oCol.ColumnName <> "DocID" And oCol.ColumnName <> "FULL_FILENAME" And oCol.ColumnName <> "Filename" Then + onewColumn.DataType = GetType(String) + onewColumn.ColumnName = oCol.ColumnName + onewColumn.Caption = oCol.Caption + oMyDocDatatable.Columns.Add(onewColumn) + oRestColArray.Add(onewColumn.ColumnName) + End If + + Next + For Each FILE_ROW As DataRow In _datatable.Rows + Dim oFullpath = FILE_ROW.Item("FULL_FILENAME") + Dim oDocID = FILE_ROW.Item("DocID") + 'Dim Folderpath = Path.GetDirectoryName(fullpath) + Dim oFilename = IO.Path.GetFileName(oFullpath) + Dim oFileextension = IO.Path.GetExtension(oFullpath) + Dim oNewRow As DataRow + oNewRow = oMyDocDatatable.NewRow() + 'Icon zuweisen + Select Case oFileextension.ToUpper + Case ".csv".ToUpper + oNewRow.Item(0) = My.Resources.xls + Case ".txt".ToUpper + oNewRow.Item(0) = My.Resources.txt + Case ".pdf".ToUpper + oNewRow.Item(0) = My.Resources.pdf + Case ".doc".ToUpper + oNewRow.Item(0) = My.Resources.doc + Case ".docx".ToUpper + oNewRow.Item(0) = My.Resources.doc + Case ".xls".ToUpper + oNewRow.Item(0) = My.Resources.xls + Case ".xlsx".ToUpper + oNewRow.Item(0) = My.Resources.xls + Case ".xlsm".ToUpper + oNewRow.Item(0) = My.Resources.xls + Case ".ppt".ToUpper + oNewRow.Item(0) = My.Resources.ppt + Case ".pptx".ToUpper + oNewRow.Item(0) = My.Resources.ppt + Case ".dwg".ToUpper + oNewRow.Item(0) = My.Resources.dwg + Case ".dxf".ToUpper + oNewRow.Item(0) = My.Resources.dxf + Case ".msg".ToUpper + oNewRow.Item(0) = My.Resources._page + Case ".msg".ToUpper + oNewRow.Item(0) = My.Resources._page + Case ".tif".ToUpper + oNewRow.Item(0) = My.Resources.tiff + Case ".tiff".ToUpper + oNewRow.Item(0) = My.Resources.tiff + Case ".jpg".ToUpper + oNewRow.Item(0) = My.Resources.jpg + Case Else + oNewRow.Item(0) = My.Resources._blank + End Select + 'Den Filepath mitgeben + oNewRow.Item(1) = oFullpath + oNewRow.Item(2) = oDocID + + Dim i = 3 'Fängt bei 3 an, um die definierten Spalten zu überspringen + For Each Colname As String In oRestColArray + Dim oRowValue + oRowValue = FILE_ROW.Item(Colname) + oNewRow.Item(i) = oRowValue.ToString + i += 1 + Next + oMyDocDatatable.Rows.Add(oNewRow) + Next + + Dim oGridControl As GridControl = MyGridView.GridControl + oGridControl.DataSource = oMyDocDatatable + oGridControl.ForceInitialize() + Try + MyGridView.Columns.Item("DocID").Visible = False + Catch ex As Exception + End Try + Try + MyGridView.Columns.Item("FULL_FILENAME").Visible = False + Catch ex As Exception + End Try + + Dim created, changed As String + If _Environment.User.Language <> "de-DE" Then + changed = "Changed" + created = "Created" + Else + changed = "Geändert" + created = "Erstellt" + End If + + Dim createdColumn = MyGridView.Columns(created) + If Not IsNothing(createdColumn) Then + createdColumn.DisplayFormat.FormatType = FormatType.DateTime + createdColumn.DisplayFormat.FormatString = _Environment.User.DateFormat & " HH:MM:ss" + End If + + Dim changedColumn = MyGridView.Columns(changed) + If Not IsNothing(changedColumn) Then + changedColumn.DisplayFormat.FormatType = FormatType.DateTime + changedColumn.DisplayFormat.FormatString = _Environment.User.DateFormat & " HH:MM:ss" + End If + ' Alle Spalten aus ReadOnly setzen, danach werden alle passenden auf nicht ReadOnly gesetzt + For Each column As GridColumn In MyGridView.Columns + column.OptionsColumn.AllowEdit = False + Next + MyGridView.Columns.Item("ICON").MaxWidth = 24 + MyGridView.Columns.Item("ICON").MinWidth = 24 + MyGridView.OptionsView.BestFitMaxRowCount = -1 + MyGridView.BestFitColumns(True) + Catch ex As Exception + _Logger.Error(ex) + End Try + End Sub +End Class \ No newline at end of file diff --git a/Common/packages.config b/Common/packages.config new file mode 100644 index 00000000..99e34262 --- /dev/null +++ b/Common/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/DDMonorepo.sln b/DDMonorepo.sln index 4320ef71..aa4d4ccd 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -92,6 +92,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ClipboardWatcher", "Clipboa EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Patterns", "Patterns\Patterns.vbproj", "{7C3B0C7E-59FE-4E1A-A655-27AE119F9444}" EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Common", "Common\Common.vbproj", "{D20A6BF2-C7C6-4A7A-B34D-FA27D775A049}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -234,6 +236,10 @@ Global {7C3B0C7E-59FE-4E1A-A655-27AE119F9444}.Debug|Any CPU.Build.0 = Debug|Any CPU {7C3B0C7E-59FE-4E1A-A655-27AE119F9444}.Release|Any CPU.ActiveCfg = Release|Any CPU {7C3B0C7E-59FE-4E1A-A655-27AE119F9444}.Release|Any CPU.Build.0 = Release|Any CPU + {D20A6BF2-C7C6-4A7A-B34D-FA27D775A049}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D20A6BF2-C7C6-4A7A-B34D-FA27D775A049}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D20A6BF2-C7C6-4A7A-B34D-FA27D775A049}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D20A6BF2-C7C6-4A7A-B34D-FA27D775A049}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -271,8 +277,9 @@ Global {5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {81CAC44F-3711-4C8F-AE98-E02A7448782A} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {483A3DA7-6F7A-4E57-B77F-ED33F4E280C5} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} - {B7D465A2-AE31-4CDF-A8B2-34B42D3EA84E} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} + {B7D465A2-AE31-4CDF-A8B2-34B42D3EA84E} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB} {7C3B0C7E-59FE-4E1A-A655-27AE119F9444} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} + {D20A6BF2-C7C6-4A7A-B34D-FA27D775A049} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286} diff --git a/Message/EventBus.vb b/Message/EventBus.vb index fed4b4da..4f96ac6d 100644 --- a/Message/EventBus.vb +++ b/Message/EventBus.vb @@ -34,8 +34,6 @@ Public Class EventBus ForEach(Sub(l) l.PostEvent(e)) End Sub - - Private Class EventListenerWrapper Public Property Listener As Object Public Property EventType As Type diff --git a/Modules/ZooFlow/Environment.vb b/Modules/ZooFlow/Environment.vb index d1f27769..b45e5dfb 100644 --- a/Modules/ZooFlow/Environment.vb +++ b/Modules/ZooFlow/Environment.vb @@ -1,4 +1,7 @@ -Public Class Environment +Imports DigitalData.Modules.Database + +Public Class Environment Public User As State.UserState + Public Database As MSSQLServer Public Modules As Dictionary(Of String, State.ModuleState) End Class diff --git a/Modules/ZooFlow/Params/ClipboardWatcherParams.vb b/Modules/ZooFlow/Params/ClipboardWatcherParams.vb index 9c4e4897..c786bf17 100644 --- a/Modules/ZooFlow/Params/ClipboardWatcherParams.vb +++ b/Modules/ZooFlow/Params/ClipboardWatcherParams.vb @@ -1,5 +1,8 @@ -Imports DigitalData.Modules.ZooFlow.Params +Imports System.Windows.Forms +Imports DigitalData.Modules.ZooFlow.Params Public Class ClipboardWatcherParams + Public ClipboardContents As String Public MatchingProfiles As List(Of ProfileData) + Public MatchTreeView As TreeView End Class diff --git a/Modules/ZooFlow/ZooFlow.vbproj b/Modules/ZooFlow/ZooFlow.vbproj index 6e22bcfa..67d2f623 100644 --- a/Modules/ZooFlow/ZooFlow.vbproj +++ b/Modules/ZooFlow/ZooFlow.vbproj @@ -117,6 +117,10 @@ + + {EAF0EA75-5FA7-485D-89C7-B2D843B03A96} + Database + {d3c8cfed-d6f6-43a8-9bdf-454145d0352f} Language diff --git a/ZooFlow/ClassFlowForm.vb b/ZooFlow/ClassFlowForm.vb index d748449c..ebe9226a 100644 --- a/ZooFlow/ClassFlowForm.vb +++ b/ZooFlow/ClassFlowForm.vb @@ -91,19 +91,6 @@ Public Class ClassFlowForm TopMost = True End Sub - - - Private Sub Form_Load(ByVal sender As Object, ByVal e As EventArgs) - 'AddHandler MouseDown, New MouseEventHandler(AddressOf Form_MouseDown) - End Sub - - 'Private Sub Form_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseDown - ' If e.Button = MouseButtons.Left Then - ' Win32.ReleaseCapture() - ' Win32.SendMessage(Handle, Win32.WM_NCLBUTTONDOWN, Win32.HTCAPTION, 0) - ' End If - 'End Sub - Public Sub SetBitmap(ByVal bitmap As Bitmap) SetBitmap(bitmap, 255, bitmap.Width, bitmap.Height) End Sub diff --git a/ZooFlow/frmFlowForm.vb b/ZooFlow/frmFlowForm.vb index dbc2943f..537c4576 100644 --- a/ZooFlow/frmFlowForm.vb +++ b/ZooFlow/frmFlowForm.vb @@ -18,12 +18,15 @@ Public Class frmFlowForm Private Sub frmFlowForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load ' === Set Form Properties === + TopMost = True AllowDrop = True ShowInTaskbar = False SetFlowFormState(OnFlowFormStateChangedEvent.FlowFormState.Default) ' === Register Events === - AddHandler Click, AddressOf frmFlowForm_Click + + AddHandler MouseClick, New MouseEventHandler(AddressOf Form_MouseClick) + AddHandler MouseMove, New MouseEventHandler(AddressOf Form_MouseMove) ' === Register As Event Listener === EventBus.Instance.Register(Me) @@ -33,13 +36,20 @@ Public Class frmFlowForm EventBus.Instance.Unregister(Me) End Sub - Private Sub frmFlowForm_Click(sender As Object, e As EventArgs) + Private Sub Form_MouseClick(sender As Object, e As EventArgs) If CurrentState = OnFlowFormStateChangedEvent.FlowFormState.HasSearchResults Then SetFlowFormState(OnFlowFormStateChangedEvent.FlowFormState.Default) EventBus.Instance.PostEvent(New OnFlowFormInteractionEvent(OnFlowFormInteractionEvent.FlowFormInteraction.Click)) End If End Sub + Private Sub Form_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) + If e.Button = MouseButtons.Left Then + Win32.ReleaseCapture() + Win32.SendMessage(Handle, Win32.WM_NCLBUTTONDOWN, Win32.HTCAPTION, 0) + End If + End Sub + Public Sub OnEvent(e As OnFlowFormStateChangedEvent) CurrentState = e.State SetFlowFormState(e.State) diff --git a/ZooFlow/frmMain.vb b/ZooFlow/frmMain.vb index 58fd44ea..a5676cc3 100644 --- a/ZooFlow/frmMain.vb +++ b/ZooFlow/frmMain.vb @@ -16,6 +16,7 @@ Partial Public Class frmMain Private Loading As Boolean = True Private Logger As Logger = My.LogConfig.GetLogger Private MatchingProfiles As List(Of ProfileData) + Private MatchTreeView As New TreeView Public Sub New() InitializeComponent() @@ -34,6 +35,8 @@ Partial Public Class frmMain EventBus.Instance.Register(Me) End Sub + + Private Sub frmMain_FormClosed(sender As Object, e As FormClosedEventArgs) EventBus.Instance.Unregister(Me) End Sub @@ -41,12 +44,16 @@ Partial Public Class frmMain Public Sub OnEvent(e As OnFlowFormInteractionEvent) Select Case e.Interaction Case OnFlowFormInteractionEvent.FlowFormInteraction.Click + Dim oClipboardContents As String = Clipboard.GetText() Dim oEnvironment As New Environment() With { .User = My.Application.User, - .Modules = My.Application.Modules + .Modules = My.Application.Modules, + .Database = My.Database } Dim oParams As New ClipboardWatcherParams() With { - .MatchingProfiles = MatchingProfiles + .MatchingProfiles = MatchingProfiles, + .MatchTreeView = MatchTreeView, + .ClipboardContents = oClipboardContents } Dim oForm As New frmMatch(My.LogConfig, oEnvironment, oParams) oForm.Show() @@ -75,7 +82,7 @@ Partial Public Class frmMain End Sub Private Sub frmMain_Shown(sender As Object, e As EventArgs) - Hide() + WindowState = FormWindowState.Minimized End Sub Private Async Sub FlowForm_ClipboardChanged(sender As Object, e As IDataObject) Handles FlowForm.ClipboardChanged @@ -91,14 +98,12 @@ Partial Public Class frmMain Dim oClipboardContents As String = Clipboard.GetText() Try - Dim oTreeView As New TreeView - oProfileFilter = New ProfileFilter(My.LogConfig, My.Application.ClipboardWatcher.UserProfiles, My.Application.ClipboardWatcher.ProfileProcesses, My.Application.ClipboardWatcher.ProfileWindows, My.Application.ClipboardWatcher.ProfileControls, - oTreeView) + MatchTreeView) oMatchingProfiles = oProfileFilter.Profiles oMatchingProfiles = oProfileFilter.FilterProfilesByClipboardRegex(oMatchingProfiles, oClipboardContents) @@ -112,8 +117,6 @@ Partial Public Class frmMain My.Application.User) End Function) oMatchingProfiles = oProfileFilter.ClearNotMatchedProfiles(oMatchingProfiles) - - oMatchingProfiles = oMatchingProfiles.ToList() Catch ex As Exception MsgBox("Fehler beim Laden der Profile. Möglicherweise liegt ein Konfigurationsfehler vor.", MsgBoxStyle.Critical, Text) Exit Sub @@ -193,4 +196,6 @@ Partial Public Class frmMain Logger.Error(ex) End Try End Sub + + End Class