From 80029dcb9925c5edd5a7d0203525a8d5f01e9a0a Mon Sep 17 00:00:00 2001 From: Developer02 Digital Data Date: Tue, 15 Oct 2019 16:16:50 +0200 Subject: [PATCH] prepare release and fix marvman's bugs --- app/DD_Clipboard_Searcher/ClassConstants.vb | 4 + app/DD_Clipboard_Searcher/ClassInit.vb | 4 +- app/DD_Clipboard_Searcher/ClassLicense.vb | 2 +- .../MyDataset.Designer.vb | 406 ++++++++++++++++++ app/DD_Clipboard_Searcher/MyDataset.xsd | 44 +- app/DD_Clipboard_Searcher/MyDataset.xss | 39 +- .../ctrlApplicationAssignment.vb | 53 ++- .../frmAdministration.Designer.vb | 52 ++- .../frmAdministration.resx | 30 +- .../frmAdministration.vb | 26 ++ .../frmControlCapture.Designer.vb | 57 +-- .../frmControlCapture.vb | 29 +- app/DD_Clipboard_Searcher/frmStart.vb | 4 +- 13 files changed, 640 insertions(+), 110 deletions(-) diff --git a/app/DD_Clipboard_Searcher/ClassConstants.vb b/app/DD_Clipboard_Searcher/ClassConstants.vb index c59a536..f18a4f4 100644 --- a/app/DD_Clipboard_Searcher/ClassConstants.vb +++ b/app/DD_Clipboard_Searcher/ClassConstants.vb @@ -11,4 +11,8 @@ Public Const PROFILE_TYPE_DATA_DOCS As Integer = 0 Public Const PROFILE_TYPE_DOCS_ONLY As Integer = 1 Public Const PROFILE_TYPE_DATA_ONLY As Integer = 2 + + Public Const SEARCH_POSITION_PRIMARY As Integer = 0 + Public Const SEARCH_POSITION_SECONDARY As Integer = 1 + Public Const SEARCH_POSITION_TERTIARY As Integer = 2 End Class diff --git a/app/DD_Clipboard_Searcher/ClassInit.vb b/app/DD_Clipboard_Searcher/ClassInit.vb index 9acfbf3..ac51081 100644 --- a/app/DD_Clipboard_Searcher/ClassInit.vb +++ b/app/DD_Clipboard_Searcher/ClassInit.vb @@ -187,8 +187,8 @@ Public Class ClassInit ' pageAdmin.Visible = True End If - WD_UNICODE = Database.NewExecuteScalar("SELECT WD_UNICODE FROM TBCW_CONFIGURATION WHERE GUID = 1") - GDPICTURE_LICENSE = Database.NewExecuteScalar("SELECT GDPICTURE_LICENSE FROM TBCW_CONFIGURATION WHERE GUID = 1") + WD_UNICODE = Database.GetScalarValue("SELECT WD_UNICODE FROM TBCW_CONFIGURATION WHERE GUID = 1") + GDPICTURE_LICENSE = Database.GetScalarValue("SELECT GDPICTURE_LICENSE FROM TBCW_CONFIGURATION WHERE GUID = 1") Logger.Debug(" >> Count Users logged in: " & USERCOUNT_LOGGED_IN.ToString, False) If LICENSE_COUNT < USERCOUNT_LOGGED_IN And LICENSE_EXPIRED = False Then diff --git a/app/DD_Clipboard_Searcher/ClassLicense.vb b/app/DD_Clipboard_Searcher/ClassLicense.vb index 0c60eb2..e8e944f 100644 --- a/app/DD_Clipboard_Searcher/ClassLicense.vb +++ b/app/DD_Clipboard_Searcher/ClassLicense.vb @@ -4,7 +4,7 @@ Public Class ClassLicense Private Shared Sub Get_License(CLIENT_ID As Integer) Dim sql As String = String.Format("SELECT LICENSE_DDCBSEARCHER FROM TBDD_CLIENT WHERE GUID = {0}", CLIENT_ID) - lic_string = Database.NewExecuteScalar(sql) + lic_string = Database.GetScalarValue(sql) End Sub Public Shared Sub Refresh_Licence(CLIENT_ID As Integer) Try diff --git a/app/DD_Clipboard_Searcher/MyDataset.Designer.vb b/app/DD_Clipboard_Searcher/MyDataset.Designer.vb index b8bab74..a79a7af 100644 --- a/app/DD_Clipboard_Searcher/MyDataset.Designer.vb +++ b/app/DD_Clipboard_Searcher/MyDataset.Designer.vb @@ -53,6 +53,8 @@ Partial Public Class MyDataset Private tableTBWH_PROFILE_TYPE As TBWH_PROFILE_TYPEDataTable + Private tableTBWH_SEARCH_POSITION As TBWH_SEARCH_POSITIONDataTable + Private relationFK_TBCW_PROF_DATA_SEARCH_PROF_IF As Global.System.Data.DataRelation Private relationFK_TBCW_PROF_DOC_SEARCH_PROF_IF As Global.System.Data.DataRelation @@ -132,6 +134,9 @@ Partial Public Class MyDataset If (Not (ds.Tables("TBWH_PROFILE_TYPE")) Is Nothing) Then MyBase.Tables.Add(New TBWH_PROFILE_TYPEDataTable(ds.Tables("TBWH_PROFILE_TYPE"))) End If + If (Not (ds.Tables("TBWH_SEARCH_POSITION")) Is Nothing) Then + MyBase.Tables.Add(New TBWH_SEARCH_POSITIONDataTable(ds.Tables("TBWH_SEARCH_POSITION"))) + End If Me.DataSetName = ds.DataSetName Me.Prefix = ds.Prefix Me.Namespace = ds.Namespace @@ -289,6 +294,16 @@ Partial Public Class MyDataset End Get End Property + _ + Public ReadOnly Property TBWH_SEARCH_POSITION() As TBWH_SEARCH_POSITIONDataTable + Get + Return Me.tableTBWH_SEARCH_POSITION + End Get + End Property + _ + Private Function ShouldSerializeTBWH_SEARCH_POSITION() As Boolean + Return false + End Function + _ Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs) @@ -750,6 +782,9 @@ Partial Public Class MyDataset _ Public Delegate Sub TBWH_PROFILE_TYPERowChangeEventHandler(ByVal sender As Object, ByVal e As TBWH_PROFILE_TYPERowChangeEvent) + _ + Public Delegate Sub TBWH_SEARCH_POSITIONRowChangeEventHandler(ByVal sender As Object, ByVal e As TBWH_SEARCH_POSITIONRowChangeEvent) + ''' '''Represents the strongly named DataTable class. ''' @@ -5817,6 +5852,271 @@ Partial Public Class MyDataset End Function End Class + ''' + '''Represents the strongly named DataTable class. + ''' + _ + Partial Public Class TBWH_SEARCH_POSITIONDataTable + Inherits Global.System.Data.TypedTableBase(Of TBWH_SEARCH_POSITIONRow) + + Private columnPOSITION_INDEX As Global.System.Data.DataColumn + + Private columnPOSITION_NAME As Global.System.Data.DataColumn + + _ + Public Sub New() + MyBase.New + Me.TableName = "TBWH_SEARCH_POSITION" + Me.BeginInit + Me.InitClass + Me.EndInit + End Sub + + _ + Friend Sub New(ByVal table As Global.System.Data.DataTable) + MyBase.New + Me.TableName = table.TableName + If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then + Me.CaseSensitive = table.CaseSensitive + End If + If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then + Me.Locale = table.Locale + End If + If (table.Namespace <> table.DataSet.Namespace) Then + Me.Namespace = table.Namespace + End If + Me.Prefix = table.Prefix + Me.MinimumCapacity = table.MinimumCapacity + End Sub + + _ + Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) + MyBase.New(info, context) + Me.InitVars + End Sub + + _ + Public ReadOnly Property POSITION_INDEXColumn() As Global.System.Data.DataColumn + Get + Return Me.columnPOSITION_INDEX + End Get + End Property + + _ + Public ReadOnly Property POSITION_NAMEColumn() As Global.System.Data.DataColumn + Get + Return Me.columnPOSITION_NAME + End Get + End Property + + _ + Public ReadOnly Property Count() As Integer + Get + Return Me.Rows.Count + End Get + End Property + + _ + Public Default ReadOnly Property Item(ByVal index As Integer) As TBWH_SEARCH_POSITIONRow + Get + Return CType(Me.Rows(index),TBWH_SEARCH_POSITIONRow) + End Get + End Property + + _ + Public Event TBWH_SEARCH_POSITIONRowChanging As TBWH_SEARCH_POSITIONRowChangeEventHandler + + _ + Public Event TBWH_SEARCH_POSITIONRowChanged As TBWH_SEARCH_POSITIONRowChangeEventHandler + + _ + Public Event TBWH_SEARCH_POSITIONRowDeleting As TBWH_SEARCH_POSITIONRowChangeEventHandler + + _ + Public Event TBWH_SEARCH_POSITIONRowDeleted As TBWH_SEARCH_POSITIONRowChangeEventHandler + + _ + Public Overloads Sub AddTBWH_SEARCH_POSITIONRow(ByVal row As TBWH_SEARCH_POSITIONRow) + Me.Rows.Add(row) + End Sub + + _ + Public Overloads Function AddTBWH_SEARCH_POSITIONRow(ByVal POSITION_INDEX As String, ByVal POSITION_NAME As String) As TBWH_SEARCH_POSITIONRow + Dim rowTBWH_SEARCH_POSITIONRow As TBWH_SEARCH_POSITIONRow = CType(Me.NewRow,TBWH_SEARCH_POSITIONRow) + Dim columnValuesArray() As Object = New Object() {POSITION_INDEX, POSITION_NAME} + rowTBWH_SEARCH_POSITIONRow.ItemArray = columnValuesArray + Me.Rows.Add(rowTBWH_SEARCH_POSITIONRow) + Return rowTBWH_SEARCH_POSITIONRow + End Function + + _ + Public Overrides Function Clone() As Global.System.Data.DataTable + Dim cln As TBWH_SEARCH_POSITIONDataTable = CType(MyBase.Clone,TBWH_SEARCH_POSITIONDataTable) + cln.InitVars + Return cln + End Function + + _ + Protected Overrides Function CreateInstance() As Global.System.Data.DataTable + Return New TBWH_SEARCH_POSITIONDataTable() + End Function + + _ + Friend Sub InitVars() + Me.columnPOSITION_INDEX = MyBase.Columns("POSITION_INDEX") + Me.columnPOSITION_NAME = MyBase.Columns("POSITION_NAME") + End Sub + + _ + Private Sub InitClass() + Me.columnPOSITION_INDEX = New Global.System.Data.DataColumn("POSITION_INDEX", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnPOSITION_INDEX) + Me.columnPOSITION_NAME = New Global.System.Data.DataColumn("POSITION_NAME", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnPOSITION_NAME) + End Sub + + _ + Public Function NewTBWH_SEARCH_POSITIONRow() As TBWH_SEARCH_POSITIONRow + Return CType(Me.NewRow,TBWH_SEARCH_POSITIONRow) + End Function + + _ + Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow + Return New TBWH_SEARCH_POSITIONRow(builder) + End Function + + _ + Protected Overrides Function GetRowType() As Global.System.Type + Return GetType(TBWH_SEARCH_POSITIONRow) + End Function + + _ + Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanged(e) + If (Not (Me.TBWH_SEARCH_POSITIONRowChangedEvent) Is Nothing) Then + RaiseEvent TBWH_SEARCH_POSITIONRowChanged(Me, New TBWH_SEARCH_POSITIONRowChangeEvent(CType(e.Row,TBWH_SEARCH_POSITIONRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanging(e) + If (Not (Me.TBWH_SEARCH_POSITIONRowChangingEvent) Is Nothing) Then + RaiseEvent TBWH_SEARCH_POSITIONRowChanging(Me, New TBWH_SEARCH_POSITIONRowChangeEvent(CType(e.Row,TBWH_SEARCH_POSITIONRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleted(e) + If (Not (Me.TBWH_SEARCH_POSITIONRowDeletedEvent) Is Nothing) Then + RaiseEvent TBWH_SEARCH_POSITIONRowDeleted(Me, New TBWH_SEARCH_POSITIONRowChangeEvent(CType(e.Row,TBWH_SEARCH_POSITIONRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleting(e) + If (Not (Me.TBWH_SEARCH_POSITIONRowDeletingEvent) Is Nothing) Then + RaiseEvent TBWH_SEARCH_POSITIONRowDeleting(Me, New TBWH_SEARCH_POSITIONRowChangeEvent(CType(e.Row,TBWH_SEARCH_POSITIONRow), e.Action)) + End If + End Sub + + _ + Public Sub RemoveTBWH_SEARCH_POSITIONRow(ByVal row As TBWH_SEARCH_POSITIONRow) + Me.Rows.Remove(row) + End Sub + + _ + Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType + Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() + Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() + Dim ds As MyDataset = New MyDataset() + Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any1.Namespace = "http://www.w3.org/2001/XMLSchema" + any1.MinOccurs = New Decimal(0) + any1.MaxOccurs = Decimal.MaxValue + any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any1) + Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" + any2.MinOccurs = New Decimal(1) + any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any2) + Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute1.Name = "namespace" + attribute1.FixedValue = ds.Namespace + type.Attributes.Add(attribute1) + Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute2.Name = "tableTypeName" + attribute2.FixedValue = "TBWH_SEARCH_POSITIONDataTable" + type.Attributes.Add(attribute2) + type.Particle = sequence + Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable + If xs.Contains(dsSchema.TargetNamespace) Then + Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Try + Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing + dsSchema.Write(s1) + Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator + Do While schemas.MoveNext + schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) + s2.SetLength(0) + schema.Write(s2) + If (s1.Length = s2.Length) Then + s1.Position = 0 + s2.Position = 0 + + Do While ((s1.Position <> s1.Length) _ + AndAlso (s1.ReadByte = s2.ReadByte)) + + + Loop + If (s1.Position = s1.Length) Then + Return type + End If + End If + + Loop + Finally + If (Not (s1) Is Nothing) Then + s1.Close + End If + If (Not (s2) Is Nothing) Then + s2.Close + End If + End Try + End If + xs.Add(dsSchema) + Return type + End Function + End Class + ''' '''Represents strongly named DataRow class. ''' @@ -8013,6 +8313,76 @@ Partial Public Class MyDataset End Sub End Class + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class TBWH_SEARCH_POSITIONRow + Inherits Global.System.Data.DataRow + + Private tableTBWH_SEARCH_POSITION As TBWH_SEARCH_POSITIONDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableTBWH_SEARCH_POSITION = CType(Me.Table,TBWH_SEARCH_POSITIONDataTable) + End Sub + + _ + Public Property POSITION_INDEX() As String + Get + Try + Return CType(Me(Me.tableTBWH_SEARCH_POSITION.POSITION_INDEXColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte POSITION_INDEX in Tabelle TBWH_SEARCH_POSITION ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBWH_SEARCH_POSITION.POSITION_INDEXColumn) = value + End Set + End Property + + _ + Public Property POSITION_NAME() As String + Get + Try + Return CType(Me(Me.tableTBWH_SEARCH_POSITION.POSITION_NAMEColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte POSITION_NAME in Tabelle TBWH_SEARCH_POSITION ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBWH_SEARCH_POSITION.POSITION_NAMEColumn) = value + End Set + End Property + + _ + Public Function IsPOSITION_INDEXNull() As Boolean + Return Me.IsNull(Me.tableTBWH_SEARCH_POSITION.POSITION_INDEXColumn) + End Function + + _ + Public Sub SetPOSITION_INDEXNull() + Me(Me.tableTBWH_SEARCH_POSITION.POSITION_INDEXColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsPOSITION_NAMENull() As Boolean + Return Me.IsNull(Me.tableTBWH_SEARCH_POSITION.POSITION_NAMEColumn) + End Function + + _ + Public Sub SetPOSITION_NAMENull() + Me(Me.tableTBWH_SEARCH_POSITION.POSITION_NAMEColumn) = Global.System.Convert.DBNull + End Sub + End Class + ''' '''Row event argument class ''' @@ -8516,6 +8886,42 @@ Partial Public Class MyDataset End Get End Property End Class + + ''' + '''Row event argument class + ''' + _ + Public Class TBWH_SEARCH_POSITIONRowChangeEvent + Inherits Global.System.EventArgs + + Private eventRow As TBWH_SEARCH_POSITIONRow + + Private eventAction As Global.System.Data.DataRowAction + + _ + Public Sub New(ByVal row As TBWH_SEARCH_POSITIONRow, ByVal action As Global.System.Data.DataRowAction) + MyBase.New + Me.eventRow = row + Me.eventAction = action + End Sub + + _ + Public ReadOnly Property Row() As TBWH_SEARCH_POSITIONRow + Get + Return Me.eventRow + End Get + End Property + + _ + Public ReadOnly Property Action() As Global.System.Data.DataRowAction + Get + Return Me.eventAction + End Get + End Property + End Class End Class Namespace MyDatasetTableAdapters diff --git a/app/DD_Clipboard_Searcher/MyDataset.xsd b/app/DD_Clipboard_Searcher/MyDataset.xsd index 629eb38..c572a84 100644 --- a/app/DD_Clipboard_Searcher/MyDataset.xsd +++ b/app/DD_Clipboard_Searcher/MyDataset.xsd @@ -826,7 +826,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -872,7 +872,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -889,7 +889,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -918,7 +918,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -929,7 +929,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -952,7 +952,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -1000,7 +1000,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -1048,7 +1048,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -1065,7 +1065,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -1073,7 +1073,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -1087,7 +1087,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -1095,7 +1095,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -1134,7 +1134,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -1207,7 +1207,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - + @@ -1262,6 +1262,14 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH + + + + + + + + @@ -1311,10 +1319,10 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH - - - - + + + + \ No newline at end of file diff --git a/app/DD_Clipboard_Searcher/MyDataset.xss b/app/DD_Clipboard_Searcher/MyDataset.xss index 37e57bb..7139005 100644 --- a/app/DD_Clipboard_Searcher/MyDataset.xss +++ b/app/DD_Clipboard_Searcher/MyDataset.xss @@ -4,25 +4,26 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + 254 @@ -34,7 +35,7 @@ - + 254 @@ -46,7 +47,7 @@ - + 310 @@ -58,7 +59,7 @@ - + 165 diff --git a/app/DD_Clipboard_Searcher/ctrlApplicationAssignment.vb b/app/DD_Clipboard_Searcher/ctrlApplicationAssignment.vb index 27b5c01..16bae35 100644 --- a/app/DD_Clipboard_Searcher/ctrlApplicationAssignment.vb +++ b/app/DD_Clipboard_Searcher/ctrlApplicationAssignment.vb @@ -4,6 +4,7 @@ Imports DevExpress.XtraEditors.Controls Imports DevExpress.XtraGrid Imports DevExpress.XtraGrid.Views.Grid Imports DigitalData.Controls.RegexEditor +Imports DigitalData.Modules.Windows.Window Public Class ctrlApplicationAssignment Public AppSelectionString As String @@ -164,6 +165,8 @@ Public Class ctrlApplicationAssignment TBCW_PROF_REL_WINDOWTableAdapter.Update(MyDataset.TBCW_PROF_REL_WINDOW) Return True End If + + Return True Catch ex As Exception Logger.Error(ex) Return False @@ -219,9 +222,50 @@ Public Class ctrlApplicationAssignment End Function Public Function Control_EditAssignment() As Boolean - Dim oForm As New frmControlCapture(EditMode:=True) + Dim oHandles As List(Of Integer) = GridView_Control. + GetSelectedRows(). + ToList() + + If oHandles.Count <> 1 Then + Return False + End If + + Dim oHandle As Integer = oHandles.FirstOrDefault() + Dim oRow = GridView_Control.GetDataRow(oHandle) + + Dim oControlName As String = oRow.Item("CONTROL_NAME") + Dim oTopLeft As New RectangleInfo() With { + .Top = oRow.Item("TOPLEFT_TOP"), + .Left = oRow.Item("TOPLEFT_LEFT"), + .Right = oRow.Item("TOPLEFT_RIGHT"), + .Bottom = oRow.Item("TOPLEFT_BOTTOM") + } + + Dim oTopRight As New RectangleInfo() With { + .Top = oRow.Item("TOPRIGHT_TOP"), + .Left = oRow.Item("TOPRIGHT_LEFT"), + .Right = oRow.Item("TOPRIGHT_RIGHT"), + .Bottom = oRow.Item("TOPRIGHT_BOTTOM") + } + + Dim oBottomLeft As New RectangleInfo() With { + .Top = oRow.Item("BOTTOMLEFT_TOP"), + .Left = oRow.Item("BOTTOMLEFT_LEFT"), + .Right = oRow.Item("BOTTOMLEFT_RIGHT"), + .Bottom = oRow.Item("BOTTOMLEFT_BOTTOM") + } + + Dim oBottomRight As New RectangleInfo() With { + .Top = oRow.Item("BOTTOMRIGHT_TOP"), + .Left = oRow.Item("BOTTOMRIGHT_LEFT"), + .Right = oRow.Item("BOTTOMRIGHT_RIGHT"), + .Bottom = oRow.Item("BOTTOMRIGHT_BOTTOM") + } + + Dim oBounds As String = frmControlCapture.GetBoundsString(oTopLeft, oTopRight, oBottomLeft, oBottomRight) + Dim oForm As New frmControlCapture(EditMode:=True, ControlBounds:=oBounds, ControlName:=oControlName) + Dim oResult = oForm.ShowDialog() - Dim oControlId As Integer() = GridView_Control.GetSelectedRows() If oResult = DialogResult.OK Then Try @@ -296,6 +340,9 @@ Public Class ctrlApplicationAssignment End Function Private Sub GridViewProcessProfile_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs) Handles GridViewProcessProfile.FocusedRowChanged + MyDataset.TBCW_PROF_REL_CONTROL.Clear() + MyDataset.TBCW_PROF_REL_WINDOW.Clear() + If e.FocusedRowHandle < 0 Then Exit Sub End If @@ -306,8 +353,6 @@ Public Class ctrlApplicationAssignment AppSelectionString = $"Selected Profile: {oPRocessGUID}-{oProcessName}" CURRENT_PROCESSID = oPRocessGUID CURRENT_PROCESSNAME = oProcessName - MyDataset.TBCW_PROF_REL_CONTROL.Clear() - MyDataset.TBCW_PROF_REL_WINDOW.Clear() If Window_Load() = False Then MsgBox($"Error while loading windows for process {oProcessName}", vbCritical, "") diff --git a/app/DD_Clipboard_Searcher/frmAdministration.Designer.vb b/app/DD_Clipboard_Searcher/frmAdministration.Designer.vb index c167015..5034c32 100644 --- a/app/DD_Clipboard_Searcher/frmAdministration.Designer.vb +++ b/app/DD_Clipboard_Searcher/frmAdministration.Designer.vb @@ -78,6 +78,7 @@ Partial Class frmAdministration Me.BarButtonItem25 = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem26 = New DevExpress.XtraBars.BarButtonItem() Me.labelSelection = New DevExpress.XtraBars.BarStaticItem() + Me.BarButtonItem27 = New DevExpress.XtraBars.BarButtonItem() Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonGroup_Profile = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonGroup_DocSearch = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() @@ -120,7 +121,8 @@ Partial Class frmAdministration Me.MemoEdit5 = New DevExpress.XtraEditors.MemoEdit() Me.MemoEdit6 = New DevExpress.XtraEditors.MemoEdit() Me.txtDOC_GUID = New DevExpress.XtraEditors.TextEdit() - Me.TextEdit19 = New DevExpress.XtraEditors.ComboBoxEdit() + Me.TextEdit19 = New DevExpress.XtraEditors.LookUpEdit() + Me.TBWHSEARCHPOSITIONBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.LayoutControlGroup2 = New DevExpress.XtraLayout.LayoutControlGroup() Me.LayoutControlItem29 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem30 = New DevExpress.XtraLayout.LayoutControlItem() @@ -149,7 +151,7 @@ Partial Class frmAdministration Me.MemoEdit3 = New DevExpress.XtraEditors.MemoEdit() Me.MemoEdit4 = New DevExpress.XtraEditors.MemoEdit() Me.txtDATAGUID = New DevExpress.XtraEditors.TextEdit() - Me.TextEdit10 = New DevExpress.XtraEditors.ComboBoxEdit() + Me.TextEdit10 = New DevExpress.XtraEditors.LookUpEdit() Me.LayoutControlGroup3 = New DevExpress.XtraLayout.LayoutControlGroup() Me.LayoutControlItem10 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem14 = New DevExpress.XtraLayout.LayoutControlItem() @@ -211,7 +213,6 @@ Partial Class frmAdministration Me.LayoutControlItem19 = New DevExpress.XtraLayout.LayoutControlItem() Me.ComboBoxEdit1 = New DevExpress.XtraEditors.ComboBoxEdit() Me.SimpleSeparator1 = New DevExpress.XtraLayout.SimpleSeparator() - Me.BarButtonItem27 = New DevExpress.XtraBars.BarButtonItem() CType(Me.TBCW_PROFILESBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridControlProfiles, System.ComponentModel.ISupportInitialize).BeginInit() @@ -265,6 +266,7 @@ Partial Class frmAdministration CType(Me.MemoEdit6.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.txtDOC_GUID.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TextEdit19.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.TBWHSEARCHPOSITIONBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlGroup2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem29, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem30, System.ComponentModel.ISupportInitialize).BeginInit() @@ -537,6 +539,7 @@ Partial Class frmAdministration Me.RibbonControl2.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide Me.RibbonControl2.Size = New System.Drawing.Size(1365, 146) Me.RibbonControl2.StatusBar = Me.RibbonStatusBar1 + Me.RibbonControl2.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden ' 'ApplicationMenu1 ' @@ -764,6 +767,14 @@ Partial Class frmAdministration Me.labelSelection.Id = 12 Me.labelSelection.Name = "labelSelection" ' + 'BarButtonItem27 + ' + Me.BarButtonItem27.Caption = "Zuordnung bearbeiten" + Me.BarButtonItem27.Id = 13 + Me.BarButtonItem27.ImageOptions.Image = CType(resources.GetObject("BarButtonItem27.ImageOptions.Image"), System.Drawing.Image) + Me.BarButtonItem27.ImageOptions.LargeImage = CType(resources.GetObject("BarButtonItem27.ImageOptions.LargeImage"), System.Drawing.Image) + Me.BarButtonItem27.Name = "BarButtonItem27" + ' 'RibbonPage2 ' Me.RibbonPage2.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonGroup_Profile, Me.RibbonGroup_DocSearch, Me.RibbonGroup_DataSearch, Me.RibbonGroup_Process, Me.RibbonGroup_Window, Me.RibbonGroup_Control, Me.RibbonGroup_User, Me.RibbonGroup_Group}) @@ -1208,11 +1219,22 @@ Partial Class frmAdministration Me.TextEdit19.Name = "TextEdit19" Me.TextEdit19.Properties.AutoHeight = False Me.TextEdit19.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.TextEdit19.Properties.Items.AddRange(New Object() {"0", "1", "2", "3", "4"}) + Me.TextEdit19.Properties.Columns.AddRange(New DevExpress.XtraEditors.Controls.LookUpColumnInfo() {New DevExpress.XtraEditors.Controls.LookUpColumnInfo("POSITION_NAME", "Position", 93, DevExpress.Utils.FormatType.None, "", True, DevExpress.Utils.HorzAlignment.Near, DevExpress.Data.ColumnSortOrder.None, DevExpress.Utils.DefaultBoolean.[Default])}) + Me.TextEdit19.Properties.DataSource = Me.TBWHSEARCHPOSITIONBindingSource + Me.TextEdit19.Properties.DisplayMember = "POSITION_NAME" + Me.TextEdit19.Properties.NullText = "" + Me.TextEdit19.Properties.PopupSizeable = False + Me.TextEdit19.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard + Me.TextEdit19.Properties.ValueMember = "POSITION_INDEX" Me.TextEdit19.Size = New System.Drawing.Size(200, 20) Me.TextEdit19.StyleController = Me.LayoutControlDocs Me.TextEdit19.TabIndex = 10 ' + 'TBWHSEARCHPOSITIONBindingSource + ' + Me.TBWHSEARCHPOSITIONBindingSource.DataMember = "TBWH_SEARCH_POSITION" + Me.TBWHSEARCHPOSITIONBindingSource.DataSource = Me.MyDataset + ' 'LayoutControlGroup2 ' Me.LayoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] @@ -1534,7 +1556,13 @@ Partial Class frmAdministration Me.TextEdit10.Name = "TextEdit10" Me.TextEdit10.Properties.AutoHeight = False Me.TextEdit10.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.TextEdit10.Properties.Items.AddRange(New Object() {"0", "1", "2", "3", "4"}) + Me.TextEdit10.Properties.Columns.AddRange(New DevExpress.XtraEditors.Controls.LookUpColumnInfo() {New DevExpress.XtraEditors.Controls.LookUpColumnInfo("POSITION_NAME", "Position", 93, DevExpress.Utils.FormatType.None, "", True, DevExpress.Utils.HorzAlignment.Near, DevExpress.Data.ColumnSortOrder.None, DevExpress.Utils.DefaultBoolean.[Default])}) + Me.TextEdit10.Properties.DataSource = Me.TBWHSEARCHPOSITIONBindingSource + Me.TextEdit10.Properties.DisplayMember = "POSITION_NAME" + Me.TextEdit10.Properties.NullText = "" + Me.TextEdit10.Properties.PopupSizeable = False + Me.TextEdit10.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard + Me.TextEdit10.Properties.ValueMember = "POSITION_INDEX" Me.TextEdit10.Size = New System.Drawing.Size(200, 20) Me.TextEdit10.StyleController = Me.LayoutControlData Me.TextEdit10.TabIndex = 10 @@ -2137,14 +2165,6 @@ Partial Class frmAdministration Me.SimpleSeparator1.Name = "SimpleSeparator1" Me.SimpleSeparator1.Size = New System.Drawing.Size(280, 2) ' - 'BarButtonItem27 - ' - Me.BarButtonItem27.Caption = "Zuordnung bearbeiten" - Me.BarButtonItem27.Id = 13 - Me.BarButtonItem27.ImageOptions.Image = CType(resources.GetObject("BarButtonItem27.ImageOptions.Image"), System.Drawing.Image) - Me.BarButtonItem27.ImageOptions.LargeImage = CType(resources.GetObject("BarButtonItem27.ImageOptions.LargeImage"), System.Drawing.Image) - Me.BarButtonItem27.Name = "BarButtonItem27" - ' 'frmAdministration ' Me.Appearance.Options.UseFont = True @@ -2214,6 +2234,7 @@ Partial Class frmAdministration CType(Me.MemoEdit6.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.txtDOC_GUID.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TextEdit19.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.TBWHSEARCHPOSITIONBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlGroup2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem29, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem30, System.ComponentModel.ISupportInitialize).EndInit() @@ -2470,8 +2491,6 @@ Partial Class frmAdministration Friend WithEvents LayoutControlItem34 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents EmptySpaceItem2 As DevExpress.XtraLayout.EmptySpaceItem Friend WithEvents EmptySpaceItem3 As DevExpress.XtraLayout.EmptySpaceItem - Friend WithEvents TextEdit19 As DevExpress.XtraEditors.ComboBoxEdit - Friend WithEvents TextEdit10 As DevExpress.XtraEditors.ComboBoxEdit Friend WithEvents BarButtonItem23 As DevExpress.XtraBars.BarButtonItem Friend WithEvents RibbonGroup_Control As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents BarButtonItem24 As DevExpress.XtraBars.BarButtonItem @@ -2479,4 +2498,7 @@ Partial Class frmAdministration Friend WithEvents BarButtonItem26 As DevExpress.XtraBars.BarButtonItem Friend WithEvents labelSelection As DevExpress.XtraBars.BarStaticItem Friend WithEvents BarButtonItem27 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents TextEdit19 As DevExpress.XtraEditors.LookUpEdit + Friend WithEvents TBWHSEARCHPOSITIONBindingSource As BindingSource + Friend WithEvents TextEdit10 As DevExpress.XtraEditors.LookUpEdit End Class diff --git a/app/DD_Clipboard_Searcher/frmAdministration.resx b/app/DD_Clipboard_Searcher/frmAdministration.resx index 52d5149..a254e58 100644 --- a/app/DD_Clipboard_Searcher/frmAdministration.resx +++ b/app/DD_Clipboard_Searcher/frmAdministration.resx @@ -750,24 +750,23 @@ - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAIHRFWHRUaXRsZQBFZGl0O0Jh - cnM7UmliYm9uO1N0YW5kYXJkOzATw9sAAACMSURBVDhPrZJLDoAgDAW5E+fwUoY15+Euxq17ty6srbFY - GsJPXzLBpLxBDQYAPhEfnHNQ4HxWK8tEIiiF5t77VUu6BJhDS7oEEkyfQOYXATIuoAwLlm2HaQ6M7RJw - WUqaBepkwjYLMmWm/gmlMlL/ibQ59/o4MrimAg2FS0ISr3Ei0KDghgVcptJLMBcAmyZSCH4lCAAAAABJ - RU5ErkJggg== + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAgdEVYdFRpdGxlAEVkaXQ7QmFycztSaWJib247U3Rh + bmRhcmQ7MBPD2wAAAIxJREFUOE+tkksOgCAMBbkT5/BShjXn4S7GrXu3LqytsVgawk9fMsGkvEENBgA+ + ER+cc1DgfFYry0QiKIXm3vtVS7oEmENLugQSTJ9A5hcBMi6gDAuWbYdpDoztEnBZSpoF6mTCNgsyZab+ + CaUyUv+JtDn3+jgyuKYCDYVLQhKvcSLQoOCGBVym0kswFwCbJlIIfiUIAAAAAElFTkSuQmCC - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAIHRFWHRUaXRsZQBFZGl0O0Jh - cnM7UmliYm9uO1N0YW5kYXJkOzATw9sAAAEmSURBVFhH7ZJBDoIwEEW5E7cw8VKGLUfgHt7FsDJh71YX - 9X9kkraM0DZt2TDJCzAw859IY4w5FLVZE7VZE7VZE7VJuq4zkTzBBXB2hZZB1CbBEA7hxef7vv8Mw3DB - pb/LubZRmyRFYBxHVaKaAEuTqCrA8iWqC7AWiTclDhFgiQTurT5MQW2SFIENJjyi5qhNwsFctexSc9Qm - OQVOgZwCrOvt3gIe5XzOWQULOQUe00uCbVrcKi9ghdtvYAZVVkD55Y4EqpzAn9dORKLcX7ARLpT7CEPD - CR7PKxATTjCSTyAlnDihNjECseEEYzNOqA0F9mClhBPJcUJTwDIJ8YOlvwonMu8sSwHL7LCgcCLzzrIU - sMwP3Q0nMu8sSwHLbIGgcPKbN80XNOGDvft2XdIAAAAASUVORK5CYII= + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAgdEVYdFRpdGxlAEVkaXQ7QmFycztSaWJib247U3Rh + bmRhcmQ7MBPD2wAAASZJREFUWEftkkEOgjAQRbkTtzDxUoYtR+Ae3sWwMmHvVhf1f2SStozQNm3ZMMkL + MDDzn0hjjDkUtVkTtVkTtVkTtUm6rjORPMEFcHaFlkHUJsEQDuHF5/u+/wzDcMGlv8u5tlGbJEVgHEdV + opoAS5OoKsDyJaoLsBaJNyUOEWCJBO6tPkxBbZIUgQ0mPKLmqE3CwVy17FJz1CY5BU6BnAKs6+3eAh7l + fM5ZBQs5BR7TS4JtWtwqL2CF229gBlVWQPnljgSqnMCf105EotxfsBEulPsIQ8MJHs8rEBNOMJJPICWc + OKE2MQKx4QRjM06oDQX2YKWEE8lxQlPAMgnxg6W/Cicy7yxLAcvssKBwIvPOshSwzA/dDScy7yxLActs + gaBw8ps3zRc04YO9+3Zd0gAAAABJRU5ErkJggg== @@ -786,6 +785,9 @@ 17, 134 + + 499, 134 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m diff --git a/app/DD_Clipboard_Searcher/frmAdministration.vb b/app/DD_Clipboard_Searcher/frmAdministration.vb index 7929c2f..839b762 100644 --- a/app/DD_Clipboard_Searcher/frmAdministration.vb +++ b/app/DD_Clipboard_Searcher/frmAdministration.vb @@ -11,12 +11,17 @@ Public Class frmAdministration Public Overrides Function ToString() As String Return Name + Return Name End Function End Class Private Sub frmAdministration_Load(sender As Object, e As EventArgs) Handles MyBase.Load + ' Select first tab to prevent profile textbox from being empty + XtraTabControl3.SelectedTabPageIndex = 0 + Load_Profiles() Load_ProfileTypes() + Load_SearchPositions() Load_Connections() End Sub @@ -34,6 +39,22 @@ Public Class frmAdministration End Try End Sub + Sub Load_SearchPositions() + Dim oTypeNames As New Dictionary(Of Integer, String) From { + {ClassConstants.SEARCH_POSITION_PRIMARY, "Haupttabelle"}, + {ClassConstants.SEARCH_POSITION_SECONDARY, "Erste Detailtablle"}, + {ClassConstants.SEARCH_POSITION_TERTIARY, "Zweite Detailtablle"} + } + + MyDataset.TBWH_SEARCH_POSITION.Rows.Clear() + For Each oTypeName As KeyValuePair(Of Integer, String) In oTypeNames + Dim oRow = MyDataset.TBWH_SEARCH_POSITION.NewTBWH_SEARCH_POSITIONRow() + oRow.POSITION_INDEX = oTypeName.Key + oRow.POSITION_NAME = oTypeName.Value + MyDataset.TBWH_SEARCH_POSITION.Rows.Add(oRow) + Next + End Sub + Sub Load_ProfileTypes() Dim oTypeNames As New Dictionary(Of Integer, String) From { {ClassConstants.PROFILE_TYPE_DATA_DOCS, "Dokumente und Daten"}, @@ -267,6 +288,7 @@ Public Class frmAdministration End Sub Private Sub TBCW_PROF_DOC_SEARCHBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBCW_PROF_DOC_SEARCHBindingSource.AddingNew + MyDataset.TBCW_PROF_DOC_SEARCH.ADDED_WHOColumn.DefaultValue = Environment.UserName MyDataset.TBCW_PROF_DOC_SEARCH.ACTIVEColumn.DefaultValue = True MyDataset.TBCW_PROF_DOC_SEARCH.PROFILE_IDColumn.DefaultValue = PROFILE_IDTextBox.Text @@ -697,4 +719,8 @@ Public Class frmAdministration MsgBox("Profile has been duplicated. Please check the dependencies!", MsgBoxStyle.Information) End If End Sub + + Private Sub GridViewProfiles_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs) Handles GridViewProfiles.FocusedRowChanged + + End Sub End Class \ No newline at end of file diff --git a/app/DD_Clipboard_Searcher/frmControlCapture.Designer.vb b/app/DD_Clipboard_Searcher/frmControlCapture.Designer.vb index db004d9..83c319e 100644 --- a/app/DD_Clipboard_Searcher/frmControlCapture.Designer.vb +++ b/app/DD_Clipboard_Searcher/frmControlCapture.Designer.vb @@ -31,11 +31,11 @@ Partial Class frmControlCapture Me.rbControlName = New System.Windows.Forms.RadioButton() Me.rbControlPosition = New System.Windows.Forms.RadioButton() Me.gbControlName = New System.Windows.Forms.GroupBox() + Me.Label2 = New System.Windows.Forms.Label() + Me.txtControlName = New System.Windows.Forms.TextBox() Me.gbControlPosition = New System.Windows.Forms.GroupBox() - Me.TextBox1 = New System.Windows.Forms.TextBox() + Me.txtControlBounds = New System.Windows.Forms.TextBox() Me.Label1 = New System.Windows.Forms.Label() - Me.Label2 = New System.Windows.Forms.Label() - Me.TextBox2 = New System.Windows.Forms.TextBox() Me.gbControlName.SuspendLayout() Me.gbControlPosition.SuspendLayout() Me.SuspendLayout() @@ -109,7 +109,7 @@ Partial Class frmControlCapture Me.gbControlName.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.gbControlName.Controls.Add(Me.Label2) - Me.gbControlName.Controls.Add(Me.TextBox1) + Me.gbControlName.Controls.Add(Me.txtControlName) Me.gbControlName.Location = New System.Drawing.Point(140, 12) Me.gbControlName.Name = "gbControlName" Me.gbControlName.Size = New System.Drawing.Size(255, 100) @@ -117,11 +117,26 @@ Partial Class frmControlCapture Me.gbControlName.TabStop = False Me.gbControlName.Text = "Control Name" ' + 'Label2 + ' + Me.Label2.Location = New System.Drawing.Point(6, 49) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(243, 48) + Me.Label2.TabIndex = 0 + Me.Label2.Text = "Markieren Sie Text in einem Feld und Kopieren Sie Text" + ' + 'txtControlName + ' + Me.txtControlName.Location = New System.Drawing.Point(6, 20) + Me.txtControlName.Name = "txtControlName" + Me.txtControlName.Size = New System.Drawing.Size(243, 21) + Me.txtControlName.TabIndex = 0 + ' 'gbControlPosition ' Me.gbControlPosition.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.gbControlPosition.Controls.Add(Me.TextBox2) + Me.gbControlPosition.Controls.Add(Me.txtControlBounds) Me.gbControlPosition.Controls.Add(Me.Label1) Me.gbControlPosition.Location = New System.Drawing.Point(140, 118) Me.gbControlPosition.Name = "gbControlPosition" @@ -130,12 +145,13 @@ Partial Class frmControlCapture Me.gbControlPosition.TabStop = False Me.gbControlPosition.Text = "Control Position" ' - 'TextBox1 + 'txtControlBounds ' - Me.TextBox1.Location = New System.Drawing.Point(6, 20) - Me.TextBox1.Name = "TextBox1" - Me.TextBox1.Size = New System.Drawing.Size(243, 21) - Me.TextBox1.TabIndex = 0 + Me.txtControlBounds.Location = New System.Drawing.Point(9, 20) + Me.txtControlBounds.Multiline = True + Me.txtControlBounds.Name = "txtControlBounds" + Me.txtControlBounds.Size = New System.Drawing.Size(240, 77) + Me.txtControlBounds.TabIndex = 1 ' 'Label1 ' @@ -145,22 +161,6 @@ Partial Class frmControlCapture Me.Label1.TabIndex = 0 Me.Label1.Text = "Wechseln Sie durch die aktiven Anwendungen und klicken Sie in ein Feld" ' - 'Label2 - ' - Me.Label2.Location = New System.Drawing.Point(6, 49) - Me.Label2.Name = "Label2" - Me.Label2.Size = New System.Drawing.Size(243, 48) - Me.Label2.TabIndex = 0 - Me.Label2.Text = "Markieren Sie Text in einem Feld und Kopieren Sie Text" - ' - 'TextBox2 - ' - Me.TextBox2.Location = New System.Drawing.Point(9, 20) - Me.TextBox2.Multiline = True - Me.TextBox2.Name = "TextBox2" - Me.TextBox2.Size = New System.Drawing.Size(240, 77) - Me.TextBox2.TabIndex = 1 - ' 'frmControlCapture ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -176,6 +176,7 @@ Partial Class frmControlCapture Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "frmControlCapture" + Me.ShowIcon = False Me.Text = "Feld Auswertung" Me.TopMost = True Me.gbControlName.ResumeLayout(False) @@ -193,9 +194,9 @@ Partial Class frmControlCapture Friend WithEvents rbControlName As RadioButton Friend WithEvents rbControlPosition As RadioButton Friend WithEvents gbControlName As GroupBox - Friend WithEvents TextBox1 As TextBox + Friend WithEvents txtControlName As TextBox Friend WithEvents gbControlPosition As GroupBox Friend WithEvents Label2 As Label Friend WithEvents Label1 As Label - Friend WithEvents TextBox2 As TextBox + Friend WithEvents txtControlBounds As TextBox End Class diff --git a/app/DD_Clipboard_Searcher/frmControlCapture.vb b/app/DD_Clipboard_Searcher/frmControlCapture.vb index f174cfb..93b905c 100644 --- a/app/DD_Clipboard_Searcher/frmControlCapture.vb +++ b/app/DD_Clipboard_Searcher/frmControlCapture.vb @@ -8,18 +8,22 @@ Public Class frmControlCapture Public Property BottomRight As RectangleInfo Public Property ControlName As String + Public Property ControlBounds As String Private WithEvents Watcher As ClipboardWatcher = ClipboardWatcher.Singleton Private Window As Window Private EditMode As Boolean = False - Public Sub New(EditMode As Boolean) + + Public Sub New(EditMode As Boolean, Optional ControlBounds As String = "", Optional ControlName As String = "") ' Dieser Aufruf ist für den Designer erforderlich. InitializeComponent() ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. - EditMode = EditMode + Me.EditMode = EditMode + Me.ControlName = ControlName + Me.ControlBounds = ControlBounds End Sub Private Sub frmControlCapture_Load(sender As Object, e As EventArgs) Handles Me.Load @@ -27,6 +31,16 @@ Public Class frmControlCapture rbControlName.Checked = True + If ControlName <> String.Empty Then + rbControlName.Checked = True + txtControlName.Text = ControlName + End If + + If ControlBounds <> String.Empty Then + rbControlPosition.Checked = True + txtControlBounds.Text = ControlBounds + End If + AddHandler Watcher.Changed, AddressOf Watcher_Changed End Sub @@ -36,7 +50,7 @@ Public Class frmControlCapture Dim oControl As WindowInfo = Window.GetFocusedControl(Handle) If oControl IsNot Nothing Then - TextBox1.Text = oControl.ControlName + txtControlName.Text = oControl.ControlName ControlName = oControl.ControlName End If @@ -67,11 +81,11 @@ Public Class frmControlCapture End If End Select - TextBox2.Text = GetBoundsString() + txtControlBounds.Text = GetBoundsString(TopLeft, TopRight, BottomLeft, BottomRight) Next End Sub - Private Function GetBoundsString() + Public Shared Function GetBoundsString(TopLeft As RectangleInfo, TopRight As RectangleInfo, BottomLeft As RectangleInfo, BottomRight As RectangleInfo) Dim oResult As String = String.Empty If TopLeft IsNot Nothing Then @@ -90,6 +104,7 @@ Public Class frmControlCapture Return oResult End Function + Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles rbControlName.CheckedChanged gbControlName.Enabled = rbControlName.Checked gbControlPosition.Enabled = Not rbControlName.Checked @@ -101,14 +116,14 @@ Public Class frmControlCapture End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click - If TextBox1.Text = String.Empty And TextBox2.Text = String.Empty Then + If txtControlName.Text = String.Empty And txtControlBounds.Text = String.Empty Then MsgBox("Kein Control gefunden!") DialogResult = DialogResult.Cancel End If If rbControlPosition.Checked Then ControlName = String.Empty - Else + ElseIf rbControlName.Checked Then TopLeft = New RectangleInfo() TopRight = New RectangleInfo() BottomLeft = New RectangleInfo() diff --git a/app/DD_Clipboard_Searcher/frmStart.vb b/app/DD_Clipboard_Searcher/frmStart.vb index 5bec0f5..41f3090 100644 --- a/app/DD_Clipboard_Searcher/frmStart.vb +++ b/app/DD_Clipboard_Searcher/frmStart.vb @@ -201,7 +201,7 @@ Public Class frmStart End If oCountCommand = clsPatterns.ReplaceAllValues(oCountCommand, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL, USER_ID, oProfile.Guid) - oResultData += Database.NewExecuteScalar(oCountCommand) + oResultData += Database.GetScalarValue(oCountCommand) Catch ex As Exception Logger.Warn("Invalid SQL Query for Counting Data in Profile {0}: {1}", oProfile.Guid, oCountCommand) oInvalidDataSQL = True @@ -218,7 +218,7 @@ Public Class frmStart End If oCountCommand = clsPatterns.ReplaceAllValues(oCountCommand, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL, USER_ID, oProfile.Guid) - oResultDocs += Database.NewExecuteScalar(oCountCommand) + oResultDocs += Database.GetScalarValue(oCountCommand) Catch ex As Exception Logger.Warn("Invalid SQL Query for Counting Data in Profile {0}: {1}", oProfile.Guid, oCountCommand) oInvalidDocumentSQL = True