From 37b02ec625a0109e5b950c2ccacf817155badbb6 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 24 May 2023 08:55:51 +0200 Subject: [PATCH 01/13] Fix saving and restoring form position, fix display format --- app/TaskFlow/ModuleControlProperties.vb | 8 ++++---- app/TaskFlow/frmMain.vb | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/TaskFlow/ModuleControlProperties.vb b/app/TaskFlow/ModuleControlProperties.vb index d77a177..d702eee 100644 --- a/app/TaskFlow/ModuleControlProperties.vb +++ b/app/TaskFlow/ModuleControlProperties.vb @@ -211,7 +211,7 @@ Public Module ModuleControlProperties Public Property RegexMessage As String - + Public Property DisplayFormat As String @@ -226,10 +226,10 @@ Public Module ModuleControlProperties Public Overrides Function GetStandardValues(context As ITypeDescriptorContext) As StandardValuesCollection Dim displayFormatList = New List(Of String) From { ClassControlCreator.CONTROL_TYPE_TEXT, - ClassControlCreator.CONTROL_TYPE_BOOLEAN, - ClassControlCreator.CONTROL_TYPE_INTEGER, ClassControlCreator.CONTROL_TYPE_DOUBLE, - ClassControlCreator.CONTROL_TYPE_CURRENCY + ClassControlCreator.CONTROL_TYPE_CURRENCY, + ClassControlCreator.CONTROL_TYPE_DATE, + ClassControlCreator.CONTROL_TYPE_DATETIME } Dim values As New StandardValuesCollection(displayFormatList) Return values diff --git a/app/TaskFlow/frmMain.vb b/app/TaskFlow/frmMain.vb index e553fe3..0f5db73 100644 --- a/app/TaskFlow/frmMain.vb +++ b/app/TaskFlow/frmMain.vb @@ -17,6 +17,7 @@ Imports DevExpress.XtraGrid.Views.BandedGrid Imports DevExpress.XtraBars.Ribbon Imports DigitalData.Modules.ZooFlow Imports DevExpress.LookAndFeel +Imports DigitalData.Modules.Base Public Class frmMain Private Property FormHelper As FormHelper @@ -402,8 +403,10 @@ Public Class frmMain Check_Timer_Notification() Timer_Inactivity_Reset_Disable("FormLoad") - Restore_Form_Position() - + 'Restore_Form_Position() + ScreenEx.RestoreFormPosition(Me, My.Settings.frmMainPosition) + ScreenEx.RestoreFormState(Me, My.Settings.frmMainWindowState) + Size = My.Settings.frmMainSize If IDB_ACTIVE = False And ERROR_STATE = "" Then Try From 9da71349b25b96c35bbc75e27d2b2f7b82b9c5b2 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 30 May 2023 13:33:22 +0200 Subject: [PATCH 02/13] Switch from Textbox to DevExpress TextEdit --- app/TaskFlow/ClassControlCreator.vb | 105 ++++++++++++++++++++---- app/TaskFlow/ClassFormat.vb | 20 +++++ app/TaskFlow/My Project/AssemblyInfo.vb | 4 +- app/TaskFlow/frmFormDesigner.vb | 27 +++--- app/TaskFlow/frmMassValidator.vb | 34 ++++---- app/TaskFlow/frmValidator.vb | 78 ++++++++++-------- 6 files changed, 186 insertions(+), 82 deletions(-) diff --git a/app/TaskFlow/ClassControlCreator.vb b/app/TaskFlow/ClassControlCreator.vb index c0d65fc..4959537 100644 --- a/app/TaskFlow/ClassControlCreator.vb +++ b/app/TaskFlow/ClassControlCreator.vb @@ -14,9 +14,11 @@ Imports DigitalData.Controls.LookupGrid Imports DigitalData.Modules.Language.Utils Imports DigitalData.GUIs.Common Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.Language Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback Imports DigitalData.Modules.EDMI.API.Constants Imports DigitalData.Modules.Language.DataTableEx +Imports DigitalData.Modules.Base Public Class ClassControlCreator @@ -86,6 +88,7 @@ Public Class ClassControlCreator Public Guid As Integer Public Name As String Public [ReadOnly] As Boolean = False + Public BackColor As Color = Color.White End Class Private Shared Function TransformDataRow(row As DataRow) As ControlDBProps @@ -146,8 +149,21 @@ Public Class ClassControlCreator ' ----------------------- NEW CONTROLS ----------------------- - Public Shared Function CreateNewTextBox(location As Point) As TextBox - Dim control As New TextBox With { + 'Public Shared Function CreateNewTextBox(location As Point) As TextBox + ' Dim control As New TextBox With { + ' .Name = $"{PREFIX_TEXTBOX}_{clsTools.ShortGuid()}", + ' .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT), + ' .Location = location, + ' .ReadOnly = True, + ' .BackColor = Color.White, + ' .Cursor = Cursors.Hand + ' } + + ' Return control + 'End Function + + Public Shared Function CreateNewTextBox(location As Point) As TextEdit + Dim control As New TextEdit With { .Name = $"{PREFIX_TEXTBOX}_{clsTools.ShortGuid()}", .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT), .Location = location, @@ -280,35 +296,88 @@ Public Class ClassControlCreator ' ----------------------- EXISITING CONTROLS ----------------------- - Public Shared Function CreateExistingTextbox(oControlRow As DataRow, designMode As Boolean) As TextBox + 'Public Shared Function CreateExistingTextbox(oControlRow As DataRow, designMode As Boolean) As TextBox + ' Try + ' Dim control As TextBox = CreateBaseControl(New TextBox(), oControlRow, designMode) + + ' control.BackColor = Color.White + + ' If oControlRow.Item("HEIGHT") > 27 Then + ' control.Multiline = True + + ' End If + + ' control.Height = oControlRow.Item("HEIGHT") + ' control.Width = oControlRow.Item("WIDTH") + + ' If Not designMode Then + ' control.AcceptsReturn = True + ' control.ReadOnly = oControlRow.Item("READ_ONLY") + ' control.TabStop = Not oControlRow.Item("READ_ONLY") + ' control.BackColor = IIf(oControlRow.Item("READ_ONLY"), Color.LightGray, Color.White) + ' control.ScrollBars = ScrollBars.Vertical + ' Else + ' control.ReadOnly = True + ' End If + + ' Return control + ' Catch ex As Exception + ' Logger.Error(ex) + ' End Try + + 'End Function + + Public Shared Function CreateExistingTextbox(oControlRow As DataRow, designMode As Boolean) As TextEdit Try - Dim control As TextBox = CreateBaseControl(New TextBox(), oControlRow, designMode) + Dim oControl As TextEdit = CreateBaseControl(New TextEdit(), oControlRow, designMode) + Dim oMeta As ControlMetadata = oControl.Tag - control.BackColor = Color.White + oControl.BackColor = Color.White + oMeta.BackColor = Color.White - If oControlRow.Item("HEIGHT") > 27 Then - control.Multiline = True + ' TODO: Add separate function for MultilineEdit + 'If oControlRow.Item("HEIGHT") > 27 Then + ' control.Multiline = True + 'End If - End If + Dim oHeight = oControlRow.ItemEx("HEIGHT", 0) + Dim oWidth = oControlRow.ItemEx("WIDTH", 0) + Dim oReadOnly = oControlRow.ItemEx("READ_ONLY", False) + Dim oFormatString = oControlRow.ItemEx("FORMAT_STRING", String.Empty) + Dim oBackColorIf = oControlRow.ItemEx("CTRL_BACKCOLOR_IF", String.Empty) - control.Height = oControlRow.Item("HEIGHT") - control.Width = oControlRow.Item("WIDTH") + oControl.Height = oHeight + oControl.Width = oWidth If Not designMode Then - control.AcceptsReturn = True - control.ReadOnly = oControlRow.Item("READ_ONLY") - control.TabStop = Not oControlRow.Item("READ_ONLY") - control.BackColor = IIf(oControlRow.Item("READ_ONLY"), Color.LightGray, Color.White) - control.ScrollBars = ScrollBars.Vertical + oControl.ReadOnly = oReadOnly + oControl.TabStop = Not oReadOnly + oControl.BackColor = IIf(oReadOnly, Color.LightGray, Color.White) + + ' If there is a format string defined, set it for display only. + ' Editing will be without format string, according to current user-culture. + If oFormatString <> String.Empty Then + oControl.Properties.DisplayFormat.FormatType = FormatType.Custom + oControl.Properties.DisplayFormat.FormatString = ClassFormat.GetFormatString(oFormatString) + End If + + ' For read only controls, don't show the raw value when a user clicks into it + If oReadOnly Then + oControl.Properties.EditFormat.FormatType = FormatType.Custom + oControl.Properties.EditFormat.FormatString = ClassFormat.GetFormatString(oFormatString) + End If + + 'TODO: Find alternatives for TextEdit + 'control.ScrollBars = ScrollBars.Vertical + 'control.AcceptsReturn = True Else - control.ReadOnly = True + oControl.ReadOnly = True End If - Return control + Return oControl Catch ex As Exception Logger.Error(ex) End Try - End Function Public Shared Function CreateExistingLabel(row As DataRow, designMode As Boolean) As Label diff --git a/app/TaskFlow/ClassFormat.vb b/app/TaskFlow/ClassFormat.vb index 30bdc5d..be528ba 100644 --- a/app/TaskFlow/ClassFormat.vb +++ b/app/TaskFlow/ClassFormat.vb @@ -9,6 +9,26 @@ Public Class ClassFormat Public Const DATE_FORMAT = "d" Public Const DATETIME_FORMAT = "G" + Public Shared Function GetFormatString(pFormatString As String) As String + Select Case pFormatString + Case ClassControlCreator.CONTROL_TYPE_CURRENCY + Return CURRENCY_FORMAT + + Case ClassControlCreator.CONTROL_TYPE_DOUBLE + Return DECIMAL_FORMAT + + Case ClassControlCreator.CONTROL_TYPE_DATE + Return DATE_FORMAT + + Case ClassControlCreator.CONTROL_TYPE_DATETIME + Return DATETIME_FORMAT + + Case Else + Return String.Empty + + End Select + End Function + Public Shared Function GetFormattedValue(pControlName As String, pValueObject As Object, pFormatString As String) As String Try If pFormatString <> String.Empty Then diff --git a/app/TaskFlow/My Project/AssemblyInfo.vb b/app/TaskFlow/My Project/AssemblyInfo.vb index 6f54763..a32f4cf 100644 --- a/app/TaskFlow/My Project/AssemblyInfo.vb +++ b/app/TaskFlow/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + diff --git a/app/TaskFlow/frmFormDesigner.vb b/app/TaskFlow/frmFormDesigner.vb index 391b930..77d5a2d 100644 --- a/app/TaskFlow/frmFormDesigner.vb +++ b/app/TaskFlow/frmFormDesigner.vb @@ -10,6 +10,7 @@ Imports DigitalData.Modules.Language Imports System.Drawing Imports DigitalData.GUIs.Common Imports DevExpress.Utils.Filtering.Internal +Imports DevExpress.XtraEditors Public Class frmFormDesigner Public ProfileId As Integer @@ -256,7 +257,7 @@ Public Class frmFormDesigner ' Jetzt die Control spezifischen Eigenschaften zuweisen Select Case row.Item("CTRL_TYPE") - Case "TXT" + Case ClassControlCreator.PREFIX_TEXTBOX Dim txt = ClassControlCreator.CreateExistingTextbox(row, True) pnldesigner.Controls.Add(txt) SetMovementHandlers(txt) @@ -343,7 +344,7 @@ Public Class frmFormDesigner If oMetadata.ReadOnly = False Then Dim Type As String = oControl.GetType.ToString Select Case Type - Case "System.Windows.Forms.TextBox" + Case "DevExpress.XtraEditors.TextEdit" oControl.BackColor = Color.White Case "System.Windows.Forms.ComboBox" oControl.BackColor = Color.White @@ -664,8 +665,8 @@ Public Class frmFormDesigner checkProps.Enable_SQL_OnLoad = New SQLValue(NotNull(oRow.Item("SQL_ENABLE_ON_LOAD"), "")) checkProps.SetControlData = New SQLValue(NotNull(oRow.Item("SET_CONTROL_DATA"), "")) props = checkProps - ElseIf TypeOf sender Is TextBox Then - Dim txt As TextBox = sender + ElseIf TypeOf sender Is TextEdit Then + Dim txt As TextEdit = sender Dim txtProps As TextboxProperties = CreatePropsObjectWithIndicies(New TextboxProperties, oRow, Source_AllIndicies) txtProps.Regex = NotNull(oRow.Item("REGEX_MATCH"), String.Empty) txtProps.RegexMessage = NotNull(oRow.Item("REGEX_MESSAGE_DE"), String.Empty) @@ -676,8 +677,8 @@ Public Class frmFormDesigner props = txtProps - ElseIf TypeOf sender Is ComboBox Then - Dim cmb As ComboBox = sender + ElseIf TypeOf sender Is Windows.Forms.ComboBox Then + Dim cmb As Windows.Forms.ComboBox = sender Dim cmbProps As ComboboxProperties = CreatePropsObjectWithIndicies(New ComboboxProperties, oRow, Source_AllIndicies) cmbProps.ChoiceLists = Windream_ChoiceLists cmbProps.ChoiceList = NotNull(oRow.Item("CHOICE_LIST"), String.Empty) @@ -1286,9 +1287,10 @@ Public Class frmFormDesigner If CurrentControl Is Nothing = False Then Dim newHeight As Integer = CurrentControl.Height - 5 - If newHeight < 22 And TypeOf CurrentControl Is TextBox Then - DirectCast(CurrentControl, TextBox).Multiline = True - End If + ' TODO: Implement Multiline TextBox + 'If newHeight < 22 And TypeOf CurrentControl Is TextBox Then + ' DirectCast(CurrentControl, TextBox).Multiline = True + 'End If ' Verhindert, dass das Control unsichtbar wird If newHeight < 1 Then @@ -1307,9 +1309,10 @@ Public Class frmFormDesigner If CurrentControl Is Nothing = False Then Dim newHeight As Integer = CurrentControl.Height + 5 - If newHeight > 21 And TypeOf CurrentControl Is TextBox Then - DirectCast(CurrentControl, TextBox).Multiline = True - End If + ' TODO: Implement Multiline Textbox + 'If newHeight > 21 And TypeOf CurrentControl Is TextBox Then + ' DirectCast(CurrentControl, TextBox).Multiline = True + 'End If CurrentControl.Size = New Size(CurrentControl.Width, newHeight) DirectCast(pgControlsNew.SelectedObject, BaseProperties).Size = CurrentControl.Size diff --git a/app/TaskFlow/frmMassValidator.vb b/app/TaskFlow/frmMassValidator.vb index 66d8df5..cce05de 100644 --- a/app/TaskFlow/frmMassValidator.vb +++ b/app/TaskFlow/frmMassValidator.vb @@ -7,6 +7,7 @@ Imports DigitalData.Modules.Language.Utils Imports System.IO Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback Imports DigitalData.Modules.EDMI.API.Constants +Imports DevExpress.XtraEditors Public Class frmMassValidator Private DTCONTROLS As DataTable @@ -143,9 +144,9 @@ Public Class frmMassValidator Dim oControl As Control oLastControl = $"CtrlName {oControlRow.Item("NAME")}, CtrlIndexname: {oControlRow.Item("INDEX_NAME")}" Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper - Case "TXT" + Case ClassControlCreator.PREFIX_TEXTBOX LOGGER.Debug("Versuch TXT zu laden") - Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(oControlRow, False) + Dim txt As TextEdit = ClassControlCreator.CreateExistingTextbox(oControlRow, False) AddHandler txt.GotFocus, AddressOf OnTextBoxFocus AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus @@ -473,7 +474,7 @@ Public Class frmMassValidator LOGGER.Debug("INDEX: " & idxname & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & LoadIDX.ToString) Dim wertWD Select Case Type - Case "System.Windows.Forms.TextBox" + Case "DevExpress.XtraEditors.TextEdit" Try controltype = "Textbox" If idxname = "" Then @@ -509,7 +510,7 @@ Public Class frmMassValidator Case "System.Windows.Forms.ComboBox" controltype = "ComboBox" - Dim cmb As ComboBox = oControl + Dim cmb As Windows.Forms.ComboBox = oControl If idxname = "" Then MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) Exit For @@ -838,16 +839,16 @@ Public Class frmMassValidator End Function Public Sub OnTextBoxFocus(sender As Object, e As EventArgs) - Dim box As TextBox = sender + Dim box As TextEdit = sender box.BackColor = Color.LightSteelBlue box.SelectAll() End Sub Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs) - Dim box As TextBox = sender + Dim box As TextEdit = sender box.BackColor = Color.White End Sub Public Sub OnTextBoxKeyUp(sender As Object, e As KeyEventArgs) - Dim box As TextBox = sender + Dim box As TextEdit = sender If box.Text <> String.Empty And me_closing = False And CTRLS_Loaded = True And FORM_Shown = True Then If (e.KeyCode = Keys.Return) Or (e.KeyCode = Keys.Tab) Or (e.KeyCode = Keys.Enter) Then @@ -908,7 +909,7 @@ Public Class frmMassValidator If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Then LOGGER.Debug("Filling Combobox with Results") - Dim oCombobox As ComboBox = pnldesigner.Controls(displayboxname) + Dim oCombobox As Windows.Forms.ComboBox = pnldesigner.Controls(displayboxname) If IsNothing(oCombobox) Then Exit Sub @@ -1097,7 +1098,7 @@ Public Class frmMassValidator End If Dim oValue - If TypeOf control Is TextBox Then + If TypeOf control Is TextEdit Then Try Dim firstRow As DataRow = dt.Rows(0) Dim value = firstRow.Item(0) @@ -1108,9 +1109,9 @@ Public Class frmMassValidator LOGGER.Error(ex) clsLogger.Add("Error in LoadSimpleData for TextBox: " & ex.Message) End Try - ElseIf TypeOf control Is ComboBox Then + ElseIf TypeOf control Is Windows.Forms.ComboBox Then Try - Dim comboxBox As ComboBox = control + Dim comboxBox As Windows.Forms.ComboBox = control Dim list As New List(Of String) For Each _row As DataRow In dt.Rows @@ -1223,7 +1224,7 @@ Public Class frmMassValidator '###### Dim Type As String = oControl.GetType.ToString Select Case Type - Case "System.Windows.Forms.TextBox" + Case "DevExpress.XtraEditors.TextEdit" Try value_from_control = oControl.Text Catch ex As Exception @@ -1521,7 +1522,7 @@ Public Class frmMassValidator Catch ex As Exception LOGGER.Error(ex) End Try - Case "System.Windows.Forms.TextBox" + Case "DevExpress.XtraEditors.TextEdit" Try 'Als erstes überprüfen ob überhaupt etwas eingetragen worden ist If Check_Missing(oControl, "txt") = True And _MUSSEINGABE = True Then 'NICHTS EINGETRAGEN @@ -1742,11 +1743,14 @@ Public Class frmMassValidator Function Check_Missing(control As Control, typ As String) Select Case typ Case "txt" - If control.Text = String.Empty Or control.Text = "(Different values)" Or control.Text = "(Untersch. Werte)" Then + Dim oTextBox As TextEdit = control + If oTextBox.Text = String.Empty Or oTextBox.Text = "(Different values)" Or oTextBox.Text = "(Untersch. Werte)" Then Return True End If - Return False + End Select + + Return False End Function Private Function IndexMultipleFiles(idxxname As String, idxvalue As Object) diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index d4b278f..bc58b65 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -19,6 +19,8 @@ Imports DevExpress.XtraGrid Imports DevExpress.XtraGrid.Views.Grid Imports DevExpress.XtraBars Imports DevExpress.XtraGrid.Columns +Imports DevExpress.XtraEditors +Imports DevExpress.Data Public Class frmValidator Private Property Current_Document As DocumentResultList.Document = Nothing @@ -741,7 +743,7 @@ Public Class frmValidator End If Dim oValue - If TypeOf control Is TextBox Then + If TypeOf control Is TextEdit Then Try Dim firstRow As DataRow = oDTContent.Rows(0) @@ -755,7 +757,7 @@ Public Class frmValidator End Try ElseIf TypeOf control Is ComboBox Then Try - Dim oMyComboBox As ComboBox = control + Dim oMyComboBox As Windows.Forms.ComboBox = control Dim oselectedIndex = oMyComboBox.SelectedIndex LOGGER.Debug($"oMyComboBox {oMyComboBox.Name} - Saving selected index {oselectedIndex}") Dim list As New List(Of String) @@ -898,7 +900,7 @@ Public Class frmValidator oControlInfo = ClassControlCreator.PREFIX_TEXTBOX & "#" & oControlInfo LOGGER.Debug($"[{oControlInfo}] - TXT Try to create control...") - Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(oControlRow, False) + Dim txt As TextEdit = ClassControlCreator.CreateExistingTextbox(oControlRow, False) AddHandler txt.GotFocus, AddressOf OnTextBoxFocus AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp @@ -1177,7 +1179,7 @@ Public Class frmValidator For Each inctrl As Control In Me.PanelValidatorControl.Controls Dim Type As String = inctrl.GetType.ToString Select Case Type - Case "System.Windows.Forms.TextBox" + Case "DevExpress.XtraEditors.TextEdit" inctrl.Text = "" Case "System.Windows.Forms.ComboBox" Dim cmb As ComboBox = inctrl @@ -1200,20 +1202,25 @@ Public Class frmValidator End Sub Public Sub OnTextBoxFocus(sender As Object, e As EventArgs) - Dim oTextbox As TextBox = sender + Dim oTextbox As TextEdit = sender + Dim oMeta As ClassControlCreator.ControlMetadata = oTextbox.Tag - If DirectCast(oTextbox.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then + If oMeta.ReadOnly = False Then oTextbox.BackColor = Color.LightSteelBlue + oTextbox.ForeColor = GraphicsEx.GetContrastedColor(Color.LightSteelBlue) oTextbox.SelectAll() End If End Sub Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs) - Dim oTextbox As TextBox = sender + Dim oTextbox As TextEdit = sender + Dim oMeta As ClassControlCreator.ControlMetadata = oTextbox.Tag - If DirectCast(oTextbox.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then - oTextbox.BackColor = Color.White + If oMeta.ReadOnly = False Then + oTextbox.BackColor = oMeta.BackColor + oTextbox.ForeColor = GraphicsEx.GetContrastedColor(oMeta.BackColor) End If + SetControlValues_FromControl(oTextbox) ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) @@ -1232,7 +1239,7 @@ Public Class frmValidator Exit Sub End If - Dim oTextBox As TextBox = sender + Dim oTextBox As TextEdit = sender If oTextBox.Text <> String.Empty And me_closing = False And _Indexe_Loaded = True And oTextBox.Height < 25 Then If (e.KeyCode = Keys.Return) Or (e.KeyCode = Keys.Tab) Or (e.KeyCode = Keys.Enter) Then @@ -1668,7 +1675,7 @@ Public Class frmValidator 'End Try Select Case oControl.GetType() - Case GetType(TextBox) + Case GetType(TextEdit) If oControlTextOption = "Replace" Then oControl.Text = oControlCaption Else @@ -1833,7 +1840,7 @@ Public Class frmValidator oFound = True LOGGER.Debug($"Got the depending control ID:{oDEPENDING_GUID}..Setting the values..") Select Case oControl.GetType.ToString - Case GetType(TextBox).ToString + Case GetType(TextEdit).ToString Try Dim oTEXT = oDTDEPENDING_RESULT.Rows(0).Item(0) Try @@ -1958,7 +1965,7 @@ Public Class frmValidator oFound = True LOGGER.Debug($"Got the depending control ID:{oDEPENDING_GUID}..Setting the values..") Select Case oControl.GetType.ToString - Case GetType(TextBox).ToString + Case GetType(TextEdit).ToString Try Dim oTEXT = oDTDEPENDING_RESULT.Rows(0).Item(0) Try @@ -2336,7 +2343,7 @@ Public Class frmValidator If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Then LOGGER.Debug("Filling Combobox with Results") - Dim oCombobox As ComboBox = PanelValidatorControl.Controls(displayboxname) + Dim oCombobox As Windows.Forms.ComboBox = PanelValidatorControl.Controls(displayboxname) If IsNothing(oCombobox) Then Exit Sub @@ -3137,13 +3144,14 @@ Public Class frmValidator oControName = oControl.Name Dim oLoadIndex As Boolean = oControlRow.Item("LOAD_IDX_VALUE") - - LOGGER.Debug("INDEX: " & oSourceIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & oLoadIndex.ToString) Select Case oType - Case "System.Windows.Forms.TextBox" + Case "DevExpress.XtraEditors.TextEdit" Try oControlType = "Textbox" + Dim oTextBox As TextEdit = oControl + Dim oMeta As ClassControlCreator.ControlMetadata = oTextBox.Tag + If oSourceIndexName = "" Then MsgBox("Attention wrong configuration:" & vbNewLine & "for control " & oControl.Name & " no INDEX configured!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) Exit For @@ -3151,7 +3159,7 @@ Public Class frmValidator If oSourceIndexName Is Nothing = False Then If oLoadIndex = False Or oSourceIndexName = "DD PM-ONLY FOR DISPLAY" Then ' Wenn kein Index exisitiert, defaultValue laden - oControl.Text = oDefaultValue + oTextBox.EditValue = oDefaultValue LOGGER.Debug("Indexwert soll nicht geladen werden.") Exit Select End If @@ -3186,14 +3194,15 @@ Public Class frmValidator End If Try - Dim oFormatString As String = oControlRow.ItemEx("CTRL_FORMAT_STRING", "") - oFormattedValue = ClassFormat.GetFormattedValue(oControl.Name, oValueFromSource, oFormatString) + 'Dim oFormatString As String = oControlRow.ItemEx("CTRL_FORMAT_STRING", "") + 'oFormattedValue = ClassFormat.GetFormattedValue(oControl.Name, oValueFromSource, oFormatString) If Not IsNothing(oFormattedValue) And oFormattedValue <> String.Empty Then - oControl.Text = NotNull(oFormattedValue, oDefaultValue) + oTextBox.EditValue = NotNull(oFormattedValue, oDefaultValue) Else - oControl.Text = NotNull(oValueFromSource, oDefaultValue) + oTextBox.EditValue = NotNull(oValueFromSource, oDefaultValue) End If + Try Dim oBackColor As String = oControlRow.Item("CTRL_BACKCOLOR_IF") If oBackColor <> String.Empty Then @@ -3209,14 +3218,11 @@ Public Class frmValidator Dim oSQl = $"SELECT CASE WHEN {oExpression} THEN CONVERT(BIT,1) ELSE CONVERT(BIT,0) END " Dim oColorName = IIf(DatabaseECM.GetScalarValue(oSQl), oSPlit(1), oSPlit(2)) + oControl.BackColor = Color.FromName(oColorName) + oMeta.BackColor = oControl.BackColor oControl.ForeColor = GraphicsEx.GetContrastedColor(oControl.BackColor) - 'If oColorName = "Green" Or oColorName = "Blue" Or oColorName = "Red" Then - ' oControl.ForeColor = Color.FromName("White") - 'Else - ' oControl.ForeColor = Color.FromName("Black") - 'End If End If End If Catch ex As Exception @@ -3230,7 +3236,7 @@ Public Class frmValidator Catch ex As Exception LOGGER.Info("Error While converting defaultValue [" & oDefaultValue & "]: " & ex.Message) - oControl.Text = "" + oTextBox.EditValue = "" End Try @@ -3248,7 +3254,7 @@ Public Class frmValidator Case "System.Windows.Forms.ComboBox" oControlType = "ComboBox" - Dim oMyCombobox As ComboBox = oControl + Dim oMyCombobox As Windows.Forms.ComboBox = oControl Try If oSourceIndexName = "" Then MsgBox("Attention wrong configuration:" & vbNewLine & "for control " & oControl.Name & " no INDEX configured!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) @@ -4294,7 +4300,7 @@ Public Class frmValidator '###### Dim Type As String = oControl.GetType.ToString Select Case Type - Case "System.Windows.Forms.TextBox" + Case "DevExpress.XtraEditors.TextEdit" Try value_from_control = oControl.Text Catch ex As Exception @@ -4450,14 +4456,16 @@ Public Class frmValidator btnSave.Enabled = True End Sub - Function Check_Missing(control As Control, typ As String) + Function Check_Missing(control As Control, typ As String) As Boolean Select Case typ Case "txt" - If control.Text = String.Empty Then + Dim oTextBox As TextEdit = control + If oTextBox.Text = String.Empty Then Return True End If - Return False End Select + + Return False End Function Function Return_PM_VEKTOR(input As String, VKTBezeichner As String) Dim PM_String As String @@ -4774,7 +4782,7 @@ Public Class frmValidator End Try - Case "System.Windows.Forms.TextBox" + Case "DevExpress.XtraEditors.TextEdit" Try 'Dim oWrongInputMessage = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.WrongInputControl") Dim oWrongInputMessage = S.Falsche_Eingabe @@ -4899,7 +4907,7 @@ Public Class frmValidator Case "System.Windows.Forms.ComboBox" Try LOGGER.Debug($"Working on Combobox...") - Dim cmb As ComboBox = oControl + Dim cmb As Windows.Forms.ComboBox = oControl 'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss If cmb.SelectedIndex = -1 And oIsRequired = True Then oMissing = True From 91e90ce76ce919a5cc28c3b13d75ce8a5fff3605 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 31 May 2023 11:10:25 +0200 Subject: [PATCH 03/13] Remove Chat Controls, use only DevExpress controls in frmValidator --- app/TaskFlow/ClassControlCreator.vb | 26 +- app/TaskFlow/ClassValidator.vb | 3 + app/TaskFlow/TaskFlow.vbproj | 16 +- app/TaskFlow/clsPatterns.vb | 4 +- .../frmChat_NewConversation.Designer.vb | 52 -- app/TaskFlow/frmChat_NewConversation.resx | 120 ----- app/TaskFlow/frmChat_NewConversation.vb | 24 - app/TaskFlow/frmFormDesigner.vb | 22 +- app/TaskFlow/frmMassValidator.Designer.vb | 44 +- app/TaskFlow/frmMassValidator.vb | 56 +- app/TaskFlow/frmValidator.Designer.vb | 217 +++----- app/TaskFlow/frmValidator.resx | 496 ++++++------------ app/TaskFlow/frmValidator.vb | 283 ++-------- 13 files changed, 340 insertions(+), 1023 deletions(-) create mode 100644 app/TaskFlow/ClassValidator.vb delete mode 100644 app/TaskFlow/frmChat_NewConversation.Designer.vb delete mode 100644 app/TaskFlow/frmChat_NewConversation.resx delete mode 100644 app/TaskFlow/frmChat_NewConversation.vb diff --git a/app/TaskFlow/ClassControlCreator.vb b/app/TaskFlow/ClassControlCreator.vb index 4959537..edeacf6 100644 --- a/app/TaskFlow/ClassControlCreator.vb +++ b/app/TaskFlow/ClassControlCreator.vb @@ -327,9 +327,23 @@ Public Class ClassControlCreator 'End Function - Public Shared Function CreateExistingTextbox(oControlRow As DataRow, designMode As Boolean) As TextEdit + Public Shared Function CreateExistingTextbox(oControlRow As DataRow, designMode As Boolean) As BaseEdit Try - Dim oControl As TextEdit = CreateBaseControl(New TextEdit(), oControlRow, designMode) + Dim oHeight = oControlRow.ItemEx("HEIGHT", 0) + Dim oWidth = oControlRow.ItemEx("WIDTH", 0) + Dim oReadOnly = oControlRow.ItemEx("READ_ONLY", False) + Dim oFormatString = oControlRow.ItemEx("FORMAT_STRING", String.Empty) + Dim oBackColorIf = oControlRow.ItemEx("CTRL_BACKCOLOR_IF", String.Empty) + + Dim oControl As BaseEdit = Nothing + + If oHeight > 27 Then + oControl = CreateBaseControl(New MemoEdit(), oControlRow, designMode) + Else + oControl = CreateBaseControl(New TextEdit(), oControlRow, designMode) + End If + + 'Dim oControl As TextEdit = CreateBaseControl(New TextEdit(), oControlRow, designMode) Dim oMeta As ControlMetadata = oControl.Tag oControl.BackColor = Color.White @@ -340,12 +354,6 @@ Public Class ClassControlCreator ' control.Multiline = True 'End If - Dim oHeight = oControlRow.ItemEx("HEIGHT", 0) - Dim oWidth = oControlRow.ItemEx("WIDTH", 0) - Dim oReadOnly = oControlRow.ItemEx("READ_ONLY", False) - Dim oFormatString = oControlRow.ItemEx("FORMAT_STRING", String.Empty) - Dim oBackColorIf = oControlRow.ItemEx("CTRL_BACKCOLOR_IF", String.Empty) - oControl.Height = oHeight oControl.Width = oWidth @@ -1067,7 +1075,7 @@ Public Class ClassControlCreator End If End Function - Public Shared Sub GridTables_HandleControlValueChange(pControlPanel As Panel, pColumnsWithSqlAndControlPlaceholders As DataTable) + Public Shared Sub GridTables_HandleControlValueChange(pControlPanel As XtraScrollableControl, pColumnsWithSqlAndControlPlaceholders As DataTable) If Not IsNothing(pColumnsWithSqlAndControlPlaceholders) AndAlso pColumnsWithSqlAndControlPlaceholders.Rows.Count > 0 Then For Each oRow As DataRow In pColumnsWithSqlAndControlPlaceholders.Rows Try diff --git a/app/TaskFlow/ClassValidator.vb b/app/TaskFlow/ClassValidator.vb new file mode 100644 index 0000000..84faee0 --- /dev/null +++ b/app/TaskFlow/ClassValidator.vb @@ -0,0 +1,3 @@ +Public Class ClassValidator + +End Class diff --git a/app/TaskFlow/TaskFlow.vbproj b/app/TaskFlow/TaskFlow.vbproj index ea1e4c0..f155a49 100644 --- a/app/TaskFlow/TaskFlow.vbproj +++ b/app/TaskFlow/TaskFlow.vbproj @@ -143,12 +143,6 @@ False - - ..\..\..\DDMonorepo\Controls.ChatControl\bin\Debug\DigitalData.Controls.ChatControl.dll - - - ..\..\..\DDMonorepo\Controls.ChatNewConv\bin\Debug\DigitalData.Controls.ChatNewConv.dll - False ..\..\..\DDMonorepo\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll @@ -283,6 +277,7 @@ + @@ -330,12 +325,6 @@ Form - - frmChat_NewConversation.vb - - - Form - frmClientLogin.vb @@ -569,9 +558,6 @@ frmAnnotations.vb - - frmChat_NewConversation.vb - frmClientLogin.vb diff --git a/app/TaskFlow/clsPatterns.vb b/app/TaskFlow/clsPatterns.vb index 59c2563..6690a7a 100644 --- a/app/TaskFlow/clsPatterns.vb +++ b/app/TaskFlow/clsPatterns.vb @@ -67,7 +67,7 @@ Public Class clsPatterns Return New Pattern(type, value).ToString End Function - Public Shared Function ReplaceAllValues(input As String, panel As Panel, is_SQL As Boolean) As String + Public Shared Function ReplaceAllValues(input As String, panel As DevExpress.XtraEditors.XtraScrollableControl, is_SQL As Boolean) As String Try Dim result = input @@ -176,7 +176,7 @@ Public Class clsPatterns End Try End Function - Public Shared Function ReplaceControlValues(pInput As String, oPanel As Panel, oIsSQL As Boolean) As String + Public Shared Function ReplaceControlValues(pInput As String, oPanel As DevExpress.XtraEditors.XtraScrollableControl, oIsSQL As Boolean) As String Dim oResult = pInput Try diff --git a/app/TaskFlow/frmChat_NewConversation.Designer.vb b/app/TaskFlow/frmChat_NewConversation.Designer.vb deleted file mode 100644 index af5005d..0000000 --- a/app/TaskFlow/frmChat_NewConversation.Designer.vb +++ /dev/null @@ -1,52 +0,0 @@ - _ -Partial Class frmChat_NewConversation - Inherits System.Windows.Forms.Form - - 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. - _ - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Wird vom Windows Form-Designer benötigt. - Private components As System.ComponentModel.IContainer - - 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. - 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. - 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. - _ - Private Sub InitializeComponent() - Me.ChatNewConv1 = New DigitalData.Controls.ChatNewConv.ChatNewConv() - Me.SuspendLayout() - ' - 'ChatNewConv1 - ' - Me.ChatNewConv1.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ChatNewConv1.Location = New System.Drawing.Point(2, 1) - Me.ChatNewConv1.Name = "ChatNewConv1" - Me.ChatNewConv1.Size = New System.Drawing.Size(463, 472) - Me.ChatNewConv1.TabIndex = 0 - ' - 'frmChat_NewConversation - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(474, 480) - Me.Controls.Add(Me.ChatNewConv1) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.MaximizeBox = False - Me.MinimizeBox = False - Me.Name = "frmChat_NewConversation" - Me.Text = "Neue Konversation" - Me.ResumeLayout(False) - - End Sub - - Friend WithEvents ChatNewConv1 As DigitalData.Controls.ChatNewConv.ChatNewConv -End Class diff --git a/app/TaskFlow/frmChat_NewConversation.resx b/app/TaskFlow/frmChat_NewConversation.resx deleted file mode 100644 index 1af7de1..0000000 --- a/app/TaskFlow/frmChat_NewConversation.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/app/TaskFlow/frmChat_NewConversation.vb b/app/TaskFlow/frmChat_NewConversation.vb deleted file mode 100644 index 0d06026..0000000 --- a/app/TaskFlow/frmChat_NewConversation.vb +++ /dev/null @@ -1,24 +0,0 @@ -Public Class frmChat_NewConversation - Public Property NewConversation() As String - Get - Return oNewConversation - End Get - Set(value As String) - oNewConversation = value - End Set - End Property - Public oNewConversation As Long - Public Sub New(oDTUsers As DataTable, oDTGroups As DataTable) - - ' Dieser Aufruf ist für den Designer erforderlich. - InitializeComponent() - - ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. - ChatNewConv1.Init(LOGCONFIG, CONNECTION_STRING_IDB, CURRENT_DOC_ID, USER_ID, USER_USERNAME, USER_LANGUAGE, oDTUsers, oDTGroups) - AddHandler ChatNewConv1.Conversation_Created, AddressOf onConversationCreated - End Sub - Sub onConversationCreated() - CURRENT_CONVERSATION_NEW = ChatNewConv1.NewConversation - Me.Close() - End Sub -End Class \ No newline at end of file diff --git a/app/TaskFlow/frmFormDesigner.vb b/app/TaskFlow/frmFormDesigner.vb index 77d5a2d..f6f6ec1 100644 --- a/app/TaskFlow/frmFormDesigner.vb +++ b/app/TaskFlow/frmFormDesigner.vb @@ -262,7 +262,7 @@ Public Class frmFormDesigner pnldesigner.Controls.Add(txt) SetMovementHandlers(txt) - Case "LBL" + Case ClassControlCreator.PREFIX_LABEL Dim lbl = ClassControlCreator.CreateExistingLabel(row, True) pnldesigner.Controls.Add(lbl) SetMovementHandlers(lbl) @@ -342,21 +342,21 @@ Public Class frmFormDesigner Dim oMetadata = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata) If oMetadata.ReadOnly = False Then - Dim Type As String = oControl.GetType.ToString - Select Case Type - Case "DevExpress.XtraEditors.TextEdit" + + Select Case oControl.GetType() + Case GetType(TextEdit) oControl.BackColor = Color.White - Case "System.Windows.Forms.ComboBox" + Case GetType(System.Windows.Forms.ComboBox) oControl.BackColor = Color.White - Case "System.Windows.Forms.Label" + Case GetType(System.Windows.Forms.Label) oControl.BackColor = Color.Transparent - Case "System.Windows.Forms.CheckBox" + Case GetType(System.Windows.Forms.CheckBox) oControl.BackColor = Color.Transparent - Case "DD_ProcessManager.ClassControlCreator+LineLabel" + Case GetType(DD_ProcessManager.ClassControlCreator.LineLabel) oControl.BackColor = oControl.ForeColor - Case "DigitalData.Controls.LookupGrid.LookupControl3" + Case GetType(DigitalData.Controls.LookupGrid.LookupControl3) oControl.BackColor = Color.White - Case "System.Windows.Forms.Button" + Case GetType(System.Windows.Forms.Button) oControl.BackColor = SystemColors.Control End Select End If @@ -666,7 +666,7 @@ Public Class frmFormDesigner checkProps.SetControlData = New SQLValue(NotNull(oRow.Item("SET_CONTROL_DATA"), "")) props = checkProps ElseIf TypeOf sender Is TextEdit Then - Dim txt As TextEdit = sender + 'Dim txt As TextEdit = sender Dim txtProps As TextboxProperties = CreatePropsObjectWithIndicies(New TextboxProperties, oRow, Source_AllIndicies) txtProps.Regex = NotNull(oRow.Item("REGEX_MATCH"), String.Empty) txtProps.RegexMessage = NotNull(oRow.Item("REGEX_MESSAGE_DE"), String.Empty) diff --git a/app/TaskFlow/frmMassValidator.Designer.vb b/app/TaskFlow/frmMassValidator.Designer.vb index 88410d1..b728346 100644 --- a/app/TaskFlow/frmMassValidator.Designer.vb +++ b/app/TaskFlow/frmMassValidator.Designer.vb @@ -1,4 +1,6 @@ - +Imports DevExpress.XtraEditors + + Partial Class frmMassValidator Inherits System.Windows.Forms.Form @@ -27,13 +29,14 @@ Partial Class frmMassValidator Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() Me.tslblCountDocs = New System.Windows.Forms.ToolStripStatusLabel() Me.TITLELabel1 = New System.Windows.Forms.Label() - Me.pnldesigner = New System.Windows.Forms.Panel() Me.btnSave = New System.Windows.Forms.Button() Me.DESCRIPTIONLabel = New System.Windows.Forms.Label() Me.DD_DMSLiteDataSet = New DD_ProcessManager.DD_DMSLiteDataSet() Me.TableAdapterManager = New DD_ProcessManager.DD_DMSLiteDataSetTableAdapters.TableAdapterManager() + Me.pnldesigner = New DevExpress.XtraEditors.PanelControl() Me.StatusStrip1.SuspendLayout() CType(Me.DD_DMSLiteDataSet, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.pnldesigner, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'ToolStrip1 @@ -56,7 +59,7 @@ Partial Class frmMassValidator 'tslblCountDocs ' Me.tslblCountDocs.Name = "tslblCountDocs" - Me.tslblCountDocs.Size = New System.Drawing.Size(120, 17) + Me.tslblCountDocs.Size = New System.Drawing.Size(119, 17) Me.tslblCountDocs.Text = "ToolStripStatusLabel1" ' 'TITLELabel1 @@ -73,20 +76,6 @@ Partial Class frmMassValidator Me.TITLELabel1.Text = "Label1" Me.TITLELabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' - 'pnldesigner - ' - Me.pnldesigner.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.pnldesigner.AutoScroll = True - Me.pnldesigner.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.pnldesigner.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.pnldesigner.Location = New System.Drawing.Point(15, 125) - Me.pnldesigner.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) - Me.pnldesigner.Name = "pnldesigner" - Me.pnldesigner.Size = New System.Drawing.Size(559, 331) - Me.pnldesigner.TabIndex = 21 - ' 'btnSave ' Me.btnSave.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ @@ -105,11 +94,13 @@ Partial Class frmMassValidator ' 'DESCRIPTIONLabel ' + Me.DESCRIPTIONLabel.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.DESCRIPTIONLabel.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.DESCRIPTIONLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.DESCRIPTIONLabel.Location = New System.Drawing.Point(12, 54) Me.DESCRIPTIONLabel.Name = "DESCRIPTIONLabel" - Me.DESCRIPTIONLabel.Size = New System.Drawing.Size(725, 67) + Me.DESCRIPTIONLabel.Size = New System.Drawing.Size(562, 67) Me.DESCRIPTIONLabel.TabIndex = 20 Me.DESCRIPTIONLabel.Text = "Label3" ' @@ -121,10 +112,12 @@ Partial Class frmMassValidator 'TableAdapterManager ' Me.TableAdapterManager.BackupDataSetBeforeUpdate = False + Me.TableAdapterManager.Connection = Nothing Me.TableAdapterManager.TBDD_CONNECTIONTableAdapter = Nothing Me.TableAdapterManager.TBDD_EMAIL_TEMPLATETableAdapter = Nothing Me.TableAdapterManager.TBDD_GUI_LANGUAGE_PHRASETableAdapter = Nothing Me.TableAdapterManager.TBDD_USERTableAdapter = Nothing + Me.TableAdapterManager.TBPM_CONTROL_TABLETableAdapter = Nothing Me.TableAdapterManager.TBPM_ERROR_LOGTableAdapter = Nothing Me.TableAdapterManager.TBPM_KONFIGURATIONTableAdapter = Nothing Me.TableAdapterManager.TBPM_PROFILE_CONTROLSTableAdapter = Nothing @@ -134,15 +127,25 @@ Partial Class frmMassValidator Me.TableAdapterManager.TBPM_TYPETableAdapter = Nothing Me.TableAdapterManager.UpdateOrder = DD_ProcessManager.DD_DMSLiteDataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete ' + 'pnldesigner + ' + Me.pnldesigner.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.pnldesigner.Location = New System.Drawing.Point(15, 125) + Me.pnldesigner.Name = "pnldesigner" + Me.pnldesigner.Size = New System.Drawing.Size(559, 332) + Me.pnldesigner.TabIndex = 23 + ' 'frmMassValidator ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(586, 540) + Me.Controls.Add(Me.pnldesigner) Me.Controls.Add(Me.btnSave) Me.Controls.Add(Me.TITLELabel1) Me.Controls.Add(Me.DESCRIPTIONLabel) - Me.Controls.Add(Me.pnldesigner) Me.Controls.Add(Me.StatusStrip1) Me.Controls.Add(Me.ToolStrip1) Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) @@ -153,6 +156,7 @@ Partial Class frmMassValidator Me.StatusStrip1.ResumeLayout(False) Me.StatusStrip1.PerformLayout() CType(Me.DD_DMSLiteDataSet, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.pnldesigner, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -161,10 +165,10 @@ Partial Class frmMassValidator Friend WithEvents ToolStrip1 As ToolStrip Friend WithEvents StatusStrip1 As StatusStrip Friend WithEvents TITLELabel1 As Label - Friend WithEvents pnldesigner As Panel Friend WithEvents btnSave As Button Friend WithEvents tslblCountDocs As ToolStripStatusLabel Friend WithEvents DESCRIPTIONLabel As Label Friend WithEvents DD_DMSLiteDataSet As DD_DMSLiteDataSet Friend WithEvents TableAdapterManager As DD_DMSLiteDataSetTableAdapters.TableAdapterManager + Friend WithEvents pnldesigner As PanelControl End Class diff --git a/app/TaskFlow/frmMassValidator.vb b/app/TaskFlow/frmMassValidator.vb index cce05de..1f4ad84 100644 --- a/app/TaskFlow/frmMassValidator.vb +++ b/app/TaskFlow/frmMassValidator.vb @@ -473,8 +473,8 @@ Public Class frmMassValidator Dim LoadIDX As Boolean = controlRow.Item("LOAD_IDX_VALUE") LOGGER.Debug("INDEX: " & idxname & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & LoadIDX.ToString) Dim wertWD - Select Case Type - Case "DevExpress.XtraEditors.TextEdit" + Select Case oControl.GetType + Case GetType(DevExpress.XtraEditors.TextEdit) Try controltype = "Textbox" If idxname = "" Then @@ -508,7 +508,7 @@ Public Class frmMassValidator Exit Sub End Try - Case "System.Windows.Forms.ComboBox" + Case GetType(System.Windows.Forms.ComboBox) controltype = "ComboBox" Dim cmb As Windows.Forms.ComboBox = oControl If idxname = "" Then @@ -537,7 +537,7 @@ Public Class frmMassValidator cmb.SelectedIndex = cmb.FindStringExact(wertWD) End If End If - Case "System.Windows.Forms.DataGridView" + Case GetType(System.Windows.Forms.DataGridView) controltype = "DataGridView" Dim dgv As DataGridView = oControl If idxname = "" Then @@ -608,7 +608,7 @@ Public Class frmMassValidator End If End If - Case "System.Windows.Forms.CheckBox" + Case GetType(System.Windows.Forms.CheckBox) controltype = "CheckBox" If idxname = "" Then MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) @@ -675,14 +675,14 @@ Public Class frmMassValidator End If End If - Case "System.Windows.Forms.DateTimePicker" + Case GetType(System.Windows.Forms.DateTimePicker) controltype = "DateTimePicker" Dim DTP As DateTimePicker = oControl If idxname = "" Then MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) Exit For End If - Case "DigitalData.Controls.LookupGrid.LookupControl3" + Case GetType(DigitalData.Controls.LookupGrid.LookupControl3) Try Dim oLookup As LookupControl3 = oControl Dim oWindreamValue = GetWM_Value_Multiple_Docs(idxname) @@ -727,11 +727,7 @@ Public Class frmMassValidator LOGGER.Info(">> Unexpected Error in FillIndexValues(MIs: " & ex.Message, True) LOGGER.Info(">> Controltype: " & controltype) LOGGER.Info(">> Indexname windream: " & indexname) - - End Try - - End Sub Private Function GetWM_Value_Multiple_Docs(idxname As String) Try @@ -1222,9 +1218,8 @@ Public Class frmMassValidator End If If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = CTRL_ID Then '###### - Dim Type As String = oControl.GetType.ToString - Select Case Type - Case "DevExpress.XtraEditors.TextEdit" + Select Case oControl.GetType + Case GetType(DevExpress.XtraEditors.TextEdit) Try value_from_control = oControl.Text Catch ex As Exception @@ -1232,7 +1227,7 @@ Public Class frmMassValidator value_from_control = String.Empty End Try - Case "System.Windows.Forms.ComboBox" + Case GetType(System.Windows.Forms.ComboBox) Dim cmb As ComboBox = oControl Try value_from_control = cmb.Text @@ -1240,7 +1235,7 @@ Public Class frmMassValidator LOGGER.Error(ex) value_from_control = String.Empty End Try - Case "System.Windows.Forms.DateTimePicker" + Case GetType(System.Windows.Forms.DateTimePicker) Dim dtp As DateTimePicker = oControl Try value_from_control = dtp.Value.ToString @@ -1249,7 +1244,7 @@ Public Class frmMassValidator value_from_control = String.Empty End Try - Case "System.Windows.Forms.CheckBox" + Case GetType(System.Windows.Forms.CheckBox) Dim chk As CheckBox = oControl Try value_from_control = chk.Checked @@ -1434,9 +1429,8 @@ Public Class frmMassValidator LOGGER.Info(" >> Indexname is unexpected empty.") Continue For End If - Dim Type As String = oControl.GetType.ToString - Select Case Type - Case "DigitalData.Controls.LookupGrid.LookupControl3" + Select Case oControl.GetType + Case GetType(DigitalData.Controls.LookupGrid.LookupControl3) Try Dim myLookup As LookupControl3 = oControl @@ -1522,7 +1516,7 @@ Public Class frmMassValidator Catch ex As Exception LOGGER.Error(ex) End Try - Case "DevExpress.XtraEditors.TextEdit" + Case GetType(DevExpress.XtraEditors.TextEdit) Try 'Als erstes überprüfen ob überhaupt etwas eingetragen worden ist If Check_Missing(oControl, "txt") = True And _MUSSEINGABE = True Then 'NICHTS EINGETRAGEN @@ -1576,7 +1570,7 @@ Public Class frmMassValidator End Try - Case "System.Windows.Forms.DateTimePicker" + Case GetType(System.Windows.Forms.DateTimePicker) Dim dtp As DateTimePicker = oControl 'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss If _MUSSEINGABE = True And dtp.Value.ToString = String.Empty Then @@ -1616,7 +1610,7 @@ Public Class frmMassValidator Else LOGGER.Debug("DateValue is 01.01.0001 00:00:00") End If - Case "System.Windows.Forms.CheckBox" + Case GetType(System.Windows.Forms.CheckBox) Dim chk As CheckBox = oControl oMyControlInput = chk.Checked.ToString @@ -1663,7 +1657,7 @@ Public Class frmMassValidator End If End If - Case "System.Windows.Forms.DataGridView" + Case GetType(System.Windows.Forms.DataGridView) Dim dgv As DataGridView = oControl Dim Zeilen As Integer = 0 @@ -1953,18 +1947,4 @@ Public Class frmMassValidator FORM_Shown = True End Sub - Private Sub frmMassValidator_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing - 'If Viewer = "docview" Then - ' CloseWDDocview() - 'End If - - 'If vpdfviewer = "system" Then - ' Kill_PDFAcrobat() - 'Else - ' If pdfxchange = True Or sumatra = True Then - ' Close_PDF_Viewer(Document_Path) - ' End If - ' KillU_Viewer() - 'End If - End Sub End Class \ No newline at end of file diff --git a/app/TaskFlow/frmValidator.Designer.vb b/app/TaskFlow/frmValidator.Designer.vb index 3abee05..8e5bbd0 100644 --- a/app/TaskFlow/frmValidator.Designer.vb +++ b/app/TaskFlow/frmValidator.Designer.vb @@ -24,15 +24,12 @@ Partial Class frmValidator Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmValidator)) - Me.SplitContainer2_DV_Chat = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() - Me.Panel1 = New System.Windows.Forms.Panel() - Me.TITLELabel1 = New System.Windows.Forms.Label() - Me.btnSave = New System.Windows.Forms.Button() - Me.DESCRIPTIONLabel = New System.Windows.Forms.Label() - Me.PanelValidatorControl = New System.Windows.Forms.Panel() + Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl() + Me.btnSave = New DevExpress.XtraEditors.SimpleButton() + Me.DESCRIPTIONLabel = New DevExpress.XtraEditors.LabelControl() + Me.TITLELabel1 = New DevExpress.XtraEditors.LabelControl() Me.DocumentViewerValidator = New DigitalData.Controls.DocumentViewer.DocumentViewer() - Me.ChatControl1 = New DigitalData.Controls.ChatControl.ChatControl() Me.BarAndDockingController3 = New DevExpress.XtraBars.BarAndDockingController(Me.components) Me.BarAndDockingController2 = New DevExpress.XtraBars.BarAndDockingController(Me.components) Me.BarAndDockingController1 = New DevExpress.XtraBars.BarAndDockingController(Me.components) @@ -86,44 +83,34 @@ Partial Class frmValidator Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem() Me.BarLinkContainerItem1 = New DevExpress.XtraBars.BarLinkContainerItem() Me.btnitemConversationEnd = New DevExpress.XtraBars.BarButtonItem() - Me.bbtnitem_ConversationNew = New DevExpress.XtraBars.BarButtonItem() Me.BarLinkContainerItem2 = New DevExpress.XtraBars.BarLinkContainerItem() Me.BarEditItem1 = New DevExpress.XtraBars.BarEditItem() Me.RepositoryItemComboBox1 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox() Me.BarEditItem2 = New DevExpress.XtraBars.BarEditItem() Me.RepositoryItemComboBox2 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox() - Me.BarEditItem3 = New DevExpress.XtraBars.BarEditItem() - Me.RepositoryItemComboBox3 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox() - Me.btnitemConversation_reload = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem5 = New DevExpress.XtraBars.BarButtonItem() Me.Attmt_bbtnitmShow = New DevExpress.XtraBars.BarButtonItem() Me.barbtnitmExport = New DevExpress.XtraBars.BarButtonItem() Me.ToggleSwitchItemLoadonClick = New DevExpress.XtraBars.BarToggleSwitchItem() Me.Attmnt_bbtnitm_LoadonClick = New DevExpress.XtraBars.BarCheckItem() Me.BarButtonItem6 = New DevExpress.XtraBars.BarButtonItem() - Me.RibbonPageConversations = New DevExpress.XtraBars.Ribbon.RibbonPageCategory() - Me.RibbonPage3 = New DevExpress.XtraBars.Ribbon.RibbonPage() - Me.RibbonPageGroupConv1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() - Me.RibbonPageGroupConv_Change = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageFile = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroupCustom = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RepositoryItemComboBox3 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox() Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog() - CType(Me.SplitContainer2_DV_Chat, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.SplitContainer2_DV_Chat.Panel1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SplitContainer2_DV_Chat.Panel1.SuspendLayout() - CType(Me.SplitContainer2_DV_Chat.Panel2, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SplitContainer2_DV_Chat.Panel2.SuspendLayout() - Me.SplitContainer2_DV_Chat.SuspendLayout() + Me.PanelValidatorControl = New DevExpress.XtraEditors.XtraScrollableControl() + Me.PanelValidatorControlBorder = New DevExpress.XtraEditors.PanelControl() CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainer1.Panel1.SuspendLayout() Me.SplitContainer1.Panel2.SuspendLayout() Me.SplitContainer1.SuspendLayout() - Me.Panel1.SuspendLayout() + CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.PanelControl1.SuspendLayout() CType(Me.BarAndDockingController3, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.BarAndDockingController2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.BarAndDockingController1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -134,26 +121,10 @@ Partial Class frmValidator CType(Me.RepositoryItemComboBox1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemComboBox2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemComboBox3, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.PanelValidatorControlBorder, System.ComponentModel.ISupportInitialize).BeginInit() + Me.PanelValidatorControlBorder.SuspendLayout() Me.SuspendLayout() ' - 'SplitContainer2_DV_Chat - ' - Me.SplitContainer2_DV_Chat.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2 - resources.ApplyResources(Me.SplitContainer2_DV_Chat, "SplitContainer2_DV_Chat") - Me.SplitContainer2_DV_Chat.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.None - Me.SplitContainer2_DV_Chat.Name = "SplitContainer2_DV_Chat" - ' - 'SplitContainer2_DV_Chat.Panel1 - ' - Me.SplitContainer2_DV_Chat.Panel1.Controls.Add(Me.SplitContainer1) - resources.ApplyResources(Me.SplitContainer2_DV_Chat.Panel1, "SplitContainer2_DV_Chat.Panel1") - ' - 'SplitContainer2_DV_Chat.Panel2 - ' - resources.ApplyResources(Me.SplitContainer2_DV_Chat.Panel2, "SplitContainer2_DV_Chat.Panel2") - Me.SplitContainer2_DV_Chat.Panel2.Controls.Add(Me.ChatControl1) - Me.SplitContainer2_DV_Chat.SplitterPosition = 919 - ' 'SplitContainer1 ' resources.ApplyResources(Me.SplitContainer1, "SplitContainer1") @@ -161,46 +132,52 @@ Partial Class frmValidator ' 'SplitContainer1.Panel1 ' - Me.SplitContainer1.Panel1.Controls.Add(Me.Panel1) + Me.SplitContainer1.Panel1.Controls.Add(Me.PanelControl1) ' 'SplitContainer1.Panel2 ' Me.SplitContainer1.Panel2.Controls.Add(Me.DocumentViewerValidator) Me.SplitContainer1.TabStop = False ' - 'Panel1 - ' - Me.Panel1.BackColor = System.Drawing.SystemColors.ControlLight - Me.Panel1.Controls.Add(Me.TITLELabel1) - Me.Panel1.Controls.Add(Me.btnSave) - Me.Panel1.Controls.Add(Me.DESCRIPTIONLabel) - Me.Panel1.Controls.Add(Me.PanelValidatorControl) - resources.ApplyResources(Me.Panel1, "Panel1") - Me.Panel1.Name = "Panel1" + 'PanelControl1 ' - 'TITLELabel1 - ' - resources.ApplyResources(Me.TITLELabel1, "TITLELabel1") - Me.TITLELabel1.Name = "TITLELabel1" + Me.PanelControl1.Controls.Add(Me.PanelValidatorControlBorder) + Me.PanelControl1.Controls.Add(Me.btnSave) + Me.PanelControl1.Controls.Add(Me.DESCRIPTIONLabel) + Me.PanelControl1.Controls.Add(Me.TITLELabel1) + resources.ApplyResources(Me.PanelControl1, "PanelControl1") + Me.PanelControl1.Name = "PanelControl1" ' 'btnSave ' resources.ApplyResources(Me.btnSave, "btnSave") - Me.btnSave.Image = Global.DD_ProcessManager.My.Resources.Resources.flag_pink + Me.btnSave.Appearance.Font = CType(resources.GetObject("btnSave.Appearance.Font"), System.Drawing.Font) + Me.btnSave.Appearance.Options.UseFont = True + Me.btnSave.Appearance.Options.UseTextOptions = True + Me.btnSave.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap + Me.btnSave.ImageOptions.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.RightCenter + Me.btnSave.ImageOptions.SvgImage = CType(resources.GetObject("btnSave.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.btnSave.ImageOptions.SvgImageSize = New System.Drawing.Size(25, 25) Me.btnSave.Name = "btnSave" - Me.btnSave.TabStop = False - Me.btnSave.UseVisualStyleBackColor = True ' 'DESCRIPTIONLabel ' resources.ApplyResources(Me.DESCRIPTIONLabel, "DESCRIPTIONLabel") + Me.DESCRIPTIONLabel.Appearance.Font = CType(resources.GetObject("DESCRIPTIONLabel.Appearance.Font"), System.Drawing.Font) + Me.DESCRIPTIONLabel.Appearance.Options.UseFont = True + Me.DESCRIPTIONLabel.Appearance.Options.UseTextOptions = True + Me.DESCRIPTIONLabel.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Top + Me.DESCRIPTIONLabel.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap Me.DESCRIPTIONLabel.Name = "DESCRIPTIONLabel" ' - 'PanelValidatorControl + 'TITLELabel1 ' - resources.ApplyResources(Me.PanelValidatorControl, "PanelValidatorControl") - Me.PanelValidatorControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.PanelValidatorControl.Name = "PanelValidatorControl" + resources.ApplyResources(Me.TITLELabel1, "TITLELabel1") + Me.TITLELabel1.Appearance.Font = CType(resources.GetObject("TITLELabel1.Appearance.Font"), System.Drawing.Font) + Me.TITLELabel1.Appearance.Options.UseFont = True + Me.TITLELabel1.Appearance.Options.UseTextOptions = True + Me.TITLELabel1.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.NoWrap + Me.TITLELabel1.Name = "TITLELabel1" ' 'DocumentViewerValidator ' @@ -208,11 +185,6 @@ Partial Class frmValidator Me.DocumentViewerValidator.FileLoaded = False Me.DocumentViewerValidator.Name = "DocumentViewerValidator" ' - 'ChatControl1 - ' - resources.ApplyResources(Me.ChatControl1, "ChatControl1") - Me.ChatControl1.Name = "ChatControl1" - ' 'BarAndDockingController3 ' Me.BarAndDockingController3.PropertiesBar.AllowLinkLighting = False @@ -465,11 +437,10 @@ Partial Class frmValidator 'RibbonControl1 ' Me.RibbonControl1.ExpandCollapseItem.Id = 0 - Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.bsiError, Me.bsiInformation, Me.bsiDocID, Me.BarButtonItemFileView, Me.BarButtonItem3, Me.BarButtonItem4, Me.bbtniRefresh, Me.bbtniRefreshSearches, Me.bbtniNext, Me.bbtniDelete, Me.bbtniAnnotation, Me.bsiInfo1, Me.bsiInfo2, Me.BbtnitmSave, Me.BarButtonItem2, Me.BarLinkContainerItem1, Me.btnitemConversationEnd, Me.bbtnitem_ConversationNew, Me.BarLinkContainerItem2, Me.BarEditItem1, Me.BarEditItem2, Me.BarEditItem3, Me.btnitemConversation_reload, Me.BarButtonItem5, Me.Attmt_bbtnitmShow, Me.barbtnitmExport, Me.ToggleSwitchItemLoadonClick, Me.Attmnt_bbtnitm_LoadonClick, Me.BarButtonItem6}) + Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.bsiError, Me.bsiInformation, Me.bsiDocID, Me.BarButtonItemFileView, Me.BarButtonItem3, Me.BarButtonItem4, Me.bbtniRefresh, Me.bbtniRefreshSearches, Me.bbtniNext, Me.bbtniDelete, Me.bbtniAnnotation, Me.bsiInfo1, Me.bsiInfo2, Me.BbtnitmSave, Me.BarButtonItem2, Me.BarLinkContainerItem1, Me.btnitemConversationEnd, Me.BarLinkContainerItem2, Me.BarEditItem1, Me.BarEditItem2, Me.BarButtonItem5, Me.Attmt_bbtnitmShow, Me.barbtnitmExport, Me.ToggleSwitchItemLoadonClick, Me.Attmnt_bbtnitm_LoadonClick, Me.BarButtonItem6}) resources.ApplyResources(Me.RibbonControl1, "RibbonControl1") Me.RibbonControl1.MaxItemId = 33 Me.RibbonControl1.Name = "RibbonControl1" - Me.RibbonControl1.PageCategories.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageCategory() {Me.RibbonPageConversations}) Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemComboBox1, Me.RepositoryItemComboBox2, Me.RepositoryItemComboBox3}) Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] @@ -619,13 +590,6 @@ Partial Class frmValidator Me.btnitemConversationEnd.ImageOptions.SvgImage = CType(resources.GetObject("btnitemConversationEnd.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.btnitemConversationEnd.Name = "btnitemConversationEnd" ' - 'bbtnitem_ConversationNew - ' - resources.ApplyResources(Me.bbtnitem_ConversationNew, "bbtnitem_ConversationNew") - Me.bbtnitem_ConversationNew.Id = 20 - Me.bbtnitem_ConversationNew.ImageOptions.SvgImage = CType(resources.GetObject("bbtnitem_ConversationNew.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) - Me.bbtnitem_ConversationNew.Name = "bbtnitem_ConversationNew" - ' 'BarLinkContainerItem2 ' resources.ApplyResources(Me.BarLinkContainerItem2, "BarLinkContainerItem2") @@ -658,27 +622,6 @@ Partial Class frmValidator Me.RepositoryItemComboBox2.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject("RepositoryItemComboBox2.Buttons"), DevExpress.XtraEditors.Controls.ButtonPredefines))}) Me.RepositoryItemComboBox2.Name = "RepositoryItemComboBox2" ' - 'BarEditItem3 - ' - Me.BarEditItem3.Edit = Me.RepositoryItemComboBox3 - resources.ApplyResources(Me.BarEditItem3, "BarEditItem3") - Me.BarEditItem3.Id = 24 - Me.BarEditItem3.Name = "BarEditItem3" - Me.BarEditItem3.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large - ' - 'RepositoryItemComboBox3 - ' - resources.ApplyResources(Me.RepositoryItemComboBox3, "RepositoryItemComboBox3") - Me.RepositoryItemComboBox3.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject("RepositoryItemComboBox3.Buttons"), DevExpress.XtraEditors.Controls.ButtonPredefines))}) - Me.RepositoryItemComboBox3.Name = "RepositoryItemComboBox3" - ' - 'btnitemConversation_reload - ' - resources.ApplyResources(Me.btnitemConversation_reload, "btnitemConversation_reload") - Me.btnitemConversation_reload.Id = 25 - Me.btnitemConversation_reload.ImageOptions.SvgImage = CType(resources.GetObject("btnitemConversation_reload.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) - Me.btnitemConversation_reload.Name = "btnitemConversation_reload" - ' 'BarButtonItem5 ' Me.BarButtonItem5.Id = 26 @@ -733,31 +676,6 @@ Partial Class frmValidator Me.BarButtonItem6.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large Me.BarButtonItem6.Visibility = DevExpress.XtraBars.BarItemVisibility.Never ' - 'RibbonPageConversations - ' - Me.RibbonPageConversations.Name = "RibbonPageConversations" - Me.RibbonPageConversations.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage3}) - resources.ApplyResources(Me.RibbonPageConversations, "RibbonPageConversations") - ' - 'RibbonPage3 - ' - Me.RibbonPage3.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroupConv1, Me.RibbonPageGroupConv_Change}) - Me.RibbonPage3.Name = "RibbonPage3" - resources.ApplyResources(Me.RibbonPage3, "RibbonPage3") - ' - 'RibbonPageGroupConv1 - ' - Me.RibbonPageGroupConv1.ItemLinks.Add(Me.bbtnitem_ConversationNew) - Me.RibbonPageGroupConv1.ItemLinks.Add(Me.btnitemConversation_reload) - Me.RibbonPageGroupConv1.Name = "RibbonPageGroupConv1" - resources.ApplyResources(Me.RibbonPageGroupConv1, "RibbonPageGroupConv1") - ' - 'RibbonPageGroupConv_Change - ' - Me.RibbonPageGroupConv_Change.ItemLinks.Add(Me.BarEditItem3) - Me.RibbonPageGroupConv_Change.Name = "RibbonPageGroupConv_Change" - resources.ApplyResources(Me.RibbonPageGroupConv_Change, "RibbonPageGroupConv_Change") - ' 'RibbonPage1 ' Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageFile, Me.RibbonPageGroup3, Me.RibbonPageGroupCustom, Me.RibbonPageGroup2}) @@ -805,6 +723,12 @@ Partial Class frmValidator resources.ApplyResources(Me.RibbonPageGroup2, "RibbonPageGroup2") Me.RibbonPageGroup2.Visible = False ' + 'RepositoryItemComboBox3 + ' + resources.ApplyResources(Me.RepositoryItemComboBox3, "RepositoryItemComboBox3") + Me.RepositoryItemComboBox3.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject("RepositoryItemComboBox3.Buttons"), DevExpress.XtraEditors.Controls.ButtonPredefines))}) + Me.RepositoryItemComboBox3.Name = "RepositoryItemComboBox3" + ' 'RibbonStatusBar1 ' Me.RibbonStatusBar1.ItemLinks.Add(Me.bsiError) @@ -819,12 +743,28 @@ Partial Class frmValidator Me.RibbonPage2.Name = "RibbonPage2" resources.ApplyResources(Me.RibbonPage2, "RibbonPage2") ' + 'PanelValidatorControl + ' + Me.PanelValidatorControl.Appearance.BackColor = System.Drawing.Color.WhiteSmoke + Me.PanelValidatorControl.Appearance.Options.UseBackColor = True + resources.ApplyResources(Me.PanelValidatorControl, "PanelValidatorControl") + Me.PanelValidatorControl.Name = "PanelValidatorControl" + ' + 'PanelValidatorControlBorder + ' + resources.ApplyResources(Me.PanelValidatorControlBorder, "PanelValidatorControlBorder") + Me.PanelValidatorControlBorder.Appearance.BorderColor = System.Drawing.Color.Black + Me.PanelValidatorControlBorder.Appearance.Options.UseBorderColor = True + Me.PanelValidatorControlBorder.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple + Me.PanelValidatorControlBorder.Controls.Add(Me.PanelValidatorControl) + Me.PanelValidatorControlBorder.Name = "PanelValidatorControlBorder" + ' 'frmValidator ' Me.Appearance.Options.UseFont = True resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.Controls.Add(Me.SplitContainer2_DV_Chat) + Me.Controls.Add(Me.SplitContainer1) Me.Controls.Add(Me.RibbonControl1) Me.Controls.Add(Me.RibbonStatusBar1) Me.Controls.Add(Me.barDockControlLeft) @@ -832,22 +772,17 @@ Partial Class frmValidator Me.Controls.Add(Me.barDockControlBottom) Me.Controls.Add(Me.barDockControlTop) Me.IconOptions.Icon = CType(resources.GetObject("frmValidator.IconOptions.Icon"), System.Drawing.Icon) - Me.IconOptions.LargeImage = CType(resources.GetObject("frmValidator.IconOptions.LargeImage"), System.Drawing.Image) + Me.IconOptions.SvgImage = CType(resources.GetObject("frmValidator.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.KeyPreview = True Me.Name = "frmValidator" Me.Ribbon = Me.RibbonControl1 Me.StatusBar = Me.RibbonStatusBar1 - CType(Me.SplitContainer2_DV_Chat.Panel1, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainer2_DV_Chat.Panel1.ResumeLayout(False) - CType(Me.SplitContainer2_DV_Chat.Panel2, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainer2_DV_Chat.Panel2.ResumeLayout(False) - CType(Me.SplitContainer2_DV_Chat, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainer2_DV_Chat.ResumeLayout(False) Me.SplitContainer1.Panel1.ResumeLayout(False) Me.SplitContainer1.Panel2.ResumeLayout(False) CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainer1.ResumeLayout(False) - Me.Panel1.ResumeLayout(False) + CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.PanelControl1.ResumeLayout(False) CType(Me.BarAndDockingController3, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.BarAndDockingController2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.BarAndDockingController1, System.ComponentModel.ISupportInitialize).EndInit() @@ -858,14 +793,12 @@ Partial Class frmValidator CType(Me.RepositoryItemComboBox1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemComboBox2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemComboBox3, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.PanelValidatorControlBorder, System.ComponentModel.ISupportInitialize).EndInit() + Me.PanelValidatorControlBorder.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() End Sub - Friend WithEvents TITLELabel1 As System.Windows.Forms.Label - Friend WithEvents btnSave As System.Windows.Forms.Button - Friend WithEvents DESCRIPTIONLabel As System.Windows.Forms.Label - Friend WithEvents PanelValidatorControl As System.Windows.Forms.Panel Friend WithEvents PdfBarController1 As DevExpress.XtraPdfViewer.Bars.PdfBarController Friend WithEvents BarManager1 As DevExpress.XtraBars.BarManager Friend WithEvents PdfFileOpenBarItem1 As DevExpress.XtraPdfViewer.Bars.PdfFileOpenBarItem @@ -925,24 +858,14 @@ Partial Class frmValidator Friend WithEvents DocumentViewerValidator As DigitalData.Controls.DocumentViewer.DocumentViewer Friend WithEvents BbtnitmSave As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem - Friend WithEvents Panel1 As Panel - Friend WithEvents SplitContainer2_DV_Chat As DevExpress.XtraEditors.SplitContainerControl Friend WithEvents BarLinkContainerItem1 As DevExpress.XtraBars.BarLinkContainerItem Friend WithEvents btnitemConversationEnd As DevExpress.XtraBars.BarButtonItem - Friend WithEvents bbtnitem_ConversationNew As DevExpress.XtraBars.BarButtonItem - Friend WithEvents RibbonPageConversations As DevExpress.XtraBars.Ribbon.RibbonPageCategory - Friend WithEvents RibbonPage3 As DevExpress.XtraBars.Ribbon.RibbonPage - Friend WithEvents RibbonPageGroupConv1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents BarLinkContainerItem2 As DevExpress.XtraBars.BarLinkContainerItem Friend WithEvents BarEditItem1 As DevExpress.XtraBars.BarEditItem Friend WithEvents RepositoryItemComboBox1 As DevExpress.XtraEditors.Repository.RepositoryItemComboBox Friend WithEvents BarEditItem2 As DevExpress.XtraBars.BarEditItem Friend WithEvents RepositoryItemComboBox2 As DevExpress.XtraEditors.Repository.RepositoryItemComboBox - Friend WithEvents RibbonPageGroupConv_Change As DevExpress.XtraBars.Ribbon.RibbonPageGroup - Friend WithEvents BarEditItem3 As DevExpress.XtraBars.BarEditItem Friend WithEvents RepositoryItemComboBox3 As DevExpress.XtraEditors.Repository.RepositoryItemComboBox - Friend WithEvents ChatControl1 As DigitalData.Controls.ChatControl.ChatControl - Friend WithEvents btnitemConversation_reload As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem5 As DevExpress.XtraBars.BarButtonItem Friend WithEvents Attmt_bbtnitmShow As DevExpress.XtraBars.BarButtonItem Friend WithEvents RibbonPageGroupCustom As DevExpress.XtraBars.Ribbon.RibbonPageGroup @@ -951,4 +874,10 @@ Partial Class frmValidator Friend WithEvents ToggleSwitchItemLoadonClick As DevExpress.XtraBars.BarToggleSwitchItem Friend WithEvents Attmnt_bbtnitm_LoadonClick As DevExpress.XtraBars.BarCheckItem Friend WithEvents BarButtonItem6 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl + Friend WithEvents btnSave As DevExpress.XtraEditors.SimpleButton + Friend WithEvents DESCRIPTIONLabel As DevExpress.XtraEditors.LabelControl + Friend WithEvents TITLELabel1 As DevExpress.XtraEditors.LabelControl + Friend WithEvents PanelValidatorControl As DevExpress.XtraEditors.XtraScrollableControl + Friend WithEvents PanelValidatorControlBorder As DevExpress.XtraEditors.PanelControl End Class diff --git a/app/TaskFlow/frmValidator.resx b/app/TaskFlow/frmValidator.resx index 21c4481..3438a59 100644 --- a/app/TaskFlow/frmValidator.resx +++ b/app/TaskFlow/frmValidator.resx @@ -118,88 +118,106 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + Fill - + 0, 158 - + + Top, Bottom, Left, Right + + Fill - - 0, 0 + + 2, 2 - - Top, Left, Right + + 520, 368 - - Segoe UI Symbol, 12pt, style=Bold + + + 3 - - 3, 4 + + PanelValidatorControl - - No + + DevExpress.XtraEditors.XtraScrollableControl, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - 433, 29 + + PanelValidatorControlBorder - - - 1 + + 0 - - Label1 + + 5, 85 - - MiddleLeft + + 524, 372 - - TITLELabel1 + + 44 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + PanelValidatorControlBorder - - Panel1 + + DevExpress.XtraEditors.PanelControl, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - + + PanelControl1 + + 0 Bottom, Left, Right - - Tahoma, 9.75pt + + Segoe UI, 9.75pt - - MiddleLeft + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAADUCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IlNlbmQiPg0KICAgIDxwb2x5Z29uIHBvaW50cz0iMiwy + MCA4LDIyLjQgMjQsMTAgMTIsMjQgMTIsMzAgMTYuMywyNS43IDIyLDI4IDMwLDIgICIgY2xhc3M9IkJs + dWUiIC8+DQogIDwvZz4NCjwvc3ZnPgs= + - 7, 446 - - - 3, 4, 3, 4 + 5, 463 - 445, 50 + 524, 52 - 11 + 2 - Validierung speichern - Nächstes Dokument + Validierung speichern - Nächstes Dokument btnSave - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - Panel1 + PanelControl1 1 @@ -207,85 +225,92 @@ Top, Left, Right + + Segoe UI, 9.75pt + + + + None + 5, 33 - 447, 48 + 524, 46 1 - Label3 + LabelControl1 DESCRIPTIONLabel - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + DevExpress.XtraEditors.LabelControl, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - Panel1 + PanelControl1 2 - - Top, Bottom, Left, Right + + Top, Left, Right - - True + + Segoe UI, 12pt, style=Bold - - 8, 85 + + None - - 3, 4, 3, 4 + + 5, 5 - - 444, 353 + + 524, 28 - - 18 + + 1 - - PanelValidatorControl + + LabelControl1 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + TITLELabel1 - - Panel1 + + DevExpress.XtraEditors.LabelControl, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - + + PanelControl1 + + 3 - + Fill - + 0, 0 - - 3, 4, 3, 4 - - - 455, 503 + + 534, 522 - - 24 + + 25 - - Panel1 + + PanelControl1 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + DevExpress.XtraEditors.PanelControl, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - + SplitContainer1.Panel1 - + 0 @@ -310,7 +335,7 @@ 3, 4, 3, 4 - 460, 503 + 418, 522 0 @@ -319,7 +344,7 @@ DocumentViewerValidator - DigitalData.Controls.DocumentViewer.DocumentViewer, DigitalData.Controls.DocumentViewer, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null + DigitalData.Controls.DocumentViewer.DocumentViewer, DigitalData.Controls.DocumentViewer, Version=1.9.0.0, Culture=neutral, PublicKeyToken=null SplitContainer1.Panel2 @@ -340,10 +365,10 @@ 1 - 919, 503 + 956, 522 - 455 + 534 37 @@ -355,90 +380,9 @@ System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - SplitContainer2_DV_Chat.Panel1 - - - 0 - - - Panel1 - - - SplitContainer2_DV_Chat.Panel1 - - - DevExpress.XtraEditors.SplitGroupPanel, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - SplitContainer2_DV_Chat - - - 0 - - - True - - - Fill - - - Tahoma, 9.75pt - - - 0, 0 - - - 3, 4, 3, 4 - - - 256, 503 - - - 0 - - - ChatControl1 - - - DigitalData.Controls.ChatControl.ChatControl, DigitalData.Controls.ChatControl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - SplitContainer2_DV_Chat.Panel2 - - - 0 - - - Panel2 - - - SplitContainer2_DV_Chat.Panel2 - - - DevExpress.XtraEditors.SplitGroupPanel, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - SplitContainer2_DV_Chat - - - 1 - - - 1185, 503 - - - 44 - - - SplitContainer2_DV_Chat - - - DevExpress.XtraEditors.SplitContainerControl, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - $this - + 0 @@ -460,7 +404,7 @@ 0, 0 - 1185, 0 + 956, 0 barDockControlTop @@ -478,10 +422,10 @@ Bottom - 0, 683 + 0, 702 - 1185, 0 + 956, 0 barDockControlBottom @@ -502,7 +446,7 @@ 0, 0 - 0, 683 + 0, 702 barDockControlLeft @@ -520,10 +464,10 @@ Right - 1185, 0 + 956, 0 - 0, 683 + 0, 702 barDockControlRight @@ -547,7 +491,7 @@ 7, 17 - 1185, 683 + 956, 702 Tahoma, 8.25pt, style=Bold @@ -816,7 +760,6 @@ Beende Konversation - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 @@ -835,27 +778,6 @@ MS42LDgsMTYsOHogTTE2LDI0Yy0xLjUsMC0yLjgtMC40LTQtMS4xTDIyLjksMTJjMC43LDEuMiwxLjEs Mi41LDEuMSw0QzI0LDIwLjQsMjAuNCwyNCwxNiwyNHoiIGNsYXNzPSJSZWQiIC8+DQogIDwvZz4NCjwv c3ZnPgs= - - - - Neue Konversation - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 - LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl - dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAGICAAAC77u/ - PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi - IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv - MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh - Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg - MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z - ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz - OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp - dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZENpcmNsZWQiPg0KICAgIDxwYXRoIGQ9Ik0xNiw0 - QzkuNCw0LDQsOS40LDQsMTZzNS40LDEyLDEyLDEyczEyLTUuNCwxMi0xMlMyMi42LDQsMTYsNHogTTI0 - LDE4aC02djZoLTR2LTZIOHYtNGg2VjhoNHY2aDZWMTh6IiBjbGFzcz0iR3JlZW4iIC8+DQogIDwvZz4N - Cjwvc3ZnPgs= @@ -880,39 +802,6 @@ Combo - - False - - - Combo - - - 200 - - - Neu laden - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 - LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl - dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAC4DAAAC77u/ - PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi - IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv - MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh - Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg - MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z - ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz - OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp - dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IlJlZnJlc2hfMV8iPg0KICAgIDxwYXRoIGQ9Ik0yNC41 - LDcuNUMyMi4zLDUuMywxOS4zLDQsMTYsNEMxMC4xLDQsNS4xLDguMyw0LjIsMTRoNC4xYzAuOS0zLjQs - NC02LDcuNy02YzIuMiwwLDQuMiwwLjksNS42LDIuNEwxOCwxNCAgIGg1LjdoNC4xSDI4VjRMMjQuNSw3 - LjV6IiBjbGFzcz0iR3JlZW4iIC8+DQogICAgPHBhdGggZD0iTTE2LjIsMjRjLTIuMiwwLTQuMi0wLjkt - NS42LTIuNGwzLjYtMy42SDguNEg0LjRINC4ydjEwbDMuNS0zLjVjMi4yLDIuMiw1LjIsMy41LDguNSwz - LjUgICBDMjIuMSwyOCwyNywyMy43LDI4LDE4aC00LjFDMjMsMjEuNCwxOS45LDI0LDE2LjIsMjR6IiBj - bGFzcz0iR3JlZW4iIC8+DQogIDwvZz4NCjwvc3ZnPgs= - - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 @@ -1061,18 +950,6 @@ 0, 0 - - Aktionen - - - Beendete Konversationen - - - Funktionen - - - Konversationen - Datei @@ -1101,14 +978,20 @@ Start + + False + + + Combo + - 1185, 158 + 956, 158 - 0, 661 + 0, 680 - 1185, 22 + 956, 22 RibbonStatusBar1 @@ -1303,51 +1186,36 @@ AAA= - + - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m - dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAALdEVYdFRpdGxlAFVzZXI7l1sKAgAACYlJREFUWEeV - lws4lPkex4fCmWEMI3etyyRyiaYwIrq4VC65RDW5hEIqSkgXIYq2k00qGykpkVS7hlLKNas2RaStPau1 - zhabki3ptJ2e7/7fKe1k37PnnN/zfJ5n5ve8v9/3+/u/7/uf/zAA/CWps9iMFHs2Y/tMNmPrTLb+FgE7 - NtFGoTjeWqGVIs5a4RhhLoFBQdfjr6BNSkKJ99wsZWyxZa/OdNNH2TZv1OVGo/1sGtrKU3F5fyT2LLFA - zHSFnJgZCgwq6Pr8J2iTo1AhntyW7XkkYta7vhsF+Kl+H+6f24SOk+G4lb8MbflC3CoMx95Aa0RZykeQ - EmmCFFVL13MstMlRqCDiqmlOmsM9dYfwfWUyru12Rl2aPa4kCXB5izUqEvgojDDBgaDJWD1V/m24Gasz - 2JgZTkrHU/V0fSWhTY5CxWaBQnzp5kV4WPN31GfMRRURPL/WFGXhhigM0sP+xVrI8NBEghMPqS4aOOg/ - EWv5bCzmMf1J+Ti6vpLQJkehgjxwHbdKtuL2sQicXWeKo0Jd5HhpIHO+CtKdlBBvy8GOxXy0lm5HrI0S - cjxUsc5SHn68v1WSciZdX0lok6OQkIq3YY98V5mJis12yPbWQtJsJay3YiNyKguBU1jYH+mEX67n4unN - L1EY547oaQqImCJHDDCfkHolur6S0CZHISEdZ6Pw6PrxRBwS6iNpDheZAY44nugP0d5VuFeVgcHbR4h4 - Lp5cz8bPtZlIXzIDAZPk4MtjviX1anR9JaFNjkIZ2Gil0FiRGYJMD23si3DHyM8tGLpbgud3CsXiz8jk - T1qy0d+0B4+upqEmJxRCU6XfvPSZb0i9Jl1fSWiTo1AGYqbLbz200gHxdhPwXfMFDP94BUMdJzDY9qn4 - 49p0/FiViIaDAVhprfHO/TPmI1KvQddXEtrkKCSk5urKqcYKuI9iZnDQ29WCl93VGGw/9nHZxZPXpuGf - l7ah6/QaiHYuQhBffWi2ltxRUs+h6ysJbXKUDzFeOIUVuMFaGd9WncCL7st4div//eSNn38U76mMR2tB - EArXz4afifIdUmdA1dL1lYQ2KQkJalfjRE3n9BQmr8ZwTwOZ/jCZnBJPF4v/VBmHeyURqP/CB7uWmMPZ - QOEkqeHS9RsLbVISsg9QJuS8zVRDkvztn7RXF+JpawEe1+38IB6PB6cj8c0hP5zYYI9QK/UhS3W5IFLz - X/cACtrkWEhQq6DkY6H+5f6YJWir+AK9NTvxw9exuFMUhuYcP5QlOiLBWR92mrIl5FoNgjRdr7HQJscS - FBTEMDQ0lJslsI5JXDAZ6YFzUZy8HNVZyyFK88CBlTMQ46iDQPMJ0NFQS2SxWMy1c3WlVs+ZGBDhoHNm - 5Uytx6ECjcdBVqpnlvFVAk01mNK+Zhxx7z+JSUJNQZBjKyqqeHp6nlvst3h4b5AVzu0SImmRGVZMU0GA - GQeRAnXEO+sh0s4AFhYWr3R0dCpW2E/cm58SieuV+ejvPI2eht24mBOCXaEO8DFTStNijx9HCXwiWF5e - zkhQ54ohIUNQm8dmBfvaCr4/e/YsiouLkR5kj97a3egsT0Dt/mCUblmI/LWzkL1iBkLsjLBr1y4krg7A - 0fR1+PfLbrz+Rx5e3cvG8J3deNGagp6qNUjxN8F8nnwo6S/9iYGysjLGmdw8SlxWU2a8aYgKp2H3ZANs - nO0oFn/37h1io0JQticCTflr8C35gbqStRSFG12QvNwOy7zc0NHRgShPG7TWifDmcQ0Grmfg3I5FSPG2 - RH1JDp6RTax0sz1c9Fki8ZCSBkpLSylxamn0wicodV4MC0F7aAjOuy1EYGAguQQYGhqCr48vIgIDsD46 - GrErVyLS3R0LXZzR3NyMpqYmBNtp4/lAP0Ye5KP7Qjy2uxtjuo5i3N6QufjtZT+as13grMscIDqKnxgg - QT3t3Ojo6KNZfr7o2LcPbcRAk8MsuPP56OrqwsjICLq7uzFv3jyk7kjFzp074eriimvXronFc3NzIbRS - FxsYvpuNvqsbUZ7kjN3LrdFacQS/dhbg2l5HzJkoN0i0VMcakDEwMBCQJq++StmOvGX+aF8VhkZ7O+ww - N0NCQgL6+/vR2toqNnD37l2cOnUKrvNdUVlZierqari5uWE5eRvut7XgVVcehprW4/nVCDy7FIQBkR96 - SxeiiJwrrNRlbhI9tbEGuOHh4Ufr6+tx83QJtk+3wO2wUDTYzcQFc3PwJ01CQ0MDbG1txeJUZGVlkZW5 - ByurGcjLz4e5phIy1/jh9cBdIh6Lwaur8LQ6EAMVvnhyzg0PjjgijpycjJTHZRG9P24BCWr5DVNTUx/1 - 9vbih5s3sFlPBzcDhKglghfNTJE2iYepxMQCLhfkuo8GqM+zFRXB11UTi7/q78Cv1zZi8MoqDFQJcb9o - IbqOeaF0kw0SPE1gxh1/UVqKwSN64yQNyPH5fJ+CggLxfe7r6cFmbTW0+HjjipUVqkxNIJpijMJJhjhD - TPgqK4uFw8LC4KbIwVY9zQ/id8jkG/CwnOwV3sQsj4X5k5XhxOPAnqeKSVzmFSkphjnRkxXrShhQWrp0 - 6SGRSIQXL17gF3KvN2mooNHVFdX8aaicYoKvjIxwxtAQJTwDFOnpwZPDwQIyeZKuOj4fFW9cj4dnliLJ - iwcPLhMm5E2vqanB1xUVWBcdA0tLy1NES916wvj3uhIGdKKiom60tLTg6dOneHj/Pjapc1HrOBsXLKai - wtgI54h4mYEBThHxY3r6yJs4Edv1/hB/3hiDZ5dD0FngIZ48RJ4Ne1lpdJG9gXqDcg4chJOTUxvR0rVS - eb/6kgYMMzIy3g4MDKCvrw/tDXWIU5+AGoENRGYmOG9Elp7Hwyl9fRTp6qKAiO8w0Hov3teO5/Xr0H16 - CbaRySlxDy4LkSwWXORk0EhWoKn5G4iqqhEQEECdFY3pDKj6+voWHc47AtHFGlTk7EekmgpOmhjjKFny - w7qf4RARzdHWRpamJjI0tbCcr4I3/3pNxNcScX8ibkAeUCaWMVkIZjIRSgy4ysmi+OABXLxUg+TkFAgE - AuoWqNEZoPb+yf7+/jWJiYkIs5yKMC4boRTKbKwgBH8gQIkNIcHfQpmUAs/Ia9aZv0A8uSubCV8OCz6K - 8vDmEBRZ8ORbQigUwsHB4SrRMKa0/mRA/IU8mQRtgiXBmgYbCWY6G7KrvIzZ8DBUEIubqMgcJ3mnMdeN - Mo2gQ5ClxGkN/D+QoPYNyjCHoEagDiHUZ/F/wv8lADB+B3eE88Zb5X+IAAAAAElFTkSuQmCC + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAMgFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntkaXNwbGF5Om5vbmU7fQoJLnN0M3tk + aXNwbGF5OmlubGluZTtmaWxsOiNGRkIxMTU7fQoJLnN0NHtkaXNwbGF5OmlubGluZTt9Cgkuc3Q1e2Rp + c3BsYXk6aW5saW5lO29wYWNpdHk6MC43NTt9Cgkuc3Q2e2Rpc3BsYXk6aW5saW5lO29wYWNpdHk6MC41 + O30KCS5zdDd7ZGlzcGxheTppbmxpbmU7ZmlsbDojMDM5QzIzO30KCS5zdDh7ZGlzcGxheTppbmxpbmU7 + ZmlsbDojRDExQzFDO30KCS5zdDl7ZGlzcGxheTppbmxpbmU7ZmlsbDojMTE3N0Q3O30KCS5zdDEwe2Rp + c3BsYXk6aW5saW5lO2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU+DQogIDxnIGlkPSJVc2VyIj4NCiAgICA8 + cGF0aCBkPSJNMTYuMiwyNkgydi0xLjVjMC03LjUsNS43LTUsOC04LjVjMC44LDEuNSwyLjEsNCw0LDRz + My4yLTIuNSw0LTRjMC43LDEsMS43LDEuNSwyLjcsMS45bDAsMCAgIGMtMC41LDAuOS0wLjcsMi0wLjcs + My4xYzAsMC40LDAsMC43LDAuMSwxLjFMMTYuMiwyNkwxNi4yLDI2eiBNOS4zLDEwLjljMCwwLDAsMC4x + LDAsMC4yYzAuNiwyLjMsMiw0LjksNC43LDQuOXM0LjItMi42LDQuNy00LjkgICBWMTFjMSwwLjEsMC42 + LTEuMSwwLjktMS42QzE5LjgsOC45LDIwLDguNSwxOS45LDhjLTAuMS0wLjQtMC40LTAuNC0wLjUtMC4z + QzIxLjIsMi44LDE4LjMsMywxOC4zLDNTMTgsMCwxMi44LDBDOCwwLDcuNCw0LDguNSw3LjYgICBDOC40 + LDcuNiw4LjEsNy43LDgsNy45QzcuOSw4LjQsOC4yLDguOCw4LjQsOS4zQzguNiw5LjgsOC4zLDExLDku + MywxMC45eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxwYXRoIGQ9Ik0yNywxNmMtMi44LDAtNSwyLjIt + NSw1YzAsMC42LDAuMSwxLjIsMC4zLDEuN0wxNiwyOXYzaDR2LTJoMnYtMmgybDIuMS0yLjFDMjYuNCwy + NiwyNi43LDI2LDI3LDI2ICAgYzIuOCwwLDUtMi4yLDUtNVMyOS44LDE2LDI3LDE2eiBNMjcsMjJjLTAu + NiwwLTEtMC40LTEtMWMwLTAuNiwwLjQtMSwxLTFzMSwwLjQsMSwxQzI4LDIxLjYsMjcuNiwyMiwyNywy + MnoiIGNsYXNzPSJZZWxsb3ciIC8+DQogIDwvZz4NCjwvc3ZnPgs= @@ -1644,12 +1512,6 @@ DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - bbtnitem_ConversationNew - - - DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - BarLinkContainerItem2 @@ -1680,24 +1542,6 @@ DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - BarEditItem3 - - - DevExpress.XtraBars.BarEditItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - RepositoryItemComboBox3 - - - DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - btnitemConversation_reload - - - DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - BarButtonItem5 @@ -1734,30 +1578,6 @@ DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - RibbonPageConversations - - - DevExpress.XtraBars.Ribbon.RibbonPageCategory, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - RibbonPage3 - - - DevExpress.XtraBars.Ribbon.RibbonPage, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - RibbonPageGroupConv1 - - - DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - RibbonPageGroupConv_Change - - - DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - RibbonPage1 @@ -1788,6 +1608,12 @@ DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + RepositoryItemComboBox3 + + + DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + RibbonPage2 diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index bc58b65..3a57176 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -349,72 +349,6 @@ Public Class frmValidator 'oErrMsgMissingInput = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.MissingInput") oErrMsgMissingInput = S.Bitte_validieren_Sie_die_rot_markierten_Felder_ - RibbonPageConversations.Visible = False - If IDB_ACTIVE Then - Dim oSQL = $"SELECT * FROM [dbo].[FNIDB_OBJECT_DYNAMIC_CONFIG] ({CURRENT_DOC_ID},{USER_ID})" - DTDYNAMIC_RIGHTS = DatabaseFallback.GetDatatableIDB(oSQL) ', CONNECTION_STRING_IDB, "FNIDB_OBJECT_DYNAMIC_CONFIG") - RibbonPageGroupConv1.Enabled = False - Dim oView As DataView = New DataView(DTDYNAMIC_RIGHTS) - oView.RowFilter = "CONF_TITLE like '%CONVERSATION_RIGHT%'" - Console.WriteLine(oView.Count, "oView after") - If oView.Count > 0 Then - LOGGER.Debug("CONVERSATION-RIGHTS EXISTING") - RibbonPageConversations.Visible = True - RibbonPageGroupConv1.Enabled = True - - 'ConversationQUDT_Delete = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.Conversation_Delete") - ConversationQUDT_Delete = Nothing - - oView = New DataView(DTDYNAMIC_RIGHTS) - oView.RowFilter = "CONF_TITLE = 'CONVERSATION_USER_ACTIVE'" - Conversation_initialized = Conversation_init() - - If oView.Count = 1 Then - Conversation_User_Active = True - - Else - SplitContainer2_DV_Chat.Collapsed = True - Conversation_User_Active = False - SplitContainer2_DV_Chat.Panel2.Visible = False - End If - - - Else - SplitContainer2_DV_Chat.Collapsed = True - RibbonPageConversations.Visible = False - End If - - - 'If Not IsNothing(DTConversations) Then - ' If DTConversations.Rows.Count >= 1 Then - - ' SplitContainerMain.Collapsed = False - ' Dim oConversations As List(Of String) - ' oConversations = ChatControl1.GetConversations(CURRENT_DOC_ID) - ' If oConversations.Count > 1 Then - ' RibbonPageGroupConv_Change.Visible = True - ' For Each oit As String In oConversations - ' ' Dim Coll As ComboBoxItemCollection = RepositoryItemComboBox3.Properties.Items - - ' BarEditItem2..Items.Add(oit) - ' Next - - - ' Else - ' RibbonPageGroupConv_Change.Visible = False - ' End If - ' Else - - ' End If - 'Else - ' SplitContainerMain.Collapsed = True - - 'End If - - Else - SplitContainer2_DV_Chat.Collapsed = True - End If - LOGGER.Debug("frmValidation_Load finished!") @@ -426,68 +360,8 @@ Public Class frmValidator End Try End Sub - Sub Conversations_Init_Rights() - RibbonPageConversations.Visible = True - bbtnitem_ConversationNew.Visibility = BarItemVisibility.Never - btnitemConversationEnd.Visibility = BarItemVisibility.Never - btnitemConversationEnd.Enabled = True - btnitemConversation_reload.Enabled = True - - For Each oRow As DataRow In DTDYNAMIC_RIGHTS.Rows - If oRow.Item("CONF_TITLE").ToString = "CONVERSATION_RIGHT" Then - Select Case oRow.Item("CONF_VALUE") - Case "Admin" - bbtnitem_ConversationNew.Visibility = BarItemVisibility.Always - btnitemConversationEnd.Visibility = BarItemVisibility.Always - Right_Conversation_Add = True - Right_Conversation_Stop = True - Case "Start" - bbtnitem_ConversationNew.Visibility = BarItemVisibility.Always - Right_Conversation_Add = True - Case "Stop" - btnitemConversationEnd.Visibility = BarItemVisibility.Always - Right_Conversation_Stop = True - Case "AddMessage" - Right_Conversation_Message = True - End Select - 'ElseIf oRow.Item("CONF_TITLE").ToString = "CONVERSATION_USER_ACTIVE" Then - ' Conversation_User_Active = True - End If - Next - - End Sub - Sub Conversations_load() - Dim oConversations As List(Of String) - oConversations = ChatControl1.GetConversations(CURRENT_DOC_ID) - RibbonPageGroupConv_Change.Visible = True - If oConversations.Count = 0 Then - RibbonPageGroupConv_Change.Visible = False - End If - RepositoryItemComboBox3.Items.Clear() - Dim oActiveConv As Boolean = False - RibbonPageGroupConv_Change.Visible = True - For Each oconv As String In oConversations - If Not oconv.Contains("Started") Then - RepositoryItemComboBox3.Items.Add(oconv) - End If - If oconv.Contains("Started") Then - oActiveConv = True - End If - Next - If oActiveConv = False Then - btnitemConversationEnd.Enabled = False - btnitemConversation_reload.Enabled = False - SplitContainer2_DV_Chat.Collapsed = True - Else - If SplitContainer2_DV_Chat.Panel2.Visible = False Then - SplitContainer2_DV_Chat.Panel2.Visible = True - End If - SplitContainer2_DV_Chat.Collapsed = False - End If - - End Sub Private Sub frmValidation_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Try me_closing = True @@ -1178,18 +1052,18 @@ Public Class frmValidator Sub Clear_all_Input() For Each inctrl As Control In Me.PanelValidatorControl.Controls Dim Type As String = inctrl.GetType.ToString - Select Case Type - Case "DevExpress.XtraEditors.TextEdit" + Select Case inctrl.GetType + Case GetType(DevExpress.XtraEditors.TextEdit) inctrl.Text = "" - Case "System.Windows.Forms.ComboBox" + Case GetType(System.Windows.Forms.ComboBox) Dim cmb As ComboBox = inctrl cmb.SelectedIndex = -1 - Case "System.Windows.Forms.DataGridView" + Case GetType(System.Windows.Forms.DataGridView) Dim dgv As DataGridView = inctrl If dgv.Rows.Count > 0 Then dgv.Rows.Clear() End If - Case "System.Windows.Forms.CheckBox" + Case GetType(System.Windows.Forms.CheckBox) End Select Next @@ -3130,7 +3004,6 @@ Public Class frmValidator Select form Where form.Item("GUID") = oControlId).Single() - Dim oType As String = oControl.GetType.ToString Dim oTyp As String = oControlRow.Item("CTRL_TYPE") Dim oIDBTyp As String If IDB_ACTIVE Then @@ -3145,8 +3018,8 @@ Public Class frmValidator Dim oLoadIndex As Boolean = oControlRow.Item("LOAD_IDX_VALUE") LOGGER.Debug("INDEX: " & oSourceIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & oLoadIndex.ToString) - Select Case oType - Case "DevExpress.XtraEditors.TextEdit" + Select Case oControl.GetType() + Case GetType(DevExpress.XtraEditors.TextEdit) Try oControlType = "Textbox" Dim oTextBox As TextEdit = oControl @@ -3252,7 +3125,7 @@ Public Class frmValidator Exit Sub End Try - Case "System.Windows.Forms.ComboBox" + Case GetType(System.Windows.Forms.ComboBox) oControlType = "ComboBox" Dim oMyCombobox As Windows.Forms.ComboBox = oControl Try @@ -3333,7 +3206,7 @@ Public Class frmValidator End Try - Case "DevExpress.XtraGrid.GridControl" + Case GetType(DevExpress.XtraGrid.GridControl) oControlType = "DevExpress.XtraGrid.GridControl" Dim oMyGridControl As GridControl = oControl Dim oDTColumnsPerDevExGrid As DataTable = DT_COLUMNS_GRID.Clone() @@ -3533,7 +3406,7 @@ Public Class frmValidator LOGGER.Error(ex) End Try End If - Case "System.Windows.Forms.CheckBox" + Case GetType(System.Windows.Forms.CheckBox) LOGGER.Debug("Loading checkbox...") oControlType = "CheckBox" If oSourceIndexName = "" Then @@ -3637,7 +3510,7 @@ Public Class frmValidator End If End If - Case "DigitalData.Controls.LookupGrid.LookupControl3" + Case GetType(DigitalData.Controls.LookupGrid.LookupControl3) Try Dim oLookup As LookupControl3 = oControl oValueFromSource = GetVariableValuefromSource(oSourceIndexName, oIDBTyp, oIDBOverride) @@ -3686,7 +3559,7 @@ Public Class frmValidator MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in Add LookupControl3:") End Try - Case "System.Windows.Forms.DateTimePicker" + Case GetType(System.Windows.Forms.DateTimePicker) oControlType = "DateTimePicker" Dim DTP As DateTimePicker = oControl If oSourceIndexName = "" Then @@ -3950,7 +3823,7 @@ Public Class frmValidator LOGGER.Debug("frmValidation_Shown finished!") End Sub - Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click + Private Sub btnSave_Click(sender As Object, e As EventArgs) btnSave.Enabled = False ' TODO: Use when working on Validation @@ -4298,9 +4171,8 @@ Public Class frmValidator If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = CTRL_ID Then '###### - Dim Type As String = oControl.GetType.ToString - Select Case Type - Case "DevExpress.XtraEditors.TextEdit" + Select Case oControl.GetType + Case GetType(DevExpress.XtraEditors.TextEdit) Try value_from_control = oControl.Text Catch ex As Exception @@ -4308,7 +4180,7 @@ Public Class frmValidator value_from_control = String.Empty End Try - Case "System.Windows.Forms.ComboBox" + Case GetType(System.Windows.Forms.ComboBox) Dim cmb As ComboBox = oControl Try value_from_control = cmb.Text @@ -4316,7 +4188,7 @@ Public Class frmValidator LOGGER.Error(ex) value_from_control = String.Empty End Try - Case "System.Windows.Forms.DateTimePicker" + Case GetType(System.Windows.Forms.DateTimePicker) Dim dtp As DateTimePicker = oControl Try value_from_control = dtp.Value.ToString @@ -4325,7 +4197,7 @@ Public Class frmValidator value_from_control = String.Empty End Try - Case "System.Windows.Forms.CheckBox" + Case GetType(System.Windows.Forms.CheckBox) Dim chk As CheckBox = oControl Try value_from_control = chk.Checked @@ -4595,9 +4467,8 @@ Public Class frmValidator LOGGER.Info(" >> Indexname is unexpected empty.") Continue For End If - Dim Type As String = oControl.GetType.ToString - Select Case Type - Case "DigitalData.Controls.LookupGrid.LookupControl3" + Select Case oControl.GetType + Case GetType(DigitalData.Controls.LookupGrid.LookupControl3) Try Dim lookup As LookupControl3 = oControl If lookup.Properties.SelectedValues.Count = 0 And oIsRequired = True Then @@ -4782,7 +4653,7 @@ Public Class frmValidator End Try - Case "DevExpress.XtraEditors.TextEdit" + Case GetType(DevExpress.XtraEditors.TextEdit) Try 'Dim oWrongInputMessage = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.WrongInputControl") Dim oWrongInputMessage = S.Falsche_Eingabe @@ -4904,7 +4775,7 @@ Public Class frmValidator Return False End Try - Case "System.Windows.Forms.ComboBox" + Case GetType(System.Windows.Forms.ComboBox) Try LOGGER.Debug($"Working on Combobox...") Dim cmb As Windows.Forms.ComboBox = oControl @@ -5021,7 +4892,7 @@ Public Class frmValidator Return False End Try - Case "System.Windows.Forms.DateTimePicker" + Case GetType(System.Windows.Forms.DateTimePicker) Try Dim dtp As DateTimePicker = oControl 'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss @@ -5095,7 +4966,7 @@ Public Class frmValidator LOGGER.Error(ex) End Try - Case "System.Windows.Forms.CheckBox" + Case GetType(System.Windows.Forms.CheckBox) Try Dim chk As CheckBox = oControl oMyInput = chk.Checked.ToString @@ -5191,7 +5062,7 @@ Public Class frmValidator LOGGER.Error(ex) End Try - Case "System.Windows.Forms.DataGridView" + Case GetType(System.Windows.Forms.DataGridView) Try Dim dgv As DataGridView = oControl @@ -5272,11 +5143,11 @@ Public Class frmValidator LOGGER.Error(ex) End Try - Case "DevExpress.XtraGrid.GridControl" + Case GetType(DevExpress.XtraGrid.GridControl) Dim oGrid As GridControl = oControl Dim oSettings = New ControlSettings() With { .IndexName = oIndexName, - .ControlType = Type, + .ControlType = GetType(DevExpress.XtraGrid.GridControl).ToString, .Name = oControlName, .IsRequired = oIsRequired, .IDBAttributeType = oIDBTyp @@ -5756,7 +5627,7 @@ Public Class frmValidator End If My.Settings.Save() End Sub - Private Sub btnSave_MouseHover(sender As Object, e As EventArgs) Handles btnSave.MouseHover + Private Sub btnSave_MouseHover(sender As Object, e As EventArgs) 'Dim oMsg = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("F2forSave") ToolTip1.Show(S.F2_für_Speichern, btnSave) End Sub @@ -5772,8 +5643,10 @@ Public Class frmValidator bsiInformation.Caption = infotext & " " & Now.ToString If pColor <> String.Empty Then bsiInformation.ItemAppearance.Normal.BackColor = Color.FromName(pColor) + bsiInformation.ItemAppearance.Normal.ForeColor = GraphicsEx.GetContrastedColor(Color.FromName(pColor)) Else bsiInformation.ItemAppearance.Normal.BackColor = Color.Transparent + bsiInformation.ItemAppearance.Normal.ForeColor = Color.Black End If End Sub @@ -5907,102 +5780,6 @@ Public Class frmValidator Dim Filename As String = String.Format($"DevExpressValidatorGridControl_{pProfilID}-{pControlID}.xml") Return System.IO.Path.Combine(CONFIG.UserConfigPath.Replace("UserConfig.xml", ""), Filename) End Function - Private Function Conversation_init() - Try - Dim oResult = ChatControl1.Init(LOGCONFIG, CONNECTION_STRING_IDB, IIf(CONV_IDENTIFICATION = "Email", USER_EMAIL, USER_USERNAME), USER_ID, USER_USERNAME, USER_LANGUAGE, ConversationQUDT_Delete, DTDYNAMIC_RIGHTS) - If oResult = True Then - Conversations_Init_Rights() - Conversations_load() - AddHandler ChatControl1.Conversation_Ended, AddressOf onConversationEnded - AddHandler ChatControl1.Conversation_UsersAdded_Success, AddressOf ConversationUsersAdded - End If - - Return oResult - Catch ex As Exception - Return False - End Try - - End Function - Private Sub bbtnitem_ConversationNew_ItemClick(sender As Object, e As ItemClickEventArgs) Handles bbtnitem_ConversationNew.ItemClick - Dim oDTUSER As DataTable - For Each oRow As DataRow In DTDYNAMIC_RIGHTS.Rows - If oRow.Item("CONF_TITLE") = "NEW_CONVERSATION_USER_SELECT" Then - Dim oSQL = oRow.Item("CONF_VALUE") - oDTUSER = DatabaseFallback.GetDatatableIDB(oSQL) - End If - Next - If Not IsNothing(oDTUSER) Then - CURRENT_CONVERSATION_NEW = 0 - Dim oForm As New frmChat_NewConversation(oDTUSER, Nothing) - Dim oResult = oForm.ShowDialog() - - If CURRENT_CONVERSATION_NEW <> 0 Then - If Not Conversation_initialized Then - Conversation_init() - End If - Conversations_Init_Rights() - Conversations_load() - End If - - End If - - - End Sub - - Private Sub bbtnitem_ConversationEnd_ItemClick(sender As Object, e As ItemClickEventArgs) Handles btnitemConversationEnd.ItemClick - If ChatControl1.CurrentConversationID <> 0 Then - Dim result As MsgBoxResult - result = MessageBox.Show(S.Wollen_Sie_die_Konversation_beenden_, Text, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) - If result = MsgBoxResult.Yes Then - Dim oSQL = $"EXEC PRIDB_END_CONVERSATION {ChatControl1.CurrentConversationID}, '{USER_USERNAME}', '{USER_LANGUAGE}'" - If DatabaseFallback.ExecuteNonQueryIDB(oSQL) = True Then - btnitemConversationEnd.Enabled = False - SplitContainer2_DV_Chat.Collapsed = True - btnitemConversationEnd.Enabled = True - Else - MsgBox("Unexpected error in PRIDB_END_CONVERSATION - Check Your log!", MsgBoxStyle.Exclamation) - End If - End If - End If - End Sub - - Private Sub BarEditItem3_ItemClick(sender As Object, e As ItemClickEventArgs) Handles BarEditItem3.ItemClick - Dim o = BarEditItem3.EditValue - End Sub - - Private Sub RepositoryItemComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RepositoryItemComboBox3.SelectedIndexChanged - Try - Dim cBox As DevExpress.XtraEditors.ComboBoxEdit = sender - Dim item = cBox.EditValue - Dim oSplit() = item.ToString.Split("|") - Dim oConvID = oSplit(0) - ChatControl1.LoadConversation(oConvID) - btnitemConversationEnd.Enabled = False - If SplitContainer2_DV_Chat.IsPanelCollapsed Then - SplitContainer2_DV_Chat.Collapsed = False - If SplitContainer2_DV_Chat.Panel2.Visible = False Then - SplitContainer2_DV_Chat.Panel2.Visible = True - End If - End If - Catch ex As Exception - MsgBox(ex.Message, MsgBoxStyle.Exclamation, ADDITIONAL_TITLE) - End Try - - End Sub - - Private Sub BarButtonItem5_ItemClick(sender As Object, e As ItemClickEventArgs) Handles btnitemConversation_reload.ItemClick - Conversations_Init_Rights() - Conversations_load() - End Sub - Sub onConversationEnded() - Conversations_load() - btnitemConversationEnd.Enabled = False - SplitContainer2_DV_Chat.Collapsed = True - btnitemConversation_reload.Enabled = False - End Sub - Sub ConversationUsersAdded() - Conversations_load() - End Sub Private Sub BarButtonItem5_ItemClick_1(sender As Object, e As ItemClickEventArgs) Handles BarButtonItem5.ItemClick MsgBox("Versioning not configured! (Reasons: RightManagement, Displaying)", MsgBoxStyle.Information) From 8dade7c29904db1d0367c43064076a201bc8b82f Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 1 Jun 2023 09:19:46 +0200 Subject: [PATCH 04/13] clean up --- app/SetupVS19/Product.wxs | 4 +- app/TaskFlow/Changelog.md | 8 +++ app/TaskFlow/TaskFlow.vbproj | 1 + app/TaskFlow/frmMain.Designer.vb | 7 ++- app/TaskFlow/frmMain.resx | 85 ++++++++++++++------------- app/TaskFlow/frmValidator.Designer.vb | 44 +++++++------- app/TaskFlow/frmValidator.vb | 6 +- 7 files changed, 82 insertions(+), 73 deletions(-) create mode 100644 app/TaskFlow/Changelog.md diff --git a/app/SetupVS19/Product.wxs b/app/SetupVS19/Product.wxs index ce7ea43..e5ed1dd 100644 --- a/app/SetupVS19/Product.wxs +++ b/app/SetupVS19/Product.wxs @@ -125,15 +125,13 @@ - + - - diff --git a/app/TaskFlow/Changelog.md b/app/TaskFlow/Changelog.md new file mode 100644 index 0000000..4a33952 --- /dev/null +++ b/app/TaskFlow/Changelog.md @@ -0,0 +1,8 @@ +# CHANGELOG + +## 2.5.0.0 + +### Features + +- Modernisierung von verschiedenen Elementen (Validator, Startseite) +- Format Strings für Textboxen (Währung, Fließkommazahlen, Datum & Uhrzeit) diff --git a/app/TaskFlow/TaskFlow.vbproj b/app/TaskFlow/TaskFlow.vbproj index f155a49..351f479 100644 --- a/app/TaskFlow/TaskFlow.vbproj +++ b/app/TaskFlow/TaskFlow.vbproj @@ -927,6 +927,7 @@ + PreserveNewest diff --git a/app/TaskFlow/frmMain.Designer.vb b/app/TaskFlow/frmMain.Designer.vb index 8dcc127..a7993d5 100644 --- a/app/TaskFlow/frmMain.Designer.vb +++ b/app/TaskFlow/frmMain.Designer.vb @@ -261,7 +261,9 @@ Partial Class frmMain ' Me.GridView_Docs.Appearance.EvenRow.BackColor = System.Drawing.Color.Azure Me.GridView_Docs.Appearance.EvenRow.Options.UseBackColor = True + Me.GridView_Docs.Appearance.ViewCaption.Font = CType(resources.GetObject("GridView_Docs.Appearance.ViewCaption.Font"), System.Drawing.Font) Me.GridView_Docs.Appearance.ViewCaption.ForeColor = System.Drawing.Color.Black + Me.GridView_Docs.Appearance.ViewCaption.Options.UseFont = True Me.GridView_Docs.Appearance.ViewCaption.Options.UseForeColor = True Me.GridView_Docs.Appearance.ViewCaption.Options.UseTextOptions = True Me.GridView_Docs.Appearance.ViewCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near @@ -293,12 +295,13 @@ Partial Class frmMain Me.NavBarControl1.Items.AddRange(New DevExpress.XtraNavBar.NavBarItem() {Me.NavBarItemOverview}) Me.NavBarControl1.Name = "NavBarControl1" Me.NavBarControl1.OptionsNavPane.ExpandedWidth = CType(resources.GetObject("resource.ExpandedWidth"), Integer) - Me.NavBarControl1.View = New DevExpress.XtraNavBar.ViewInfo.StandardSkinExplorerBarViewInfoRegistrator("DevExpress Style") + Me.NavBarControl1.PaintStyleKind = DevExpress.XtraNavBar.NavBarViewKind.NavigationPane + Me.NavBarControl1.ShowIcons = DevExpress.Utils.DefaultBoolean.[True] + Me.NavBarControl1.View = New DevExpress.XtraNavBar.ViewInfo.StandardSkinExplorerBarViewInfoRegistrator("Office 2019 White") ' 'NavBarGroupProfiles ' resources.ApplyResources(Me.NavBarGroupProfiles, "NavBarGroupProfiles") - Me.NavBarGroupProfiles.Expanded = True Me.NavBarGroupProfiles.GroupStyle = DevExpress.XtraNavBar.NavBarGroupStyle.LargeIconsText Me.NavBarGroupProfiles.ImageOptions.LargeImage = CType(resources.GetObject("NavBarGroupProfiles.ImageOptions.LargeImage"), System.Drawing.Image) Me.NavBarGroupProfiles.Name = "NavBarGroupProfiles" diff --git a/app/TaskFlow/frmMain.resx b/app/TaskFlow/frmMain.resx index bdf87bd..3a77050 100644 --- a/app/TaskFlow/frmMain.resx +++ b/app/TaskFlow/frmMain.resx @@ -124,46 +124,46 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADu - CAAAAk1TRnQBSQFMAgEBAgIAAQoBAAEKARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA - AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA - AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA - AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm - AwABmQMAAcwCAAEzAwACMwIAATMBZgIAATMBmQIAATMBzAIAATMB/wIAAWYDAAFmATMCAAJmAgABZgGZ - AgABZgHMAgABZgH/AgABmQMAAZkBMwIAAZkBZgIAApkCAAGZAcwCAAGZAf8CAAHMAwABzAEzAgABzAFm - AgABzAGZAgACzAIAAcwB/wIAAf8BZgIAAf8BmQIAAf8BzAEAATMB/wIAAf8BAAEzAQABMwEAAWYBAAEz - AQABmQEAATMBAAHMAQABMwEAAf8BAAH/ATMCAAMzAQACMwFmAQACMwGZAQACMwHMAQACMwH/AQABMwFm - AgABMwFmATMBAAEzAmYBAAEzAWYBmQEAATMBZgHMAQABMwFmAf8BAAEzAZkCAAEzAZkBMwEAATMBmQFm - AQABMwKZAQABMwGZAcwBAAEzAZkB/wEAATMBzAIAATMBzAEzAQABMwHMAWYBAAEzAcwBmQEAATMCzAEA - ATMBzAH/AQABMwH/ATMBAAEzAf8BZgEAATMB/wGZAQABMwH/AcwBAAEzAv8BAAFmAwABZgEAATMBAAFm - AQABZgEAAWYBAAGZAQABZgEAAcwBAAFmAQAB/wEAAWYBMwIAAWYCMwEAAWYBMwFmAQABZgEzAZkBAAFm - ATMBzAEAAWYBMwH/AQACZgIAAmYBMwEAA2YBAAJmAZkBAAJmAcwBAAFmAZkCAAFmAZkBMwEAAWYBmQFm - AQABZgKZAQABZgGZAcwBAAFmAZkB/wEAAWYBzAIAAWYBzAEzAQABZgHMAZkBAAFmAswBAAFmAcwB/wEA - AWYB/wIAAWYB/wEzAQABZgH/AZkBAAFmAf8BzAEAAcwBAAH/AQAB/wEAAcwBAAKZAgABmQEzAZkBAAGZ - AQABmQEAAZkBAAHMAQABmQMAAZkCMwEAAZkBAAFmAQABmQEzAcwBAAGZAQAB/wEAAZkBZgIAAZkBZgEz - AQABmQEzAWYBAAGZAWYBmQEAAZkBZgHMAQABmQEzAf8BAAKZATMBAAKZAWYBAAOZAQACmQHMAQACmQH/ - AQABmQHMAgABmQHMATMBAAFmAcwBZgEAAZkBzAGZAQABmQLMAQABmQHMAf8BAAGZAf8CAAGZAf8BMwEA - AZkBzAFmAQABmQH/AZkBAAGZAf8BzAEAAZkC/wEAAcwDAAGZAQABMwEAAcwBAAFmAQABzAEAAZkBAAHM - AQABzAEAAZkBMwIAAcwCMwEAAcwBMwFmAQABzAEzAZkBAAHMATMBzAEAAcwBMwH/AQABzAFmAgABzAFm - ATMBAAGZAmYBAAHMAWYBmQEAAcwBZgHMAQABmQFmAf8BAAHMAZkCAAHMAZkBMwEAAcwBmQFmAQABzAKZ - AQABzAGZAcwBAAHMAZkB/wEAAswCAALMATMBAALMAWYBAALMAZkBAAPMAQACzAH/AQABzAH/AgABzAH/ - ATMBAAGZAf8BZgEAAcwB/wGZAQABzAH/AcwBAAHMAv8BAAHMAQABMwEAAf8BAAFmAQAB/wEAAZkBAAHM - ATMCAAH/AjMBAAH/ATMBZgEAAf8BMwGZAQAB/wEzAcwBAAH/ATMB/wEAAf8BZgIAAf8BZgEzAQABzAJm - AQAB/wFmAZkBAAH/AWYBzAEAAcwBZgH/AQAB/wGZAgAB/wGZATMBAAH/AZkBZgEAAf8CmQEAAf8BmQHM - AQAB/wGZAf8BAAH/AcwCAAH/AcwBMwEAAf8BzAFmAQAB/wHMAZkBAAH/AswBAAH/AcwB/wEAAv8BMwEA - AcwB/wFmAQAC/wGZAQAC/wHMAQACZgH/AQABZgH/AWYBAAFmAv8BAAH/AmYBAAH/AWYB/wEAAv8BZgEA - ASEBAAGlAQADXwEAA3cBAAOGAQADlgEAA8sBAAOyAQAD1wEAA90BAAPjAQAD6gEAA/EBAAP4AQAB8AH7 - Af8BAAGkAqABAAOAAwAB/wIAAf8DAAL/AQAB/wMAAf8BAAH/AQAC/wIAA/9GAAEIBHIBCAoAARoBHAJ0 - ARwBGikAAXIBVQFaAlsBWgFVAU8IAAF0AXkBegLlAXoBeQF0JwACVQFaAVsC5AFbAVoCVQYAAXQCegTl - AXoBeQFSJQABTwFVAloEWwFaAlUBTwQAAVIBWQF6BuUBegJSIwABCAJVCFoCVQEIAgABGgFSAVkBegbl - AVkBWAFSARoiAAFPAlUHWgNVAU8CAAFMAVIKWQFSAUwiAAFPATQKVQE0AS4CAAFMAVIBUwhZAVMBUgFM - IgABLQMzBzQCMwEtAgACKwIyBlMCMgIrIgABTwEtATMIVQE0Ai0CAAFMAisIUwFSAisiAAEIAS0BVQiX - AVUBLQEIAgABGgErAVIIdQFSASsBGiMAAQIBlwiYAZcBLQQAASoBdAiaAXQBKyUAAU8BCAEbBcIB8QFP - BgABTAEaARsEGgEbARoBUicAAU8BCAHzAv8B8wEIAXIIAAFMARoE9gEaAXQpAAEIBHIBCAoAARoEdAEa - ZQABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD/wEABP8EAAH4AR8B+AEfBAAB8AEP - AfABDwQAAeABBwHgAQcEAAHAAQMBwAEDBAABgAEBAYABAQQAAYABAQGAAQEEAAGAAQEBgAEBBAABgAEB - AYABAQQAAYABAQGAAQEEAAGAAQEBgAEBBAABwAEDAcABAwQAAeABBwHgAQcEAAHwAQ8B8AEPBAAB+AEf - AfgBHwQABP8EAAs= + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw + CAAAAk1TRnQBSQFMAgEBAgEAARgBCgEYAQoBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA + AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 + AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA + AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm + AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM + AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA + ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz + AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ + AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM + AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA + AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA + AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ + AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/ + AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA + AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm + ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ + Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz + AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA + AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM + AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM + ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM + Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA + AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM + AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ + AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz + AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm + AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw + AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/0YAAQgEcgEICgABGgEc + AnQBHAEaKQABcgFVAVoCWwFaAVUBTwgAAXQBeQF6AuUBegF5AXQnAAJVAVoBWwLkAVsBWgJVBgABdAJ6 + BOUBegF5AVIlAAFPAVUCWgRbAVoCVQFPBAABUgFZAXoG5QF6AlIjAAEIAlUIWgJVAQgCAAEaAVIBWQF6 + BuUBWQFYAVIBGiIAAU8CVQdaA1UBTwIAAUwBUgpZAVIBTCIAAU8BNApVATQBLgIAAUwBUgFTCFkBUwFS + AUwiAAEtAzMHNAIzAS0CAAIrAjIGUwIyAisiAAFPAS0BMwhVATQCLQIAAUwCKwhTAVICKyIAAQgBLQFV + CJcBVQEtAQgCAAEaASsBUgh1AVIBKwEaIwABAgGXCJgBlwEtBAABKgF0CJoBdAErJQABTwEIARsFwgHx + AU8GAAFMARoBGwQaARsBGgFSJwABTwEIAfMC/wHzAQgBcggAAUwBGgT2ARoBdCkAAQgEcgEICgABGgR0 + ARplAAFCAU0BPgcAAT4DAAEoAwABQAMAARADAAEBAQABAQUAAYAXAAP/AQAE/wQAAfgBHwH4AR8EAAHw + AQ8B8AEPBAAB4AEHAeABBwQAAcABAwHAAQMEAAGAAQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEEAAGA + AQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEEAAHAAQMBwAEDBAAB4AEHAeABBwQAAfABDwHwAQ8EAAH4 + AR8B+AEfBAAE/wQACw== @@ -204,6 +204,9 @@ 233, 0 + + Segoe UI, 12pt + Gesamtübersicht Workflows @@ -501,7 +504,7 @@ Out of Range - Fenster wiederherstellen - 283, 98 + 283, 76 ContextMenuNotifyIcon diff --git a/app/TaskFlow/frmValidator.Designer.vb b/app/TaskFlow/frmValidator.Designer.vb index 8e5bbd0..562bfcb 100644 --- a/app/TaskFlow/frmValidator.Designer.vb +++ b/app/TaskFlow/frmValidator.Designer.vb @@ -26,6 +26,8 @@ Partial Class frmValidator Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmValidator)) Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl() + Me.PanelValidatorControlBorder = New DevExpress.XtraEditors.PanelControl() + Me.PanelValidatorControl = New DevExpress.XtraEditors.XtraScrollableControl() Me.btnSave = New DevExpress.XtraEditors.SimpleButton() Me.DESCRIPTIONLabel = New DevExpress.XtraEditors.LabelControl() Me.TITLELabel1 = New DevExpress.XtraEditors.LabelControl() @@ -103,14 +105,14 @@ Partial Class frmValidator Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog() - Me.PanelValidatorControl = New DevExpress.XtraEditors.XtraScrollableControl() - Me.PanelValidatorControlBorder = New DevExpress.XtraEditors.PanelControl() CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainer1.Panel1.SuspendLayout() Me.SplitContainer1.Panel2.SuspendLayout() Me.SplitContainer1.SuspendLayout() CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.PanelControl1.SuspendLayout() + CType(Me.PanelValidatorControlBorder, System.ComponentModel.ISupportInitialize).BeginInit() + Me.PanelValidatorControlBorder.SuspendLayout() CType(Me.BarAndDockingController3, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.BarAndDockingController2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.BarAndDockingController1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -121,8 +123,6 @@ Partial Class frmValidator CType(Me.RepositoryItemComboBox1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemComboBox2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemComboBox3, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.PanelValidatorControlBorder, System.ComponentModel.ISupportInitialize).BeginInit() - Me.PanelValidatorControlBorder.SuspendLayout() Me.SuspendLayout() ' 'SplitContainer1 @@ -148,6 +148,22 @@ Partial Class frmValidator resources.ApplyResources(Me.PanelControl1, "PanelControl1") Me.PanelControl1.Name = "PanelControl1" ' + 'PanelValidatorControlBorder + ' + resources.ApplyResources(Me.PanelValidatorControlBorder, "PanelValidatorControlBorder") + Me.PanelValidatorControlBorder.Appearance.BorderColor = System.Drawing.Color.Black + Me.PanelValidatorControlBorder.Appearance.Options.UseBorderColor = True + Me.PanelValidatorControlBorder.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple + Me.PanelValidatorControlBorder.Controls.Add(Me.PanelValidatorControl) + Me.PanelValidatorControlBorder.Name = "PanelValidatorControlBorder" + ' + 'PanelValidatorControl + ' + Me.PanelValidatorControl.Appearance.BackColor = System.Drawing.Color.WhiteSmoke + Me.PanelValidatorControl.Appearance.Options.UseBackColor = True + resources.ApplyResources(Me.PanelValidatorControl, "PanelValidatorControl") + Me.PanelValidatorControl.Name = "PanelValidatorControl" + ' 'btnSave ' resources.ApplyResources(Me.btnSave, "btnSave") @@ -743,22 +759,6 @@ Partial Class frmValidator Me.RibbonPage2.Name = "RibbonPage2" resources.ApplyResources(Me.RibbonPage2, "RibbonPage2") ' - 'PanelValidatorControl - ' - Me.PanelValidatorControl.Appearance.BackColor = System.Drawing.Color.WhiteSmoke - Me.PanelValidatorControl.Appearance.Options.UseBackColor = True - resources.ApplyResources(Me.PanelValidatorControl, "PanelValidatorControl") - Me.PanelValidatorControl.Name = "PanelValidatorControl" - ' - 'PanelValidatorControlBorder - ' - resources.ApplyResources(Me.PanelValidatorControlBorder, "PanelValidatorControlBorder") - Me.PanelValidatorControlBorder.Appearance.BorderColor = System.Drawing.Color.Black - Me.PanelValidatorControlBorder.Appearance.Options.UseBorderColor = True - Me.PanelValidatorControlBorder.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple - Me.PanelValidatorControlBorder.Controls.Add(Me.PanelValidatorControl) - Me.PanelValidatorControlBorder.Name = "PanelValidatorControlBorder" - ' 'frmValidator ' Me.Appearance.Options.UseFont = True @@ -783,6 +783,8 @@ Partial Class frmValidator Me.SplitContainer1.ResumeLayout(False) CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.PanelControl1.ResumeLayout(False) + CType(Me.PanelValidatorControlBorder, System.ComponentModel.ISupportInitialize).EndInit() + Me.PanelValidatorControlBorder.ResumeLayout(False) CType(Me.BarAndDockingController3, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.BarAndDockingController2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.BarAndDockingController1, System.ComponentModel.ISupportInitialize).EndInit() @@ -793,8 +795,6 @@ Partial Class frmValidator CType(Me.RepositoryItemComboBox1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemComboBox2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemComboBox3, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.PanelValidatorControlBorder, System.ComponentModel.ISupportInitialize).EndInit() - Me.PanelValidatorControlBorder.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index 3a57176..9530449 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -3823,7 +3823,7 @@ Public Class frmValidator LOGGER.Debug("frmValidation_Shown finished!") End Sub - Private Sub btnSave_Click(sender As Object, e As EventArgs) + Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click btnSave.Enabled = False ' TODO: Use when working on Validation @@ -5883,8 +5883,4 @@ Public Class frmValidator End Using Return tmpImg End Function - - Private Sub BarButtonItem6_ItemClick_2(sender As Object, e As ItemClickEventArgs) Handles BarButtonItem6.ItemClick - - End Sub End Class \ No newline at end of file From e44a42faea47c96312084b0ee1577ed713bfd371 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 2 Jun 2023 10:47:24 +0200 Subject: [PATCH 05/13] Clean up, fix missing TextEdit --- app/TaskFlow/ClassControlCreator.vb | 97 ++++++++-------- app/TaskFlow/ClassFormat.vb | 78 ------------- app/TaskFlow/ClassIDBData.vb | 1 - app/TaskFlow/clsPatterns.vb | 7 +- app/TaskFlow/frmAdministration.vb | 26 ++--- app/TaskFlow/frmFormDesigner.vb | 43 ++++---- app/TaskFlow/frmMassValidator.vb | 64 ++++------- app/TaskFlow/frmValidator.vb | 164 +++++++++++----------------- 8 files changed, 177 insertions(+), 303 deletions(-) diff --git a/app/TaskFlow/ClassControlCreator.vb b/app/TaskFlow/ClassControlCreator.vb index edeacf6..92e5ac8 100644 --- a/app/TaskFlow/ClassControlCreator.vb +++ b/app/TaskFlow/ClassControlCreator.vb @@ -64,13 +64,14 @@ Public Class ClassControlCreator Public Const CONTROL_TYPE_DATETIME = "DATETIME" - Public Shared Property Logger As Logger + Public ReadOnly Property Logger As Logger + Public ReadOnly Property LogConfig As LogConfig ''' ''' Saves the column data for each grid and each column in that grid ''' - Public Shared Property GridTables As New Dictionary(Of Integer, Dictionary(Of String, RepositoryItem)) - Public Shared Property GridColumns As New Dictionary(Of Integer, DataTable) + Public Property GridTables As New Dictionary(Of Integer, Dictionary(Of String, RepositoryItem)) + Public Property GridColumns As New Dictionary(Of Integer, DataTable) ''' ''' Standard Eigenschaften für alle Controls @@ -91,7 +92,12 @@ Public Class ClassControlCreator Public BackColor As Color = Color.White End Class - Private Shared Function TransformDataRow(row As DataRow) As ControlDBProps + Public Sub New(pLogConfig As LogConfig) + LogConfig = pLogConfig + Logger = pLogConfig.GetLogger() + End Sub + + Private Function TransformDataRow(row As DataRow) As ControlDBProps Dim x As Integer = row.Item("X_LOC") Dim y As Integer = row.Item("Y_LOC") Dim style As FontStyle = NotNull(row.Item("FONT_STYLE"), DEFAULT_FONT_STYLE) @@ -116,7 +122,7 @@ Public Class ClassControlCreator } End Function - Public Shared Function CreateBaseControl(ctrl As Control, OControlRow As DataRow, designMode As Boolean) As Control + Public Function CreateBaseControl(ctrl As Control, OControlRow As DataRow, designMode As Boolean) As Control Try Dim props As ControlDBProps = TransformDataRow(OControlRow) @@ -149,7 +155,7 @@ Public Class ClassControlCreator ' ----------------------- NEW CONTROLS ----------------------- - 'Public Shared Function CreateNewTextBox(location As Point) As TextBox + 'Public Function CreateNewTextBox(location As Point) As TextBox ' Dim control As New TextBox With { ' .Name = $"{PREFIX_TEXTBOX}_{clsTools.ShortGuid()}", ' .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT), @@ -162,7 +168,7 @@ Public Class ClassControlCreator ' Return control 'End Function - Public Shared Function CreateNewTextBox(location As Point) As TextEdit + Public Function CreateNewTextBox(location As Point) As TextEdit Dim control As New TextEdit With { .Name = $"{PREFIX_TEXTBOX}_{clsTools.ShortGuid()}", .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT), @@ -175,7 +181,7 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateNewLabel(location As Point) As Label + Public Function CreateNewLabel(location As Point) As Label Dim control As New Label With { .Name = $"{PREFIX_LABEL}_{clsTools.ShortGuid}", .Text = DEFAULT_TEXT, @@ -187,7 +193,7 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateNewCheckbox(location As Point) As CheckBox + Public Function CreateNewCheckbox(location As Point) As CheckBox Dim control As New CheckBox With { .Name = $"{PREFIX_CHECKBOX}_{clsTools.ShortGuid}", .AutoSize = True, @@ -200,8 +206,8 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateNewCombobox(location As Point) As ComboBox - Dim control As New ComboBox With { + Public Function CreateNewCombobox(location As Point) As Windows.Forms.ComboBox + Dim control As New Windows.Forms.ComboBox With { .Name = $"{PREFIX_COMBOBOX}_{clsTools.ShortGuid}", .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT), .Cursor = Cursors.Hand, @@ -211,7 +217,7 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateNewDatetimepicker(location As Point) As DateTimePicker + Public Function CreateNewDatetimepicker(location As Point) As DateTimePicker Dim control As New DateTimePicker With { .Name = $"{PREFIX_DATETIMEPICKER}_{clsTools.ShortGuid}", .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT), @@ -223,7 +229,7 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateNewDatagridview(location As Point) As DataGridView + Public Function CreateNewDatagridview(location As Point) As DataGridView Dim control As New DataGridView With { .Name = $"{PREFIX_DATAGRIDVIEW}_{clsTools.ShortGuid}", .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT_TABLE), @@ -243,7 +249,7 @@ Public Class ClassControlCreator Return control End Function - Friend Shared Function CreateNewLookupControl(location As Point) As LookupControl3 + Friend Function CreateNewLookupControl(location As Point) As LookupControl3 Dim control As New LookupControl3 With { .Name = $"{PREFIX_LOOKUP}_{clsTools.ShortGuid}", .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT), @@ -253,7 +259,7 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateNewTable(location As Point) As GridControl + Public Function CreateNewTable(location As Point) As GridControl Dim oControl As New GridControl With { .Name = $"{PREFIX_TABLE}_{clsTools.ShortGuid}", .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT_TABLE), @@ -273,7 +279,7 @@ Public Class ClassControlCreator Return oControl End Function - Public Shared Function CreateNewLine(location As Point) As LineLabel + Public Function CreateNewLine(location As Point) As LineLabel Dim control As New LineLabel With { .Name = $"{PREFIX_LINE}_{clsTools.ShortGuid}", .Text = "---------------------------------", @@ -283,7 +289,7 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateNewButton(location As Point) As Button + Public Function CreateNewButton(location As Point) As Button Dim control As New Button With { .Name = $"{PREFIX_BUTTON}_{clsTools.ShortGuid}", .Size = New Size(108, 28), @@ -296,7 +302,7 @@ Public Class ClassControlCreator ' ----------------------- EXISITING CONTROLS ----------------------- - 'Public Shared Function CreateExistingTextbox(oControlRow As DataRow, designMode As Boolean) As TextBox + 'Public Function CreateExistingTextbox(oControlRow As DataRow, designMode As Boolean) As TextBox ' Try ' Dim control As TextBox = CreateBaseControl(New TextBox(), oControlRow, designMode) @@ -327,7 +333,7 @@ Public Class ClassControlCreator 'End Function - Public Shared Function CreateExistingTextbox(oControlRow As DataRow, designMode As Boolean) As BaseEdit + Public Function CreateExistingTextbox(oControlRow As DataRow, designMode As Boolean) As BaseEdit Try Dim oHeight = oControlRow.ItemEx("HEIGHT", 0) Dim oWidth = oControlRow.ItemEx("WIDTH", 0) @@ -388,7 +394,7 @@ Public Class ClassControlCreator End Try End Function - Public Shared Function CreateExistingLabel(row As DataRow, designMode As Boolean) As Label + Public Function CreateExistingLabel(row As DataRow, designMode As Boolean) As Label Dim control As Label = CreateBaseControl(New Label(), row, designMode) Try control.Text = row.Item("CTRL_CAPTION_LANG") @@ -401,7 +407,7 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateExistingButton(row As DataRow, designMode As Boolean) As Button + Public Function CreateExistingButton(row As DataRow, designMode As Boolean) As Button Dim oControl As Button = CreateBaseControl(New Button(), row, designMode) Dim ctrl_image As Bitmap = Nothing @@ -430,7 +436,7 @@ Public Class ClassControlCreator Return oControl End Function - Public Shared Function CreateExistingCombobox(row As DataRow, designMode As Boolean) As Windows.Forms.ComboBox + Public Function CreateExistingCombobox(row As DataRow, designMode As Boolean) As Windows.Forms.ComboBox Dim control As Windows.Forms.ComboBox = CreateBaseControl(New Windows.Forms.ComboBox(), row, designMode) control.Size = New Size(row.Item("WIDTH"), row.Item("HEIGHT")) @@ -447,7 +453,7 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateExistingDatepicker(row As DataRow, designMode As Boolean) As DateTimePicker + Public Function CreateExistingDatepicker(row As DataRow, designMode As Boolean) As DateTimePicker Dim control As DateTimePicker = CreateBaseControl(New DateTimePicker(), row, designMode) control.Size = New Size(row.Item("WIDTH"), row.Item("HEIGHT")) @@ -461,7 +467,7 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateExisingCheckbox(row As DataRow, designMode As Boolean) As CheckBox + Public Function CreateExisingCheckbox(row As DataRow, designMode As Boolean) As CheckBox Dim oCheckBox As CheckBox = CreateBaseControl(New CheckBox(), row, designMode) oCheckBox.AutoSize = True @@ -480,7 +486,7 @@ Public Class ClassControlCreator Return oCheckBox End Function - Public Shared Function CreateExistingDataGridView(row As DataRow, designMode As Boolean) As DataGridView + Public Function CreateExistingDataGridView(row As DataRow, designMode As Boolean) As DataGridView Dim control As DataGridView = CreateBaseControl(New DataGridView(), row, designMode) control.Size = New Size(row.Item("WIDTH"), row.Item("HEIGHT")) @@ -504,7 +510,7 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateExistingLookupControl(row As DataRow, designMode As Boolean) As LookupControl3 + Public Function CreateExistingLookupControl(row As DataRow, designMode As Boolean) As LookupControl3 Dim control As LookupControl3 = CreateBaseControl(New LookupControl3(), row, designMode) control.Properties.Name = control.Name control.Width = row.Item("WIDTH") @@ -517,7 +523,7 @@ Public Class ClassControlCreator Return control End Function - Public Shared Function CreateExistingGridControl(row As DataRow, DT_MY_COLUMNS As DataTable, designMode As Boolean) As GridControl + Public Function CreateExistingGridControl(row As DataRow, DT_MY_COLUMNS As DataTable, designMode As Boolean) As GridControl Dim oControl As GridControl = CreateBaseControl(New GridControl(), row, designMode) Dim oControlId = DirectCast(oControl.Tag, ControlMetadata).Guid Dim oDatatable As New DataTable @@ -830,9 +836,9 @@ Public Class ClassControlCreator Return oControl End Function - Private Shared newRowModified As Boolean = False + Private newRowModified As Boolean = False - Private Shared Sub View_ShowingEditor(sender As Object, e As CancelEventArgs) + Private Sub View_ShowingEditor(sender As Object, e As CancelEventArgs) Dim view As GridView = TryCast(sender, GridView) Logger.Debug("Showing editor.") If view.IsNewItemRow(view.FocusedRowHandle) AndAlso Not newRowModified Then @@ -841,7 +847,7 @@ Public Class ClassControlCreator End If End Sub - Private Shared Sub View_ShownEditor(sender As Object, e As EventArgs) + Private Sub View_ShownEditor(sender As Object, e As EventArgs) Dim view As GridView = TryCast(sender, GridView) If view.IsNewItemRow(view.FocusedRowHandle) Then Logger.Debug("Attaching Modified Handler.") @@ -852,7 +858,7 @@ Public Class ClassControlCreator End If End Sub - Private Shared Sub View_ValidateRow(sender As Object, e As ValidateRowEventArgs) + Private Sub View_ValidateRow(sender As Object, e As ValidateRowEventArgs) Dim view As GridView = TryCast(sender, GridView) If view.IsNewItemRow(e.RowHandle) AndAlso Not newRowModified Then Logger.Debug("Deleting unused row") @@ -863,7 +869,7 @@ Public Class ClassControlCreator newRowModified = False End Sub - Private Shared Sub View_ValidatingEditor(sender As Object, e As BaseContainerValidateEditorEventArgs) + Private Sub View_ValidatingEditor(sender As Object, e As BaseContainerValidateEditorEventArgs) Dim oValue As String = NotNull(e.Value, "") If oValue.Contains(" | ") Then @@ -872,11 +878,11 @@ Public Class ClassControlCreator End If End Sub - Private Shared Sub View_InvalidRowException(sender As Object, e As InvalidRowExceptionEventArgs) + Private Sub View_InvalidRowException(sender As Object, e As InvalidRowExceptionEventArgs) e.ExceptionMode = ExceptionMode.NoAction End Sub - Public Shared Function CreateExistingLine(row As DataRow, designMode As Boolean) As LineLabel + Public Function CreateExistingLine(row As DataRow, designMode As Boolean) As LineLabel Dim control As LineLabel = CreateBaseControl(New LineLabel(), row, designMode) control.Text = "------------------------------" control.BorderStyle = BorderStyle.None @@ -904,7 +910,7 @@ Public Class ClassControlCreator End Sub End Class - Public Shared Function GET_CONTROL_PROPERTIES(DT_CONTROL As DataTable, ControlName As String) + Public Function GET_CONTROL_PROPERTIES(DT_CONTROL As DataTable, ControlName As String) Try CURRENT_CONTROL_ID = 0 CURR_CON_ID = 0 @@ -938,7 +944,7 @@ Public Class ClassControlCreator End Try End Function - Public Shared Function GET_CONTROL_PROPERTY(DT_CONTROL As DataTable, ControlGUID As Integer, ColNAME As String) + Public Function GET_CONTROL_PROPERTY(DT_CONTROL As DataTable, ControlGUID As Integer, ColNAME As String) Try CURRENT_CONTROL_ID = 0 CURR_CON_ID = 0 @@ -965,7 +971,8 @@ Public Class ClassControlCreator End Try End Function - Public Shared Function GET_DEPENDING_CONTROLS(DT_CONTROLS As DataTable, ControlName As String) + + Public Function GetDependingControls(DT_CONTROLS As DataTable, ControlName As String) As Boolean Try Dim dt As New DataTable dt = DT_CONTROLS @@ -981,13 +988,12 @@ Public Class ClassControlCreator Catch ex As Exception Logger.Error(ex) Logger.Info("Unexpected Error in GET_DEPENDING_CONTROLS (" & ControlName & "):" & ex.Message) - Return 0 + Return False End Try End Function - Public Shared Function GET_CONNECTION_INFO(CON_ID As Integer) + Public Function GET_CONNECTION_INFO(CON_ID As Integer) As DataRow() Try - Dim dt As New DataTable dt = BASEDATA_DT_TBDD_CONNECTION ' Define the filter @@ -1004,10 +1010,9 @@ Public Class ClassControlCreator Logger.Info("Unexpected Error in GET_CONNECTION_INFO (" & CON_ID.ToString & "):" & ex.Message) Return Nothing End Try - End Function - Public Shared Sub GridTables_CacheDatatableForColumn(pControlId As Object, pColumnName As Object, pSqlStatement As Object, pConnectionId As Integer, pAdvancedLookup As Boolean) + Public Sub GridTables_CacheDatatableForColumn(pControlId As Object, pColumnName As Object, pSqlStatement As Object, pConnectionId As Integer, pAdvancedLookup As Boolean) Try 'Dim oTable As DataTable = ClassDatabase.Return_Datatable_ConId(pSqlStatement, pConnectionId) Dim oTable As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(pSqlStatement, DatabaseType.ECM) With { @@ -1032,7 +1037,7 @@ Public Class ClassControlCreator End Try End Sub - Public Shared Function GridTables_GetRepositoryItemForColumn(pColumnName As String, pDataTable As DataTable, pIsAdvancedLookup As Boolean) As RepositoryItem + Public Function GridTables_GetRepositoryItemForColumn(pColumnName As String, pDataTable As DataTable, pIsAdvancedLookup As Boolean) As RepositoryItem If pIsAdvancedLookup Then Dim oEditor = New RepositoryItemLookupControl3 @@ -1075,7 +1080,7 @@ Public Class ClassControlCreator End If End Function - Public Shared Sub GridTables_HandleControlValueChange(pControlPanel As XtraScrollableControl, pColumnsWithSqlAndControlPlaceholders As DataTable) + Public Sub GridTables_HandleControlValueChange(pControlPanel As XtraScrollableControl, pColumnsWithSqlAndControlPlaceholders As DataTable) If Not IsNothing(pColumnsWithSqlAndControlPlaceholders) AndAlso pColumnsWithSqlAndControlPlaceholders.Rows.Count > 0 Then For Each oRow As DataRow In pColumnsWithSqlAndControlPlaceholders.Rows Try @@ -1117,7 +1122,7 @@ Public Class ClassControlCreator End If End Sub - Private Shared Function GridTables_TestEditorExistsByControlAndColumn(oControlId As Integer, pColumn As String) As Boolean + Private Function GridTables_TestEditorExistsByControlAndColumn(oControlId As Integer, pColumn As String) As Boolean If GridTables.ContainsKey(oControlId) Then Dim oContainsKey = GridTables.Item(oControlId).ContainsKey(pColumn) If oContainsKey AndAlso GridTables.Item(oControlId).Item(pColumn) IsNot Nothing Then @@ -1130,7 +1135,7 @@ Public Class ClassControlCreator End If End Function - Private Shared Function GridTables_ValidateColumn(pView As GridView, pColumnDefinition As DataTable, ColumnName As String, pValue As Object, ByRef pIsValid As Boolean, ByRef pErrorText As String) As Boolean + Private Function GridTables_ValidateColumn(pView As GridView, pColumnDefinition As DataTable, ColumnName As String, pValue As Object, ByRef pIsValid As Boolean, ByRef pErrorText As String) As Boolean Dim oColumn As DataRow = (From r As DataRow In pColumnDefinition.Rows Where r.Item("SPALTENNAME") = ColumnName Select r).FirstOrDefault() diff --git a/app/TaskFlow/ClassFormat.vb b/app/TaskFlow/ClassFormat.vb index be528ba..5b84ce4 100644 --- a/app/TaskFlow/ClassFormat.vb +++ b/app/TaskFlow/ClassFormat.vb @@ -29,84 +29,6 @@ Public Class ClassFormat End Select End Function - Public Shared Function GetFormattedValue(pControlName As String, pValueObject As Object, pFormatString As String) As String - Try - If pFormatString <> String.Empty Then - ' https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tostring?view=net-7.0#system-datetime-tostring(system-string) - - Select Case pFormatString - Case ClassControlCreator.CONTROL_TYPE_CURRENCY ' 16,325.63 € - If TypeOf pValueObject Is Double Then - Dim oFormattedValue As Double = pValueObject - Return oFormattedValue.ToString(CURRENCY_FORMAT) - - ElseIf TypeOf pValueObject Is String Then - Dim oFormattedValue As Double - Double.TryParse(pValueObject, oFormattedValue) - Return oFormattedValue.ToString(CURRENCY_FORMAT) - - Else - Return Nothing - - End If - - Case ClassControlCreator.CONTROL_TYPE_DOUBLE ' 16325,63 - If TypeOf pValueObject Is Double Then - Dim oFormattedValue As Double = pValueObject - Return oFormattedValue.ToString(DECIMAL_FORMAT) - - ElseIf TypeOf pValueObject Is String Then - Dim oFormattedValue As Double - Double.TryParse(pValueObject, oFormattedValue) - Return oFormattedValue.ToString(DECIMAL_FORMAT) - - Else - Return Nothing - End If - - Case ClassControlCreator.CONTROL_TYPE_DATE ' 15.06.2008 - Dim oFormattedValue As DateTime - - If TypeOf pValueObject Is DateTime Then - oFormattedValue = pValueObject - Return oFormattedValue.ToString(DATE_FORMAT) - - ElseIf TypeOf pValueObject Is String Then - DateTime.TryParse(pValueObject, oFormattedValue) - Return oFormattedValue.ToString(DATE_FORMAT) - - Else - Return Nothing - End If - - Case ClassControlCreator.CONTROL_TYPE_DATETIME ' 15.06.2008 9:15:07 - Dim oFormattedValue As DateTime - - If TypeOf pValueObject Is DateTime Then - oFormattedValue = pValueObject - Return oFormattedValue.ToString(DATETIME_FORMAT) - ElseIf TypeOf pValueObject Is String Then - DateTime.TryParse(pValueObject, oFormattedValue) - Return oFormattedValue.ToString(DATETIME_FORMAT) - Else - Return Nothing - End If - - Case Else ' Unknown Format String - LOGGER.Warn("Format String [{0}] for Control [{1}] is not valid!", pFormatString, pControlName) - Return Nothing - - End Select - Else - Return Nothing - End If - Catch ex As Exception - LOGGER.Warn($"Unexpected error while formatting Value for Control [{0}]", pControlName) - LOGGER.Error(ex) - Return Nothing - End Try - End Function - ''' ''' Converts a string according to the type information, using the invariant culture ''' diff --git a/app/TaskFlow/ClassIDBData.vb b/app/TaskFlow/ClassIDBData.vb index 9bcc9a4..51c5742 100644 --- a/app/TaskFlow/ClassIDBData.vb +++ b/app/TaskFlow/ClassIDBData.vb @@ -133,7 +133,6 @@ End Function Public Function Delete_Term_Object_From_Metadata(oAttributeName As String, oTerm2Delete As String) As Object Try - Dim oAttributeValue Dim oID_IS_FOREIGN As Integer oID_IS_FOREIGN = 0 If IDB_USES_WMFILESTORE Then diff --git a/app/TaskFlow/clsPatterns.vb b/app/TaskFlow/clsPatterns.vb index 6690a7a..c83d068 100644 --- a/app/TaskFlow/clsPatterns.vb +++ b/app/TaskFlow/clsPatterns.vb @@ -4,6 +4,8 @@ Imports DigitalData.Controls.LookupGrid Imports DevExpress.XtraGrid Imports DevExpress.XtraGrid.Views.Grid Imports DevExpress.XtraGrid.Columns +Imports DevExpress.XtraEditors +Imports DigitalData.Modules.Language ''' ''' Defines common Functions for Checking for and replacing placeholders. ''' This Class also includes a child class `Pattern` for passing around Patterns. @@ -209,6 +211,9 @@ Public Class clsPatterns Case GetType(TextBox) oReplaceValue = oControl.Text + Case GetType(TextEdit) + oReplaceValue = Utils.NotNull(DirectCast(oControl, TextEdit).EditValue, String.Empty) + Case GetType(LookupControl3) Dim oLookupControl3 As LookupControl3 = oControl If oLookupControl3.Properties.SelectedValues.Count = 1 Then @@ -217,7 +222,7 @@ Public Class clsPatterns oReplaceValue = ERROR_REPLACE_VALUE End If - Case GetType(ComboBox) + Case GetType(Windows.Forms.ComboBox) oReplaceValue = oControl.Text Case GetType(CheckBox) diff --git a/app/TaskFlow/frmAdministration.vb b/app/TaskFlow/frmAdministration.vb index f1417ab..9835ed0 100644 --- a/app/TaskFlow/frmAdministration.vb +++ b/app/TaskFlow/frmAdministration.vb @@ -197,7 +197,7 @@ Public Class frmAdministration If tabctrl_Profilkonfig.SelectedIndex = 1 Then CURRENT_OBJECTTYPE = cmbObjekttypen.Text If TabControl2.SelectedIndex = 1 Then - Refresh_Final_indexe() + Refresh_Final_Indexes() End If End If Catch ex As Exception @@ -406,7 +406,7 @@ Public Class frmAdministration EditMode_Profile("Unlock") End Sub - Private Sub Refresh_Final_indexe() + Private Sub Refresh_Final_Indexes() _Logger.Debug("Loading Final Index Data") Try @@ -434,7 +434,7 @@ Public Class frmAdministration RibbonPageGroup4.Enabled = False Case 1 CURRENT_OBJECTTYPE = cmbObjekttypen.Text - Refresh_Final_indexe() + Refresh_Final_Indexes() CancelFinalIndexInsert() End Select @@ -628,7 +628,7 @@ Public Class frmAdministration Save_Profile() End If If UNSAVED_CHANGES_FI Then - Save_FI() + Save_Final_Indexes() End If e.Cancel = True Else @@ -721,7 +721,7 @@ Public Class frmAdministration pgFinalIndexes.Refresh() If oShouldRefreshGrid Then - Refresh_Final_indexe() + Refresh_Final_Indexes() End If Catch ex As Exception _Logger.Error(ex) @@ -1016,7 +1016,7 @@ Public Class frmAdministration End Sub Private Sub BarButtonItem15_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem15.ItemClick - Refresh_Final_indexe() + Refresh_Final_Indexes() End Sub Private Sub BarButtonItem16_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem16.ItemClick @@ -1033,7 +1033,7 @@ Public Class frmAdministration If Not IsNothing(row) Then If MsgBox("Wollen Sie den Index wirklich löschen?", MsgBoxStyle.YesNo Or MsgBoxStyle.Question) = MsgBoxResult.Yes Then TBPM_PROFILE_FINAL_INDEXINGTableAdapter.DeleteFinalIndex(row.Item("GUID")) - Refresh_Final_indexe() + Refresh_Final_Indexes() MsgBox("Index erfolgreich gelöscht!", MsgBoxStyle.Information, "Hinweis:") End If @@ -1041,11 +1041,10 @@ Public Class frmAdministration End Sub Private Sub BarButtonItem18_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem18.ItemClick - Save_FI() - - Refresh_Final_indexe() + Save_Final_Indexes() + Refresh_Final_Indexes() End Sub - Private Sub Save_FI() + Private Sub Save_Final_Indexes() Try 'Dim obj As FinalIndexProperties = PropertyGrid1.SelectedObject Dim obj As FinalIndexProperties = pgFinalIndexes.SelectedObject @@ -1248,7 +1247,7 @@ Public Class frmAdministration End If If UNSAVED_CHANGES_FI Then - Save_FI() + Save_Final_Indexes() End If Return True @@ -1302,7 +1301,7 @@ Public Class frmAdministration tsbStaticInfo.Caption = "" Indexe_eintragen() If tabctrl_Profilkonfig.SelectedIndex = 1 And TBPM_PROFILEBindingSource.Position <> -1 Then - Refresh_Final_indexe() + Refresh_Final_Indexes() End If End Sub Private Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.Enter @@ -1341,7 +1340,6 @@ Public Class frmAdministration End Function Private Sub BarButtonItem22_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem22.ItemClick - Dim oUpdate As String Dim oCtrlSeriesSQL As Button Dim oCtrlSeriesType As ComboBox Dim oCtrlSeriesArgument As TextBox diff --git a/app/TaskFlow/frmFormDesigner.vb b/app/TaskFlow/frmFormDesigner.vb index f6f6ec1..5b09222 100644 --- a/app/TaskFlow/frmFormDesigner.vb +++ b/app/TaskFlow/frmFormDesigner.vb @@ -21,7 +21,9 @@ Public Class frmFormDesigner ' Control Variables Private CurrentControl As Control = Nothing + Private _Logger = LOGCONFIG.GetLogger() + Private ControlCreator As ClassControlCreator ' Movement Variables Private Mouse_IsPressed As Boolean @@ -56,8 +58,7 @@ Public Class frmFormDesigner Private Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles Me.Load Try - - ClassControlCreator.Logger = LOGCONFIG.GetLoggerFor("ControlCreator") + ControlCreator = New ClassControlCreator(LOGCONFIG) BarButtonItem3.Caption = "Designer locked" BarButtonItem3.ItemAppearance.Normal.BackColor = Color.Red Designer_Locked = True @@ -258,33 +259,33 @@ Public Class frmFormDesigner ' Jetzt die Control spezifischen Eigenschaften zuweisen Select Case row.Item("CTRL_TYPE") Case ClassControlCreator.PREFIX_TEXTBOX - Dim txt = ClassControlCreator.CreateExistingTextbox(row, True) + Dim txt = ControlCreator.CreateExistingTextbox(row, True) pnldesigner.Controls.Add(txt) SetMovementHandlers(txt) Case ClassControlCreator.PREFIX_LABEL - Dim lbl = ClassControlCreator.CreateExistingLabel(row, True) + Dim lbl = ControlCreator.CreateExistingLabel(row, True) pnldesigner.Controls.Add(lbl) SetMovementHandlers(lbl) Case "CMB" - Dim cmb = ClassControlCreator.CreateExistingCombobox(row, True) + Dim cmb = ControlCreator.CreateExistingCombobox(row, True) pnldesigner.Controls.Add(cmb) SetMovementHandlers(cmb) Case "DTP" - Dim dtp = ClassControlCreator.CreateExistingDatepicker(row, True) + Dim dtp = ControlCreator.CreateExistingDatepicker(row, True) pnldesigner.Controls.Add(dtp) SetMovementHandlers(dtp) Case "CHK" - Dim chk = ClassControlCreator.CreateExisingCheckbox(row, True) + Dim chk = ControlCreator.CreateExisingCheckbox(row, True) pnldesigner.Controls.Add(chk) SetMovementHandlers(chk) Case "DGV" - Dim dgv = ClassControlCreator.CreateExistingDataGridView(row, True) + Dim dgv = ControlCreator.CreateExistingDataGridView(row, True) pnldesigner.Controls.Add(dgv) SetMovementHandlers(dgv) @@ -296,7 +297,7 @@ Public Class frmFormDesigner Dim oDTColumnsPerDevExGrid As DataTable = DatabaseFallback.GetDatatableECM(oSQL) ', "FDesignLaodControls") - Dim table = ClassControlCreator.CreateExistingGridControl(row, oDTColumnsPerDevExGrid, True) + Dim table = ControlCreator.CreateExistingGridControl(row, oDTColumnsPerDevExGrid, True) AddHandler table.MouseClick, AddressOf gridControl_MouseClick ' AddHandler table.ColumnHeaderMouseClick, AddressOf table_ColumnHeaderMouseClick @@ -305,16 +306,16 @@ Public Class frmFormDesigner SetMovementHandlers(table) Case "LOOKUP" - Dim lookup = ClassControlCreator.CreateExistingLookupControl(row, True) + Dim lookup = ControlCreator.CreateExistingLookupControl(row, True) pnldesigner.Controls.Add(lookup) SetMovementHandlers(lookup) Case "LINE" - Dim line = ClassControlCreator.CreateExistingLine(row, True) + Dim line = ControlCreator.CreateExistingLine(row, True) pnldesigner.Controls.Add(line) SetMovementHandlers(line) Case "BUTTON" - Dim oButton = ClassControlCreator.CreateExistingButton(row, True) + Dim oButton = ControlCreator.CreateExistingButton(row, True) pnldesigner.Controls.Add(oButton) SetMovementHandlers(oButton) End Select @@ -1104,7 +1105,7 @@ Public Class frmFormDesigner Try Select Case ControlSelected Case ClassControlCreator.PREFIX_LABEL - Dim label = ClassControlCreator.CreateNewLabel(cursorPosition) + Dim label = ControlCreator.CreateNewLabel(cursorPosition) SetMovementHandlers(label) TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, label.Name, "LBL", label.Text, label.Location.X, label.Location.Y, USER_USERNAME, label.Size.Height, label.Size.Width) @@ -1119,7 +1120,7 @@ Public Class frmFormDesigner pnldesigner.Controls.Add(label) Case ClassControlCreator.PREFIX_TEXTBOX - Dim txt = ClassControlCreator.CreateNewTextBox(cursorPosition) + Dim txt = ControlCreator.CreateNewTextBox(cursorPosition) SetMovementHandlers(txt) TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, txt.Name, "TXT", txt.Name, txt.Location.X, txt.Location.Y, USER_USERNAME, txt.Size.Height, txt.Size.Width) @@ -1133,7 +1134,7 @@ Public Class frmFormDesigner pnldesigner.Controls.Add(txt) Case ClassControlCreator.PREFIX_COMBOBOX - Dim cmb = ClassControlCreator.CreateNewCombobox(cursorPosition) + Dim cmb = ControlCreator.CreateNewCombobox(cursorPosition) SetMovementHandlers(cmb) TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, cmb.Name, "CMB", cmb.Name, cmb.Location.X, cmb.Location.Y, USER_USERNAME, cmb.Size.Height, cmb.Size.Width) @@ -1147,7 +1148,7 @@ Public Class frmFormDesigner pnldesigner.Controls.Add(cmb) Case ClassControlCreator.PREFIX_DATETIMEPICKER - Dim dtp = ClassControlCreator.CreateNewDatetimepicker(cursorPosition) + Dim dtp = ControlCreator.CreateNewDatetimepicker(cursorPosition) SetMovementHandlers(dtp) TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, dtp.Name, "DTP", dtp.Name, dtp.Location.X, dtp.Location.Y, USER_USERNAME, dtp.Size.Height, dtp.Size.Width) @@ -1161,7 +1162,7 @@ Public Class frmFormDesigner pnldesigner.Controls.Add(dtp) Case ClassControlCreator.PREFIX_CHECKBOX - Dim chk = ClassControlCreator.CreateNewCheckbox(cursorPosition) + Dim chk = ControlCreator.CreateNewCheckbox(cursorPosition) SetMovementHandlers(chk) TBPM_PROFILE_CONTROLSTableAdapter.cmdInsertAnlage(ProfileId, chk.Name, "CHK", chk.Text, chk.Location.X, chk.Location.Y, USER_USERNAME, chk.Size.Height, chk.Size.Width) @@ -1175,7 +1176,7 @@ Public Class frmFormDesigner pnldesigner.Controls.Add(chk) Case ClassControlCreator.PREFIX_LOOKUP - Dim lc As LookupControl3 = ClassControlCreator.CreateNewLookupControl(cursorPosition) + Dim lc As LookupControl3 = ControlCreator.CreateNewLookupControl(cursorPosition) SetMovementHandlers(lc) @@ -1190,7 +1191,7 @@ Public Class frmFormDesigner pnldesigner.Controls.Add(lc) Case ClassControlCreator.PREFIX_TABLE - Dim tb = ClassControlCreator.CreateNewTable(cursorPosition) + Dim tb = ControlCreator.CreateNewTable(cursorPosition) SetMovementHandlers(tb) AddHandler tb.MouseClick, AddressOf gridControl_MouseClick @@ -1210,7 +1211,7 @@ Public Class frmFormDesigner pnldesigner.Controls.Add(tb) Case ClassControlCreator.PREFIX_LINE - Dim line = ClassControlCreator.CreateNewLine(cursorPosition) + Dim line = ControlCreator.CreateNewLine(cursorPosition) SetMovementHandlers(line) @@ -1225,7 +1226,7 @@ Public Class frmFormDesigner pnldesigner.Controls.Add(line) Case ClassControlCreator.PREFIX_BUTTON - Dim oButton = ClassControlCreator.CreateNewButton(cursorPosition) + Dim oButton = ControlCreator.CreateNewButton(cursorPosition) SetMovementHandlers(oButton) diff --git a/app/TaskFlow/frmMassValidator.vb b/app/TaskFlow/frmMassValidator.vb index 1f4ad84..f1a34c4 100644 --- a/app/TaskFlow/frmMassValidator.vb +++ b/app/TaskFlow/frmMassValidator.vb @@ -25,6 +25,7 @@ Public Class frmMassValidator Private CTRLS_Loaded As Boolean = False Private FORM_Shown As Boolean = False Private _dependingControl_in_action As Boolean = False + Private ControlCreator As ClassControlCreator Private oErrorMessage As String Private _windream As New ClassWindream_allgemein @@ -43,6 +44,7 @@ Public Class frmMassValidator '_windreamPM = New ClassPMWindream() '_windreamPM.Create_Session() + ControlCreator = New ClassControlCreator(LOGCONFIG) LOGGER.Debug("windream initialized frmMassValidator") @@ -146,7 +148,7 @@ Public Class frmMassValidator Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper Case ClassControlCreator.PREFIX_TEXTBOX LOGGER.Debug("Versuch TXT zu laden") - Dim txt As TextEdit = ClassControlCreator.CreateExistingTextbox(oControlRow, False) + Dim txt As TextEdit = ControlCreator.CreateExistingTextbox(oControlRow, False) AddHandler txt.GotFocus, AddressOf OnTextBoxFocus AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus @@ -155,19 +157,19 @@ Public Class frmMassValidator oControl = txt Case "LBL" LOGGER.Debug("Versuch LBL zu laden") - oControl = ClassControlCreator.CreateExistingLabel(oControlRow, False) + oControl = ControlCreator.CreateExistingLabel(oControlRow, False) Case "CMB" LOGGER.Debug("Versuch CMB zu laden") If oControlRow.Item("READ_ONLY") Then - Dim cmbReadonly = ClassControlCreator.CreateExistingTextbox(oControlRow, False) + Dim cmbReadonly = ControlCreator.CreateExistingTextbox(oControlRow, False) oControl = cmbReadonly Else - Dim cmb = ClassControlCreator.CreateExistingCombobox(oControlRow, False) + Dim cmb = ControlCreator.CreateExistingCombobox(oControlRow, False) AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex #Region "CONTROL LIST" - If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, cmb.Name) = 0 Then + If ControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, cmb.Name) = 0 Then MsgBox("Unexpected Error in getting control-properties (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If @@ -179,7 +181,7 @@ Public Class frmMassValidator LOGGER.Debug("ConID > 0 And commandsql <> ''") Dim connectionString As String - Dim ConRow As DataRow() = ClassControlCreator.GET_CONNECTION_INFO(CURR_CON_ID) + Dim ConRow As DataRow() = ControlCreator.GET_CONNECTION_INFO(CURR_CON_ID) If ConRow Is Nothing Then MsgBox("Unexpected Error in getting Coninfo (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub @@ -277,26 +279,7 @@ Public Class frmMassValidator End If #End Region - 'Dim oMaxWidth As Integer = cmb.Width - 'Using oGraphics As Graphics = cmb.CreateGraphics() - ' Dim oStringLength = oGraphics.MeasureString(Text, cmb.Font).Width - ' If oStringLength + 30 > oMaxWidth Then - ' oMaxWidth = oStringLength + 30 - ' End If - 'End Using - - 'Using g As Graphics = Me.CreateGraphics - ' For Each oItem As Object In cmb.Items 'Für alle Einträge... - ' Dim g1 As Graphics = cmb.CreateGraphics - ' If g1.MeasureString(Text, cmb.Font).Width + 30 > oMaxWidth Then - ' oMaxWidth = g1.MeasureString(Text, cmb.Font).Width + 30 - ' End If - ' g1.Dispose() - ' Next oItem - 'End Using - - 'cmb.DropDownWidth = oMaxWidth @@ -311,10 +294,10 @@ Public Class frmMassValidator Case "DTP" LOGGER.Debug("Versuch DTP zu laden") - oControl = ClassControlCreator.CreateExistingDatepicker(oControlRow, False) + oControl = ControlCreator.CreateExistingDatepicker(oControlRow, False) Case "DGV" LOGGER.Debug("Versuch DGV zu laden") - Dim dgv = ClassControlCreator.CreateExistingDataGridView(oControlRow, False) + Dim dgv = ControlCreator.CreateExistingDataGridView(oControlRow, False) AddHandler dgv.RowValidating, AddressOf onDGVRowValidating @@ -322,20 +305,20 @@ Public Class frmMassValidator Case "CHK" LOGGER.Debug("Versuch Checkbox zu laden") - oControl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False) + oControl = ControlCreator.CreateExisingCheckbox(oControlRow, False) Case "LINE" LOGGER.Debug("Versuch Linie zu laden") - oControl = ClassControlCreator.CreateExistingLine(oControlRow, False) + oControl = ControlCreator.CreateExistingLine(oControlRow, False) Case "LOOKUP" Dim oMultiselect = oControlRow.Item("MULTISELECT") Dim oReadonly = oControlRow.Item("READ_ONLY") If oMultiselect = False And oReadonly = True Then - Dim lookupReadonly = ClassControlCreator.CreateExistingTextbox(oControlRow, False) + Dim lookupReadonly = ControlCreator.CreateExistingTextbox(oControlRow, False) oControl = lookupReadonly Else - Dim lookup As LookupControl3 = ClassControlCreator.CreateExistingLookupControl(oControlRow, False) + Dim lookup As LookupControl3 = ControlCreator.CreateExistingLookupControl(oControlRow, False) lookup.Properties.PreventDuplicates = oControlRow.Item("VKT_PREVENT_MULTIPLE_VALUES") lookup.Properties.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM") @@ -373,7 +356,7 @@ Public Class frmMassValidator LOGGER.Debug("Versuch Tabelle zu laden") Dim oDTMyColumns As DataTable = DatabaseFallback.GetDatatableECM($"SELECT * FROM TBPM_CONTROL_TABLE WHERE CONTROL_ID = {oControlRow.Item("GUID")} ORDER BY SEQUENCE") ', "MV_LoadControls1") - oControl = ClassControlCreator.CreateExistingGridControl(oControlRow, oDTMyColumns, False) + oControl = ControlCreator.CreateExistingGridControl(oControlRow, oDTMyColumns, False) End Select If oControl IsNot Nothing AndAlso TypeOf oControl IsNot Label Then @@ -451,7 +434,6 @@ Public Class frmMassValidator Sub FillIndexValues() Dim controltype As String Dim indexname As String - Dim resultvalue Try For Each oControl As Control In Me.pnldesigner.Controls @@ -849,12 +831,12 @@ Public Class frmMassValidator If (e.KeyCode = Keys.Return) Or (e.KeyCode = Keys.Tab) Or (e.KeyCode = Keys.Enter) Then Try - If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, box.Name) = 0 Then + If ControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, box.Name) = 0 Then MsgBox("Unexpected Error in getting control-properties - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If - If ClassControlCreator.GET_DEPENDING_CONTROLS(DTCONTROLS, box.Name) = False Then + If ControlCreator.GetDependingControls(DTCONTROLS, box.Name) = False Then MsgBox("Unexpected Error in getting dependent controls - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If @@ -953,15 +935,15 @@ Public Class frmMassValidator End Try End Sub Public Sub OnCmbselectedIndex(sender As System.Object, e As System.EventArgs) - Dim cmb As ComboBox = sender + Dim cmb As Windows.Forms.ComboBox = sender If cmb.SelectedIndex <> -1 And CTRLS_Loaded = True And FORM_Shown = True Then ' Try - If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, cmb.Name) = 0 Then + If ControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, cmb.Name) = 0 Then MsgBox("Unexpected Error in getting control-properties CMB - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If - If ClassControlCreator.GET_DEPENDING_CONTROLS(DTCONTROLS, cmb.Name) = False Then + If ControlCreator.GetDependingControls(DTCONTROLS, cmb.Name) = False Then MsgBox("Unexpected Error in getting dependent controls CMB- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If @@ -999,12 +981,12 @@ Public Class frmMassValidator Public Sub onDGVRowValidating(ByVal sender As Object, ByVal e As DataGridViewCellCancelEventArgs) Dim dgv As DataGridView = sender Try - If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, dgv.Name) = 0 Then + If ControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, dgv.Name) = 0 Then MsgBox("Unexpected Error in getting control-properties DGV - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If - If ClassControlCreator.GET_DEPENDING_CONTROLS(DTCONTROLS, dgv.Name) = False Then + If ControlCreator.GetDependingControls(DTCONTROLS, dgv.Name) = False Then MsgBox("Unexpected Error in getting dependent controls DGV- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If @@ -1228,7 +1210,7 @@ Public Class frmMassValidator End Try Case GetType(System.Windows.Forms.ComboBox) - Dim cmb As ComboBox = oControl + Dim cmb As Windows.Forms.ComboBox = oControl Try value_from_control = cmb.Text Catch ex As Exception diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index 9530449..9e424f9 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -83,19 +83,8 @@ Public Class frmValidator Private Property _dependingColumn_in_action As Boolean = False Private Property _SetControlValue_in_action As Boolean = False - Private Property DTConversations As DataTable - Private Property DTDYNAMIC_RIGHTS As DataTable - Private Property DT_AdditionalSearches_Resultset_Docs As DataTable - Private Property Right_Conversation_Add As Boolean = False - Private Property Right_Conversation_Stop As Boolean = False - Private Property Right_Conversation_Message As Boolean = False - - Private Property Conversation_User_Active As Boolean = False - Private Property ConversationQUDT_Delete As DataTable - Private Property Conversation_initialized As Boolean = False - Public Property FormLoaded As Boolean = False Private Property ItemWorked As Boolean = False Private Property Override As Boolean = False @@ -104,7 +93,10 @@ Public Class frmValidator Private Property listChangedLookup As New List(Of String) Private Property ControlHandleStarted As Boolean = False + Private Documentloader As Loader + Private ControlCreator As ClassControlCreator + Private Property OperationMode As OperationMode Private ReadOnly Environment As Environment Private AdditionalDocResultsExist As Boolean = False @@ -159,7 +151,7 @@ Public Class frmValidator OperationMode = GetOperationMode() Documentloader = New Loader(LOGCONFIG, OperationMode, Environment.Service.Client, Environment.User) - + ControlCreator = New ClassControlCreator(LOGCONFIG) PMDelimiter = "~" Override = False @@ -169,8 +161,7 @@ Public Class frmValidator OLD_Document_Path = "" first_control = Nothing me_closing = False - 'pdfxchange = False - 'sumatra = False + FormLoaded = False Attmt_bbtnitmShow.Visibility = BarItemVisibility.Never Attmnt_bbtnitm_LoadonClick.Visibility = BarItemVisibility.Never @@ -617,7 +608,21 @@ Public Class frmValidator End If Dim oValue - If TypeOf control Is TextEdit Then + ' Because LookupControl is a subtype of TextEdit, + ' we need to check for LookupControl first! + If TypeOf control Is LookupControl3 Then + Try + Dim lookup As LookupControl3 = control + + lookup.Properties.DataSource = oDTContent + lookup.Properties.ValueMember = oDTContent.Columns.Item(0).ColumnName + lookup.Properties.DisplayMember = oDTContent.Columns.Item(0).ColumnName + Catch ex As Exception + + LOGGER.Warn("Error in LookUpLoadSQLData: " & ex.Message) + End Try + + ElseIf TypeOf control Is TextEdit Then Try Dim firstRow As DataRow = oDTContent.Rows(0) @@ -629,7 +634,7 @@ Public Class frmValidator LOGGER.Warn("Error in TextBoxLoadSQLData: " & ex.Message) End Try - ElseIf TypeOf control Is ComboBox Then + ElseIf TypeOf control Is Windows.Forms.ComboBox Then Try Dim oMyComboBox As Windows.Forms.ComboBox = control Dim oselectedIndex = oMyComboBox.SelectedIndex @@ -646,17 +651,7 @@ Public Class frmValidator Catch ex As Exception LOGGER.Warn("Error in ComboBoxLoadSQLData: " & ex.Message) End Try - ElseIf TypeOf control Is LookupControl3 Then - Try - Dim lookup As LookupControl3 = control - lookup.Properties.DataSource = oDTContent - lookup.Properties.ValueMember = oDTContent.Columns.Item(0).ColumnName - lookup.Properties.DisplayMember = oDTContent.Columns.Item(0).ColumnName - Catch ex As Exception - - LOGGER.Warn("Error in LookUpLoadSQLData: " & ex.Message) - End Try ElseIf TypeOf control Is GridControl Then Try Dim dataGridView As GridControl = control @@ -761,8 +756,6 @@ Public Class frmValidator Dim oTabIndexCounter As Integer = 0 - ClassControlCreator.Logger = LOGCONFIG.GetLoggerFor("ControlCreator") - For Each oControlRow As DataRow In DT_CONTROLS.Rows Dim oMyControl As Control Dim oControlID = oControlRow.Item("GUID") @@ -774,7 +767,7 @@ Public Class frmValidator oControlInfo = ClassControlCreator.PREFIX_TEXTBOX & "#" & oControlInfo LOGGER.Debug($"[{oControlInfo}] - TXT Try to create control...") - Dim txt As TextEdit = ClassControlCreator.CreateExistingTextbox(oControlRow, False) + Dim txt As TextEdit = ControlCreator.CreateExistingTextbox(oControlRow, False) AddHandler txt.GotFocus, AddressOf OnTextBoxFocus AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp @@ -786,15 +779,15 @@ Public Class frmValidator End Try Case "LBL" oControlInfo = "LBL#" & oControlInfo - oMyControl = ClassControlCreator.CreateExistingLabel(oControlRow, False) + oMyControl = ControlCreator.CreateExistingLabel(oControlRow, False) Case "CMB" oControlInfo = "CMB#" & oControlInfo LOGGER.Debug($"[{oControlInfo}] - CMB Try to create control...") If oControlRow.Item("READ_ONLY") Then - Dim cmbReadonly = ClassControlCreator.CreateExistingTextbox(oControlRow, False) + Dim cmbReadonly = ControlCreator.CreateExistingTextbox(oControlRow, False) oMyControl = cmbReadonly Else - Dim oComboBox = ClassControlCreator.CreateExistingCombobox(oControlRow, False) + Dim oComboBox = ControlCreator.CreateExistingCombobox(oControlRow, False) AddHandler oComboBox.SelectedValueChanged, AddressOf OnCmbselectedIndex AddHandler oComboBox.GotFocus, Sub(sender As Control, e As EventArgs) @@ -878,10 +871,10 @@ Public Class frmValidator Case "DTP" oControlInfo = "DTP#" & oControlInfo - oMyControl = ClassControlCreator.CreateExistingDatepicker(oControlRow, False) + oMyControl = ControlCreator.CreateExistingDatepicker(oControlRow, False) Case "DGV" - Dim dgv = ClassControlCreator.CreateExistingDataGridView(oControlRow, False) + Dim dgv = ControlCreator.CreateExistingDataGridView(oControlRow, False) AddHandler dgv.RowValidating, AddressOf onDGVRowValidating @@ -893,10 +886,10 @@ Public Class frmValidator Dim oReadonly = oControlRow.Item("READ_ONLY") If oMultiselect = False And oReadonly = True Then - Dim lookupReadonly = ClassControlCreator.CreateExistingTextbox(oControlRow, False) + Dim lookupReadonly = ControlCreator.CreateExistingTextbox(oControlRow, False) oMyControl = lookupReadonly Else - Dim lookup As LookupControl3 = ClassControlCreator.CreateExistingLookupControl(oControlRow, False) + Dim lookup As LookupControl3 = ControlCreator.CreateExistingLookupControl(oControlRow, False) lookup.Properties.PreventDuplicates = oControlRow.Item("VKT_PREVENT_MULTIPLE_VALUES") lookup.Properties.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM") @@ -958,7 +951,7 @@ Public Class frmValidator Case "CHK" oControlInfo = "CHK#" & oControlInfo - oMyControl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False) + oMyControl = ControlCreator.CreateExisingCheckbox(oControlRow, False) Dim mycheckbox As CheckBox = oMyControl AddHandler mycheckbox.CheckedChanged, AddressOf onCheckBox_CheckedChange @@ -977,7 +970,7 @@ Public Class frmValidator Continue For End If - Dim oGrid = ClassControlCreator.CreateExistingGridControl(oControlRow, oFilteredDatatable, False) + Dim oGrid = ControlCreator.CreateExistingGridControl(oControlRow, oFilteredDatatable, False) AddHandler oGrid.ProcessGridKey, Sub(ByVal _sender As Object, ByVal e As KeyEventArgs) If e.KeyCode = Keys.Tab Then @@ -1001,9 +994,9 @@ Public Class frmValidator oMyControl = oGrid Case "LINE" - oMyControl = ClassControlCreator.CreateExistingLine(oControlRow, False) + oMyControl = ControlCreator.CreateExistingLine(oControlRow, False) Case "BUTTON" - Dim obutton = ClassControlCreator.CreateExistingButton(oControlRow, False) + Dim obutton = ControlCreator.CreateExistingButton(oControlRow, False) AddHandler obutton.Click, AddressOf onCustomButtonClick oMyControl = obutton @@ -1056,7 +1049,7 @@ Public Class frmValidator Case GetType(DevExpress.XtraEditors.TextEdit) inctrl.Text = "" Case GetType(System.Windows.Forms.ComboBox) - Dim cmb As ComboBox = inctrl + Dim cmb As Windows.Forms.ComboBox = inctrl cmb.SelectedIndex = -1 Case GetType(System.Windows.Forms.DataGridView) Dim dgv As DataGridView = inctrl @@ -1097,7 +1090,7 @@ Public Class frmValidator SetControlValues_FromControl(oTextbox) - ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) + ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) End Sub Private Function GetControlID(ByVal PROFILEID As Integer, Controlname As String) @@ -1148,7 +1141,7 @@ Public Class frmValidator End If - ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) + ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) Catch ex As Exception LOGGER.Error(ex) @@ -1165,7 +1158,7 @@ Public Class frmValidator Private Sub onCustomButtonClick(sender As System.Object, e As System.EventArgs) Dim oButton As Button = sender Dim oControlID = DirectCast(oButton.Tag, ClassControlCreator.ControlMetadata).Guid - Dim oSQL = ClassControlCreator.GET_CONTROL_PROPERTY(DT_CONTROLS, oControlID, "SQL_UEBERPRUEFUNG") + Dim oSQL = ControlCreator.GET_CONTROL_PROPERTY(DT_CONTROLS, oControlID, "SQL_UEBERPRUEFUNG") If IsNothing(oSQL) Then LOGGER.Warn("onCustomButtonClick - SQL_UEBERPRUEFUNG IS NOTHING") Exit Sub @@ -1175,7 +1168,7 @@ Public Class frmValidator LOGGER.Warn("onCustomButtonClick - Check_UpdateIndexe = False >> Exit Click") Exit Sub End If - Override_SQLCommand = ClassControlCreator.GET_CONTROL_PROPERTY(DT_CONTROLS, oControlID, "SQL2") + Override_SQLCommand = ControlCreator.GET_CONTROL_PROPERTY(DT_CONTROLS, oControlID, "SQL2") If IsNothing(Override_SQLCommand) Then Override_SQLCommand = "" End If @@ -1395,7 +1388,7 @@ Public Class frmValidator Dim oLookup As RepositoryItemLookupControl3 = sender listChangedLookup.Add(oLookup.Name) - ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) + ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) Catch ex As Exception LOGGER.Error(ex) End Try @@ -1413,7 +1406,7 @@ Public Class frmValidator Checkbox_EnablingControls(oCheckbox) CheckBox_DependingColumn(oCheckbox) SetControlValues_FromControl(oCheckbox) - ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) + ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) Catch ex As Exception LOGGER.Error(ex) End Try @@ -1959,7 +1952,7 @@ Public Class frmValidator Dim oControlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid If oControlId = oDEPENDING_CONTROL_ID Then - ClassControlCreator.GridTables_CacheDatatableForColumn(oControlId, oDEPENDING_COLUMN, oSqlCommand, oCONNID, oAdvancedLookup) + ControlCreator.GridTables_CacheDatatableForColumn(oControlId, oDEPENDING_COLUMN, oSqlCommand, oCONNID, oAdvancedLookup) _dependingColumn_in_action = False Exit For End If @@ -2003,7 +1996,7 @@ Public Class frmValidator For Each oControl As Control In PanelValidatorControl.Controls Dim oControlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_CONTROL_ID Then - ClassControlCreator.GridTables_CacheDatatableForColumn(oControlId, oDEPENDING_COLUMN, oSqlCommand, oCONNID, oAdvancedLookup) + ControlCreator.GridTables_CacheDatatableForColumn(oControlId, oDEPENDING_COLUMN, oSqlCommand, oCONNID, oAdvancedLookup) _dependingColumn_in_action = False Exit For End If @@ -2019,7 +2012,7 @@ Public Class frmValidator End Sub Public Sub OnCmbselectedIndex(sender As System.Object, e As System.EventArgs) - Dim oCombobox As ComboBox = sender + Dim oCombobox As Windows.Forms.ComboBox = sender If oCombobox.SelectedIndex <> -1 And _Indexe_Loaded = True Then If oCombobox.Name = last_control.Name Then 'Abschluss() @@ -2060,7 +2053,7 @@ Public Class frmValidator Next End If - ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) + ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) Controls2beEnabled(oCombobox.Name) @@ -2990,12 +2983,12 @@ Public Class frmValidator If DTVWCONTROL_INDEX.Rows.Count > 0 Then Dim oCount As Integer = 0 For Each oControl As Control In Me.PanelValidatorControl.Controls - If SingleAttribute <> "" Then - oIDBOverride = True - If SingleAttribute <> oControl.Name Then - Continue For - End If - End If + 'If SingleAttribute <> "" Then + ' oIDBOverride = True + ' If SingleAttribute <> oControl.Name Then + ' Continue For + ' End If + 'End If Dim oValueFromSource Dim oFormattedValue As String = "" @@ -3104,7 +3097,7 @@ Public Class frmValidator End Try - ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) + ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) Catch ex As Exception @@ -3285,25 +3278,6 @@ Public Class frmValidator oDataSource.Rows.Add(oRowData.ToArray()) - 'Select Case oColValuesfromSource.Length - ' Case 1 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0)}) - ' Case 2 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1)}) - ' Case 3 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2)}) - ' Case 4 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2), oColValuesfromSource(3)}) - ' Case 5 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2), oColValuesfromSource(3), oColValuesfromSource(4)}) - ' Case 6 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2), oColValuesfromSource(3), oColValuesfromSource(4), oColValuesfromSource(5)}) - ' Case 7 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2), oColValuesfromSource(3), oColValuesfromSource(4), oColValuesfromSource(5), oColValuesfromSource(6)}) - ' Case 8 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2), oColValuesfromSource(3), oColValuesfromSource(4), oColValuesfromSource(5), oColValuesfromSource(6), oColValuesfromSource(7)}) - 'End Select - ElseIf oValueType = "System.Data.DataTable" Then Dim oMyDatatable As DataTable = oValueFromSource @@ -3327,25 +3301,6 @@ Public Class frmValidator oDataSource.Rows.Add(oRowData.ToArray()) - 'Select Case oColValuesfromSource.Length - ' Case 1 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0)}) - ' Case 2 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1)}) - ' Case 3 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2)}) - ' Case 4 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2), oColValuesfromSource(3)}) - ' Case 5 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2), oColValuesfromSource(3), oColValuesfromSource(4)}) - ' Case 6 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2), oColValuesfromSource(3), oColValuesfromSource(4), oColValuesfromSource(5)}) - ' Case 7 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2), oColValuesfromSource(3), oColValuesfromSource(4), oColValuesfromSource(5), oColValuesfromSource(6)}) - ' Case 8 - ' oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2), oColValuesfromSource(3), oColValuesfromSource(4), oColValuesfromSource(5), oColValuesfromSource(6), oColValuesfromSource(7)}) - 'End Select - Next End If @@ -3634,7 +3589,7 @@ Public Class frmValidator For Each oControl As Control In PanelValidatorControl.Controls Dim oControlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid If oControlId = oDEPENDING_CTRL_ID Then - ClassControlCreator.GridTables_CacheDatatableForColumn(oControlId, oDEPENDING_COLUMN, oSqlCommand, oCONNID, oAdvancedLookup) + ControlCreator.GridTables_CacheDatatableForColumn(oControlId, oDEPENDING_COLUMN, oSqlCommand, oCONNID, oAdvancedLookup) Exit For End If Next @@ -4181,7 +4136,7 @@ Public Class frmValidator End Try Case GetType(System.Windows.Forms.ComboBox) - Dim cmb As ComboBox = oControl + Dim cmb As Windows.Forms.ComboBox = oControl Try value_from_control = cmb.Text Catch ex As Exception @@ -4328,17 +4283,24 @@ Public Class frmValidator btnSave.Enabled = True End Sub - Function Check_Missing(control As Control, typ As String) As Boolean + + Function Check_Missing_Control_Value(control As Control, typ As String) As Boolean Select Case typ Case "txt" Dim oTextBox As TextEdit = control - If oTextBox.Text = String.Empty Then + + If IsNothing(oTextBox.EditValue) Then + Return True + End If + + If oTextBox.EditValue.ToString = String.Empty Then Return True End If End Select Return False End Function + Function Return_PM_VEKTOR(input As String, VKTBezeichner As String) Dim PM_String As String Try @@ -4673,7 +4635,7 @@ Public Class frmValidator End If 'as erstes überprüfen ob überhaupt etwas eingetragen worden ist - If Check_Missing(oControl, "txt") = True And oIsRequired = True Then 'NICHTS EINGETRAGEN + If Check_Missing_Control_Value(oControl, "txt") = True And oIsRequired = True Then 'NICHTS EINGETRAGEN oMissing = True oErrMsgMissingInput = oWrongInputMessage & " textbox '" & oControl.Name & "'" LOGGER.Warn(oErrMsgMissingInput) From a2b051401b04b38967fc53cd3f217a4394749918 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 7 Jun 2023 09:45:27 +0200 Subject: [PATCH 06/13] fix MASSIVE potential slowdown when loading frmValidator --- app/TaskFlow/ClassControlCreator.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/TaskFlow/ClassControlCreator.vb b/app/TaskFlow/ClassControlCreator.vb index 92e5ac8..b016cad 100644 --- a/app/TaskFlow/ClassControlCreator.vb +++ b/app/TaskFlow/ClassControlCreator.vb @@ -1067,7 +1067,9 @@ Public Class ClassControlCreator Dim oValue = oRow2.Item(0) Try - oValue &= $" | {oRow2.Item(1)}" + If oRow2.ItemArray.Length > 1 Then + oValue &= $" | {oRow2.Item(1)}" + End If Catch ex As Exception End Try From d889bd7e2870adcd8c47c9140f02d75c4a77ed0e Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 7 Jun 2023 09:46:06 +0200 Subject: [PATCH 07/13] finish first pass of switching to TextEdit --- app/TaskFlow/ClassFormat.vb | 22 +++++++++++++ app/TaskFlow/frmValidator.vb | 62 ++++++++++++++++++++++++++---------- 2 files changed, 68 insertions(+), 16 deletions(-) diff --git a/app/TaskFlow/ClassFormat.vb b/app/TaskFlow/ClassFormat.vb index 5b84ce4..2ef28b9 100644 --- a/app/TaskFlow/ClassFormat.vb +++ b/app/TaskFlow/ClassFormat.vb @@ -57,4 +57,26 @@ Public Class ClassFormat Return oConvertedValue End Function + + Public Shared Function GetStringValue(pValue As Object) As String + Select Case pValue.GetType + Case GetType(Single) + Return DirectCast(pValue, Single).ToString(CultureInfo.InvariantCulture) + + Case GetType(Double) + Return DirectCast(pValue, Double).ToString(CultureInfo.InvariantCulture) + + Case GetType(Decimal) + Return DirectCast(pValue, Decimal).ToString(CultureInfo.InvariantCulture) + + Case GetType(Date) + Return DirectCast(pValue, Date).ToString(CultureInfo.InvariantCulture) + + Case GetType(DateTime) + Return DirectCast(pValue, DateTime).ToString(CultureInfo.InvariantCulture) + + Case Else + Return pValue.ToString + End Select + End Function End Class diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index 9e424f9..198ea8d 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -21,6 +21,7 @@ Imports DevExpress.XtraBars Imports DevExpress.XtraGrid.Columns Imports DevExpress.XtraEditors Imports DevExpress.Data +Imports DigitalData.Modules.Logging Public Class frmValidator Private Property Current_Document As DocumentResultList.Document = Nothing @@ -96,6 +97,8 @@ Public Class frmValidator Private Documentloader As Loader Private ControlCreator As ClassControlCreator + Private PerformanceLogger As Logger + Private Const LOG_PERF = True Private Property OperationMode As OperationMode Private ReadOnly Environment As Environment @@ -107,6 +110,9 @@ Public Class frmValidator End Class Public Sub New(pEnvironment As Environment) + PerformanceLogger = LOGCONFIG.GetLoggerFor("PERF") + If LOG_PERF Then PerformanceLogger.Info("New") + 'MyBase.New LOGGER.Debug("Initialize Components...") InitializeComponent() @@ -119,6 +125,7 @@ Public Class frmValidator LOGGER.Error(ex) End Try + End Sub Private Function GetOperationMode() As OperationMode @@ -141,8 +148,8 @@ Public Class frmValidator End Function Private Sub frmValidation_Load(sender As Object, e As System.EventArgs) Handles Me.Load - Try + If LOG_PERF Then PerformanceLogger.Info("frmValidation_Load") LOGGER.Debug("###frmValidation_Load###") LOGGER.Debug("Current User Language: [{0}]", USER_LANGUAGE) @@ -704,8 +711,11 @@ Public Class frmValidator End If End Function Sub Create_Controls() + If LOG_PERF Then PerformanceLogger.Info("Create_Controls") + Dim oControlInfo As String Try + PanelValidatorControl.Controls.Clear() Dim oSQL = $"SELECT [dbo].[FNPM_LANGUAGE_CONTROL_TEXT] (NAME,'{USER_LANGUAGE}',CTRL_TYPE,CTRL_TEXT) CTRL_CAPTION_LANG, * FROM TBPM_PROFILE_CONTROLS WHERE CONTROL_ACTIVE = 1 AND PROFIL_ID = {CURRENT_ProfilGUID} ORDER BY Y_LOC, X_LOC" DT_CONTROLS = DatabaseFallback.GetDatatable("TBPM_PROFILE_CONTROLS_LANGUAGE", New GetDatatableOptions(oSQL, DatabaseType.ECM) With { @@ -763,6 +773,8 @@ Public Class frmValidator Try Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper Case ClassControlCreator.PREFIX_TEXTBOX + If LOG_PERF Then PerformanceLogger.Info("Create_Controls/Textbox") + Try oControlInfo = ClassControlCreator.PREFIX_TEXTBOX & "#" & oControlInfo LOGGER.Debug($"[{oControlInfo}] - TXT Try to create control...") @@ -781,6 +793,8 @@ Public Class frmValidator oControlInfo = "LBL#" & oControlInfo oMyControl = ControlCreator.CreateExistingLabel(oControlRow, False) Case "CMB" + If LOG_PERF Then PerformanceLogger.Info("Create_Controls/ComboBox") + oControlInfo = "CMB#" & oControlInfo LOGGER.Debug($"[{oControlInfo}] - CMB Try to create control...") If oControlRow.Item("READ_ONLY") Then @@ -881,6 +895,8 @@ Public Class frmValidator oMyControl = dgv Case "LOOKUP" + If LOG_PERF Then PerformanceLogger.Info("Create_Controls/Lookup") + oControlInfo = "LOOKUP#" & oControlInfo Dim oMultiselect = oControlRow.Item("MULTISELECT") Dim oReadonly = oControlRow.Item("READ_ONLY") @@ -958,6 +974,8 @@ Public Class frmValidator Case "TABLE" + If LOG_PERF Then PerformanceLogger.Info("Create_Controls/Table") + oControlInfo = "TABLE#" & oControlInfo Dim oFilteredDatatable As DataTable = DT_COLUMNS_GRID.Clone() @@ -1047,7 +1065,8 @@ Public Class frmValidator Dim Type As String = inctrl.GetType.ToString Select Case inctrl.GetType Case GetType(DevExpress.XtraEditors.TextEdit) - inctrl.Text = "" + 'inctrl.Text = "" + DirectCast(inctrl, TextEdit).EditValue = Nothing Case GetType(System.Windows.Forms.ComboBox) Dim cmb As Windows.Forms.ComboBox = inctrl cmb.SelectedIndex = -1 @@ -1709,13 +1728,11 @@ Public Class frmValidator Select Case oControl.GetType.ToString Case GetType(TextEdit).ToString Try - Dim oTEXT = oDTDEPENDING_RESULT.Rows(0).Item(0) + Dim oValue As Object = oDTDEPENDING_RESULT.Rows(0).Item(0) + oValue = Utils.NotNull(Of Object)(oValue, Nothing) Try - If Not IsNothing(oTEXT) Then - If Not IsDBNull(oTEXT) Then - oControl.Text = oTEXT - End If - End If + 'oControl.Text = oValue + DirectCast(oControl, TextEdit).EditValue = oValue Catch ex As Exception LOGGER.Warn($"Unexpected error in Checking oTEXT: {ex.Message}") End Try @@ -1834,16 +1851,15 @@ Public Class frmValidator Select Case oControl.GetType.ToString Case GetType(TextEdit).ToString Try - Dim oTEXT = oDTDEPENDING_RESULT.Rows(0).Item(0) + Dim oValue As Object = oDTDEPENDING_RESULT.Rows(0).Item(0) + oValue = Utils.NotNull(Of Object)(oValue, Nothing) Try - If Not IsNothing(oTEXT) Then - If Not IsDBNull(oTEXT) Then - oControl.Text = oTEXT - End If - End If + 'oControl.Text = oValue + DirectCast(oControl, TextEdit).EditValue = oValue Catch ex As Exception LOGGER.Warn($"Unexpected error in Checking oTEXT: {ex.Message}") End Try + Catch ex As Exception LOGGER.Warn($"Unexpected error in Dim oTEXT = oDTDEPENDING_RESULT.Rows(0).Item(0): {ex.Message}") End Try @@ -2153,6 +2169,8 @@ Public Class frmValidator ' End Try 'End Sub Private Sub Controls2B_EnDisabled_on_Load() + If LOG_PERF Then PerformanceLogger.Info("Controls2B_EnDisabled_on_Load") + Try Dim oFilteredDatatable As DataTable = DT_CONTROLS.Clone() Dim oExpression = $"LEN(SQL_ENABLE_ON_LOAD) > 0" @@ -2975,6 +2993,8 @@ Public Class frmValidator End Function Sub FillIndexValues(first As Boolean, Optional SingleAttribute As String = "") + If LOG_PERF Then PerformanceLogger.Info("FillIndexValues") + Dim oControlType As String Dim oIndexName As String Dim oControName As String @@ -3013,6 +3033,8 @@ Public Class frmValidator LOGGER.Debug("INDEX: " & oSourceIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & oLoadIndex.ToString) Select Case oControl.GetType() Case GetType(DevExpress.XtraEditors.TextEdit) + If LOG_PERF Then PerformanceLogger.Info("FillIndexValues/TextEdit") + Try oControlType = "Textbox" Dim oTextBox As TextEdit = oControl @@ -3119,6 +3141,8 @@ Public Class frmValidator End Try Case GetType(System.Windows.Forms.ComboBox) + If LOG_PERF Then PerformanceLogger.Info("FillIndexValues/ComboBox") + oControlType = "ComboBox" Dim oMyCombobox As Windows.Forms.ComboBox = oControl Try @@ -3200,6 +3224,8 @@ Public Class frmValidator Case GetType(DevExpress.XtraGrid.GridControl) + If LOG_PERF Then PerformanceLogger.Info("FillIndexValues/GridControl") + oControlType = "DevExpress.XtraGrid.GridControl" Dim oMyGridControl As GridControl = oControl Dim oDTColumnsPerDevExGrid As DataTable = DT_COLUMNS_GRID.Clone() @@ -3466,6 +3492,8 @@ Public Class frmValidator End If Case GetType(DigitalData.Controls.LookupGrid.LookupControl3) + If LOG_PERF Then PerformanceLogger.Info("FillIndexValues/LookupControl") + Try Dim oLookup As LookupControl3 = oControl oValueFromSource = GetVariableValuefromSource(oSourceIndexName, oIDBTyp, oIDBOverride) @@ -3605,7 +3633,7 @@ Public Class frmValidator LOGGER.Warn($"FillIndexValues - Unexpected error in creating dropdown for Grid: " & ex.Message) End Try - + If LOG_PERF Then PerformanceLogger.Info("FillIndexValues/Postload") If IDB_ACTIVE = True Then Try @@ -4642,7 +4670,9 @@ Public Class frmValidator oControl.BackColor = Color.Red Exit For Else - oMyInput = oControl.Text + Dim oTextEdit As TextEdit = DirectCast(oControl, TextEdit) + oMyInput = ClassFormat.GetStringValue(oTextEdit.EditValue) + 'den aktuellen Wert in windream auslesen Dim oSourceValue = GetVariableValuefromSource(oIndexName, oIDBTyp) From 38afdf9f58b33cdff61475355fd27b765df0f187 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 7 Jun 2023 09:46:30 +0200 Subject: [PATCH 08/13] Version 2.4.4.0 --- app/TaskFlow/My Project/AssemblyInfo.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/TaskFlow/My Project/AssemblyInfo.vb b/app/TaskFlow/My Project/AssemblyInfo.vb index a32f4cf..1bdae9e 100644 --- a/app/TaskFlow/My Project/AssemblyInfo.vb +++ b/app/TaskFlow/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + From 829670e086e05d6ea8ded55644cd635ea5c6be41 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 7 Jun 2023 10:07:36 +0200 Subject: [PATCH 09/13] remove Modules.Language from frmValidator --- app/TaskFlow/frmValidator.vb | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index 198ea8d..3b66ca0 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -6,8 +6,6 @@ Imports System.Text.RegularExpressions Imports System.ComponentModel Imports System.Globalization Imports DigitalData.Controls.LookupGrid -Imports DigitalData.Modules.Language.Utils -Imports DigitalData.Modules.Language Imports DigitalData.Modules.Base Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback Imports DigitalData.Modules.EDMI.API.Constants @@ -911,7 +909,7 @@ Public Class frmValidator lookup.Properties.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM") lookup.Properties.MultiSelect = oMultiselect - If NotNull(oControlRow.Item("DEFAULT_VALUE"), "") <> "" Then + If GenericEx.NotNull(oControlRow.Item("DEFAULT_VALUE"), "") <> "" Then lookup.Properties.SelectedValues = New List(Of String) From {oControlRow.Item("DEFAULT_VALUE")} End If @@ -1466,15 +1464,15 @@ Public Class frmValidator Dim oControlname2Set = oRow.Item("NAME") LOGGER.Debug($"Workin on SetControLValue for {oControlname2Set} ...") - Dim oConnectionId = NotNull(oRow.Item("CONNECTION_ID"), -1) - Dim oControlDataSql = NotNull(oRow.Item("SET_CONTROL_DATA"), String.Empty) + Dim oConnectionId = GenericEx.NotNull(oRow.Item("CONNECTION_ID"), -1) + Dim oControlDataSql = GenericEx.NotNull(oRow.Item("SET_CONTROL_DATA"), String.Empty) If oConnectionId = -1 Or oControlDataSql = String.Empty Then LOGGER.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") Exit Sub End If - Dim oSqlCommand = NotNull(oRow.Item("SET_CONTROL_DATA"), String.Empty) + Dim oSqlCommand = GenericEx.NotNull(oRow.Item("SET_CONTROL_DATA"), String.Empty) oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) 'Dim oControlDataResult As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oConnectionId, $"SetControlValues - CTRLID {oControlID}") @@ -1729,7 +1727,7 @@ Public Class frmValidator Case GetType(TextEdit).ToString Try Dim oValue As Object = oDTDEPENDING_RESULT.Rows(0).Item(0) - oValue = Utils.NotNull(Of Object)(oValue, Nothing) + oValue = GenericEx.NotNull(Of Object)(oValue, Nothing) Try 'oControl.Text = oValue DirectCast(oControl, TextEdit).EditValue = oValue @@ -1852,7 +1850,7 @@ Public Class frmValidator Case GetType(TextEdit).ToString Try Dim oValue As Object = oDTDEPENDING_RESULT.Rows(0).Item(0) - oValue = Utils.NotNull(Of Object)(oValue, Nothing) + oValue = GenericEx.NotNull(Of Object)(oValue, Nothing) Try 'oControl.Text = oValue DirectCast(oControl, TextEdit).EditValue = oValue @@ -3025,7 +3023,7 @@ Public Class frmValidator Dim oSourceIndexName As String = oControlRow.Item("INDEX_NAME") ' Wenn kein defaultValue existiert, leeren String setzen - Dim oDefaultValue As String = NotNull(oControlRow.Item("DEFAULT_VALUE"), String.Empty) + Dim oDefaultValue As String = GenericEx.NotNull(oControlRow.Item("DEFAULT_VALUE"), String.Empty) oIndexName = oSourceIndexName oControName = oControl.Name Dim oLoadIndex As Boolean = oControlRow.Item("LOAD_IDX_VALUE") @@ -3086,9 +3084,9 @@ Public Class frmValidator 'oFormattedValue = ClassFormat.GetFormattedValue(oControl.Name, oValueFromSource, oFormatString) If Not IsNothing(oFormattedValue) And oFormattedValue <> String.Empty Then - oTextBox.EditValue = NotNull(oFormattedValue, oDefaultValue) + oTextBox.EditValue = GenericEx.NotNull(oFormattedValue, oDefaultValue) Else - oTextBox.EditValue = NotNull(oValueFromSource, oDefaultValue) + oTextBox.EditValue = GenericEx.NotNull(oValueFromSource, oDefaultValue) End If Try @@ -4445,8 +4443,8 @@ Public Class frmValidator End If oControlId = oControlRow.Item("GUID") - Dim oRegexMatch As String = NotNull(oControlRow.Item("REGEX_MATCH"), String.Empty) - Dim oRegexMessage As String = NotNull(oControlRow.Item("REGEX_MESSAGE_DE"), String.Empty) + Dim oRegexMatch As String = GenericEx.NotNull(oControlRow.Item("REGEX_MATCH"), String.Empty) + Dim oRegexMessage As String = GenericEx.NotNull(oControlRow.Item("REGEX_MESSAGE_DE"), String.Empty) oControlName = oControlRow.Item("CTRL_NAME") Dim oOVERWRITE_DATA = oControlRow.Item("OVERWRITE_DATA") @@ -5267,7 +5265,7 @@ Public Class frmValidator Dim oValueList As New List(Of String) For Each item As Object In oRow.ItemArray - item = NotNull(item, String.Empty) + item = GenericEx.NotNull(item, String.Empty) ' Convert to string using InvariantCulture, so converting back from string does not screw up values If TypeOf item IsNot String Then item = String.Format(CultureInfo.InvariantCulture, "{0}", item) From d77369523e610cb70e52860205f744f8f296ebb8 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 7 Jun 2023 10:08:09 +0200 Subject: [PATCH 10/13] Version 2.4.4.1 --- app/TaskFlow/My Project/AssemblyInfo.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/TaskFlow/My Project/AssemblyInfo.vb b/app/TaskFlow/My Project/AssemblyInfo.vb index 1bdae9e..9e49413 100644 --- a/app/TaskFlow/My Project/AssemblyInfo.vb +++ b/app/TaskFlow/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + From 22691f30c46a548a054ed3672d9cb50515968bfa Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 9 Jun 2023 08:57:52 +0200 Subject: [PATCH 11/13] clean up --- app/TaskFlow/ClassAllgemeineFunktionen.vb | 3 +- app/TaskFlow/frmValidator.vb | 388 ++++++---------------- 2 files changed, 109 insertions(+), 282 deletions(-) diff --git a/app/TaskFlow/ClassAllgemeineFunktionen.vb b/app/TaskFlow/ClassAllgemeineFunktionen.vb index 8eff614..8d03241 100644 --- a/app/TaskFlow/ClassAllgemeineFunktionen.vb +++ b/app/TaskFlow/ClassAllgemeineFunktionen.vb @@ -102,9 +102,8 @@ Public Class ClassAllgemeineFunktionen LOGGER.Error(ex) LOGGER.Info("Error in Insert_LogEntry: " & ex.Message) End Try - - End Function + Public Function ExecuteonMSSQL(ByVal sqlcommand As String, ConString As String) Try ' die nötigen Variablen definieren diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index 3b66ca0..e6c2a61 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -1,25 +1,24 @@ -Imports WINDREAMLib -Imports System.Threading -Imports System.Runtime.InteropServices -Imports System.IO -Imports System.Text.RegularExpressions -Imports System.ComponentModel -Imports System.Globalization +Imports DevExpress.XtraBars +Imports DevExpress.XtraEditors +Imports DevExpress.XtraGrid +Imports DevExpress.XtraGrid.Columns +Imports DevExpress.XtraGrid.Views.Grid Imports DigitalData.Controls.LookupGrid +Imports DigitalData.GUIs.Common +Imports DigitalData.GUIs.Common.DocumentResultList Imports DigitalData.Modules.Base -Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback Imports DigitalData.Modules.EDMI.API.Constants -Imports DigitalData.GUIs.Common.DocumentResultList +Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback +Imports DigitalData.Modules.Logging Imports DigitalData.Modules.ZooFlow Imports DigitalData.Modules.ZooFlow.Constants -Imports DigitalData.GUIs.Common -Imports DevExpress.XtraGrid -Imports DevExpress.XtraGrid.Views.Grid -Imports DevExpress.XtraBars -Imports DevExpress.XtraGrid.Columns -Imports DevExpress.XtraEditors -Imports DevExpress.Data -Imports DigitalData.Modules.Logging +Imports System.ComponentModel +Imports System.Globalization +Imports System.IO +Imports System.Runtime.InteropServices +Imports System.Text.RegularExpressions +Imports System.Threading +Imports WINDREAMLib Public Class frmValidator Private Property Current_Document As DocumentResultList.Document = Nothing @@ -51,47 +50,41 @@ Public Class frmValidator Private Property oErrMsgMissingInput - Private Property PMDelimiter As String + Private Const PMDelimiter As String = "~" - Private Property WD_Search As String Private Property finalProfile As Boolean Private Property Move2Folder As String 'Private Property DataASorDB As ClassDataASorDB Private Property allgFunk As New ClassAllgemeineFunktionen - 'speichert die DocumentDaten - Private Property navStep As String = Nothing - Public Shared Property WMDocPathWindows As String - Private Property WMDocFileString As String Private Property DocPathWindows As String - Private Property OLD_Document_Path As String = "" - Private Property ValueDTP As Date - Private Property docCounter As Integer = 1 'Anzahl der Validierungsdokumente Private Property Amount_Docs2Validate As Integer - Private Property me_closing As Boolean = False Private Property first_control As Control Private Property last_control As Control - Private Property _Indexe_Loaded As Boolean = False Public Shared Property idxerr_message As String = "" - Private Property _frmValidatorSearch As frmValidatorSearch 'You need a reference to Form1 - Private Property _dependingControl_in_action As Boolean = False - Private Property _dependingColumn_in_action As Boolean = False - Private Property _SetControlValue_in_action As Boolean = False + Private Property _frmValidatorSearch As frmValidatorSearch Private Property DT_AdditionalSearches_Resultset_Docs As DataTable - Public Property FormLoaded As Boolean = False - Private Property ItemWorked As Boolean = False + Private Property _Indexe_Loaded As Boolean = False + Private Property _DependingControl_In_Action As Boolean = False + Private Property _DependingColumn_In_Action As Boolean = False + Private Property _SetControlValue_In_Action As Boolean = False + Public Property _FormLoaded As Boolean = False + Private Property _FormClosing As Boolean = False + Private Property _ControlHandleStarted As Boolean = False + Private Property _ItemWorked As Boolean = False + + Private Property Override As Boolean = False Private Property OverrideAll As Boolean = False Private Property Override_SQLCommand As String = "" Private Property listChangedLookup As New List(Of String) - Private Property ControlHandleStarted As Boolean = False Private Documentloader As Loader Private ControlCreator As ClassControlCreator @@ -158,16 +151,13 @@ Public Class frmValidator Documentloader = New Loader(LOGCONFIG, OperationMode, Environment.Service.Client, Environment.User) ControlCreator = New ClassControlCreator(LOGCONFIG) - PMDelimiter = "~" Override = False - ItemWorked = False + _ItemWorked = False SplitContainer1.Panel2Collapsed = True - docCounter = 1 - OLD_Document_Path = "" first_control = Nothing - me_closing = False + _FormClosing = False - FormLoaded = False + _FormLoaded = False Attmt_bbtnitmShow.Visibility = BarItemVisibility.Never Attmnt_bbtnitm_LoadonClick.Visibility = BarItemVisibility.Never @@ -280,7 +270,6 @@ Public Class frmValidator PROFIL_LOGINDEX = "" End If - WD_Search = oProfileRow.Item("WD_SEARCH") finalProfile = oProfileRow.Item("FINAL_PROFILE") Move2Folder = IIf(IsDBNull(oProfileRow.Item("MOVE2Folder")), "", oProfileRow.Item("MOVE2Folder")) Try @@ -313,13 +302,10 @@ Public Class frmValidator End If Next - If DEBUG = False Then - LOGGER.Info(" >> profiledata saved:") - LOGGER.Info(" >> WD_Search: " & WD_Search) - LOGGER.Info(" >> finalProfile: " & finalProfile) - LOGGER.Info(" >> Move2Folder: " & Move2Folder) - LOGGER.Info(" >> Right_Delete: " & USER_RIGHT_FILE_DELETE) - End If + LOGGER.Debug(" >> profiledata saved:") + LOGGER.Debug(" >> finalProfile: " & finalProfile) + LOGGER.Debug(" >> Move2Folder: " & Move2Folder) + LOGGER.Debug(" >> Right_Delete: " & USER_RIGHT_FILE_DELETE) PROFIL_sortbynewest = CURRENT_DT_PROFILE.Rows(0).Item("SORT_BY_LATEST") LOGGER.Debug("PROFIL_sortbynewest: " & PROFIL_sortbynewest.ToString) @@ -360,7 +346,7 @@ Public Class frmValidator Private Sub frmValidation_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Try - me_closing = True + _FormClosing = True Try ' Position und Größe speichern My.Settings.frmValidatorSize = Me.Size @@ -909,7 +895,7 @@ Public Class frmValidator lookup.Properties.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM") lookup.Properties.MultiSelect = oMultiselect - If GenericEx.NotNull(oControlRow.Item("DEFAULT_VALUE"), "") <> "" Then + If ObjectEx.NotNull(oControlRow.Item("DEFAULT_VALUE"), "") <> "" Then lookup.Properties.SelectedValues = New List(Of String) From {oControlRow.Item("DEFAULT_VALUE")} End If @@ -1118,13 +1104,13 @@ Public Class frmValidator Public Sub OnTextBoxKeyUp(sender As Object, e As KeyEventArgs) - If ControlHandleStarted = True Then - ControlHandleStarted = False + If _ControlHandleStarted = True Then + _ControlHandleStarted = False Exit Sub End If Dim oTextBox As TextEdit = sender - If oTextBox.Text <> String.Empty And me_closing = False And _Indexe_Loaded = True And oTextBox.Height < 25 Then + If oTextBox.Text <> String.Empty And _FormClosing = False And _Indexe_Loaded = True And oTextBox.Height < 25 Then If (e.KeyCode = Keys.Return) Or (e.KeyCode = Keys.Tab) Or (e.KeyCode = Keys.Enter) Then Try @@ -1145,9 +1131,9 @@ Public Class frmValidator If Not IsDBNull(oSqlStatement) And Not IsDBNull(oConnectionId) Then oSqlStatement = clsPatterns.ReplaceAllValues(oSqlStatement, PanelValidatorControl, True) - _dependingControl_in_action = True + _DependingControl_In_Action = True Depending_Control_Set_Result(oControlName, oSqlStatement, oConnectionId) - _dependingControl_in_action = False + _DependingControl_In_Action = False End If Catch ex As Exception LOGGER.Error(ex) @@ -1166,7 +1152,7 @@ Public Class frmValidator End Try If oTextBox.Name <> last_control.Name Then SendKeys.Send("{TAB}") - ControlHandleStarted = True + _ControlHandleStarted = True End If End If End If @@ -1376,7 +1362,7 @@ Public Class frmValidator End Sub Public Sub onLookUpselectedValue(sender As Object, SelectedValues As List(Of String)) LOGGER.Debug("onLookUpselectedValue") - If FormLoaded = False Then + If _FormLoaded = False Then Exit Sub End If Dim oRepositoryItem As RepositoryItemLookupControl3 = sender @@ -1397,7 +1383,7 @@ Public Class frmValidator End Try End Sub Public Sub LookupListChanged(sender As Object, SelectedValues As List(Of String)) - If FormLoaded = False Then + If _FormLoaded = False Then Exit Sub End If @@ -1414,7 +1400,7 @@ Public Class frmValidator Public Sub onCheckBox_CheckedChange(sender As Object, e As EventArgs) LOGGER.Debug("onCheckBox_CheckedChange") - If FormLoaded = False Then + If _FormLoaded = False Then Exit Sub End If Dim oCheckbox As CheckBox = sender @@ -1430,7 +1416,7 @@ Public Class frmValidator End Sub Public Sub onLookUpselectedValue_Control2Set(sender As Object, SelectedValues As List(Of String)) - If FormLoaded = False Then + If _FormLoaded = False Then Exit Sub End If LOGGER.Debug("onLookUpselectedValue_Control2Set") @@ -1444,7 +1430,7 @@ Public Class frmValidator Dim oControlMeta = DirectCast(pControl.Tag, ClassControlCreator.ControlMetadata) Dim oControlID = oControlMeta.Guid - If _SetControlValue_in_action = True Then + If _SetControlValue_In_Action = True Then LOGGER.Debug("SetControlValue in action. Exiting.") Exit Sub End If @@ -1464,19 +1450,18 @@ Public Class frmValidator Dim oControlname2Set = oRow.Item("NAME") LOGGER.Debug($"Workin on SetControLValue for {oControlname2Set} ...") - Dim oConnectionId = GenericEx.NotNull(oRow.Item("CONNECTION_ID"), -1) - Dim oControlDataSql = GenericEx.NotNull(oRow.Item("SET_CONTROL_DATA"), String.Empty) + Dim oConnectionId = oRow.ItemEx("CONNECTION_ID", -1) + Dim oControlDataSql = oRow.ItemEx("SET_CONTROL_DATA", String.Empty) If oConnectionId = -1 Or oControlDataSql = String.Empty Then LOGGER.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") Exit Sub End If - Dim oSqlCommand = GenericEx.NotNull(oRow.Item("SET_CONTROL_DATA"), String.Empty) - oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) + oControlDataSql = clsPatterns.ReplaceAllValues(oControlDataSql, PanelValidatorControl, True) 'Dim oControlDataResult As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oConnectionId, $"SetControlValues - CTRLID {oControlID}") - Dim oControlDataResult As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSqlCommand, DatabaseType.ECM) With { + Dim oControlDataResult As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oControlDataSql, DatabaseType.ECM) With { .ConnectionId = oConnectionId }) @@ -1486,7 +1471,7 @@ Public Class frmValidator For Each oResultRow As DataRow In oControlDataResult.Rows Try - _SetControlValue_in_action = True + _SetControlValue_In_Action = True Dim oControl2Set = oResultRow.ItemEx("Control2Set", String.Empty) Dim oControlCaption = oResultRow.ItemEx("Caption", String.Empty) @@ -1495,34 +1480,11 @@ Public Class frmValidator Dim oControlTextOption = oResultRow.ItemEx("TextOption", "Replace") If oControl2Set.ToString.ToUpper = "BTN_FINISH".ToUpper Then - 'Try - ' Dim btntext = oResultRow.Item("Caption") - ' btnSave.Text = btntext & " (F2)" - 'Catch ex As Exception - ' LOGGER.Error(ex) - 'End Try - - 'Try - ' Dim oColor1 = Color.FromName(oResultRow.Item("BackgroundColor")) - ' btnSave.BackColor = oColor1 - 'Catch ex As Exception - ' LOGGER.Error(ex) - ' btnSave.BackColor = Color.Transparent - 'End Try - - 'Try - ' Dim oColor2 = Color.FromName(oResultRow.Item("FontColor")) - ' btnSave.ForeColor = oColor2 - 'Catch ex As Exception - ' LOGGER.Error(ex) - ' btnSave.ForeColor = Color.Black - 'End Try - btnSave.Text = oControlCaption & " (F2)" btnSave.BackColor = oControlBackColor btnSave.ForeColor = oControlFontColor - _SetControlValue_in_action = False + _SetControlValue_In_Action = False Continue For End If @@ -1545,18 +1507,8 @@ Public Class frmValidator Dim oControl As Control = oControlObject2Set Dim oMeta As ClassControlCreator.ControlMetadata = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata) - 'If oMeta.Guid = oControlId2Set Then - LOGGER.Debug($"Got the Control22Set: {oControlId2Set}..Setting the values..") - 'Dim oCaption As Object = oResultRow.Item("Caption") - 'Dim oTextOption = Nothing - 'Try - ' oTextOption = oResultRow.Item("TextOption") - 'Catch ex As Exception - ' LOGGER.Debug("Column [TextOption] not found. Using Default of [Replace]") - ' oTextOption = "Replace" - 'End Try Select Case oControl.GetType() Case GetType(TextEdit) @@ -1569,24 +1521,6 @@ Public Class frmValidator btnSave.BackColor = oControlBackColor btnSave.ForeColor = oControlFontColor - 'Dim oBackColor - 'Try - ' oBackColor = Color.FromName(oResultRow.Item("BackgroundColor")) - ' oControl.BackColor = oBackColor - 'Catch ex As Exception - ' LOGGER.Debug("Column [BackgroundColor] not found. Using Default of [White]") - ' oControl.BackColor = Color.White - 'End Try - - 'Dim oForeColor As Color - 'Try - ' oForeColor = Color.FromName(oResultRow.Item("FontColor")) - ' oControl.ForeColor = oForeColor - 'Catch ex As Exception - ' LOGGER.Debug("Column [FontColor] not found. Using Default of [Black]") - ' oControl.ForeColor = Color.Black - 'End Try - Case GetType(LookupControl3) Dim oDependingLookup As LookupControl3 = oControl If oDependingLookup.Properties.MultiSelect = True Then @@ -1608,74 +1542,6 @@ Public Class frmValidator 'Exit For End If - - 'End If - - 'For Each oControl As Control In PanelValidatorControl.Controls - ' Dim oMeta As ClassControlCreator.ControlMetadata = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata) - - ' If oMeta.Guid = oControlId2Set Then - - ' LOGGER.Debug($"Got the Control22Set: {oControlId2Set}..Setting the values..") - ' Dim oCaption As Object = oResultRow.Item("Caption") - - ' Dim oTextOption = Nothing - ' Try - ' oTextOption = oResultRow.Item("TextOption") - ' Catch ex As Exception - ' LOGGER.Debug("Column [TextOption] not found. Using Default of [Replace]") - ' oTextOption = "Replace" - ' End Try - - ' Select Case oControl.GetType() - ' Case GetType(TextBox) - ' If oTextOption = "Replace" Then - ' oControl.Text = oCaption - ' Else - ' oControl.Text &= oCaption - ' End If - - ' Dim oBackColor - ' Try - ' oBackColor = Color.FromName(oResultRow.Item("BackgroundColor")) - ' oControl.BackColor = oBackColor - ' Catch ex As Exception - ' LOGGER.Debug("Column [BackgroundColor] not found. Using Default of [White]") - ' oControl.BackColor = Color.White - ' End Try - - ' Dim oForeColor As Color - ' Try - ' oForeColor = Color.FromName(oResultRow.Item("FontColor")) - ' oControl.ForeColor = oForeColor - ' Catch ex As Exception - ' LOGGER.Debug("Column [FontColor] not found. Using Default of [Black]") - ' oControl.ForeColor = Color.Black - ' End Try - - ' Case GetType(LookupControl3) - ' Dim oDependingLookup As LookupControl3 = oControl - ' If oDependingLookup.Properties.MultiSelect = True Then - ' If oTextOption = "Replace" Then - ' oDependingLookup.Properties.SelectedValues = New List(Of String) From {oCaption} - ' Else - ' oDependingLookup.Properties.SelectedValues.Add(oCaption) - ' End If - ' Else - ' oDependingLookup.Properties.SelectedValues = New List(Of String) From {oCaption} - ' End If - - ' Case Else - ' LOGGER.Warn("SetControlData used on unsupported control") - - ' End Select - - ' oFound = True - ' Exit For - ' End If - - 'Next - If oFound = False Then LOGGER.Debug($"Could not find the Control2Set with ID {oControlGUID2Set} on panel!!!") End If @@ -1683,7 +1549,7 @@ Public Class frmValidator LOGGER.Error(ex) LOGGER.Warn($"Error while Control2Set for [{oControlname2Set}]: " & ex.Message) Finally - _SetControlValue_in_action = False + _SetControlValue_In_Action = False End Try Next End Sub @@ -1704,14 +1570,14 @@ Public Class frmValidator Dim oDEPENDING_GUID = oRowDependingControl.Item("GUID") Dim oDEPENDING_CtrlName = oRowDependingControl.Item("NAME") LOGGER.Debug($"Control {oDEPENDING_CtrlName} is depending on lookUp {oLOOKUPName}..") - If _dependingControl_in_action = True Then + If _DependingControl_In_Action = True Then LOGGER.Debug($"..but _dependingControl_in_action = True ==> Exit Sub!") Exit Sub End If If Not IsDBNull(oRowDependingControl.Item("CONNECTION_ID")) And Not IsDBNull(oRowDependingControl.Item("SQL_UEBERPRUEFUNG")) Then Dim oSqlCommand = IIf(IsDBNull(oRowDependingControl.Item("SQL_UEBERPRUEFUNG")), "", oRowDependingControl.Item("SQL_UEBERPRUEFUNG")) oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) - _dependingControl_in_action = True + _DependingControl_In_Action = True 'Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oRowDependingControl.Item("CONNECTION_ID"), $"LookupControl_DependingControls - oControlID: {oControlID}") Dim oDTDEPENDING_RESULT As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSqlCommand, DatabaseType.ECM) With { .ConnectionId = oRowDependingControl.Item("CONNECTION_ID") @@ -1727,7 +1593,7 @@ Public Class frmValidator Case GetType(TextEdit).ToString Try Dim oValue As Object = oDTDEPENDING_RESULT.Rows(0).Item(0) - oValue = GenericEx.NotNull(Of Object)(oValue, Nothing) + oValue = ObjectEx.NotNull(Of Object)(oValue, Nothing) Try 'oControl.Text = oValue DirectCast(oControl, TextEdit).EditValue = oValue @@ -1784,7 +1650,7 @@ Public Class frmValidator End Select - _dependingControl_in_action = False + _DependingControl_In_Action = False Exit For End If @@ -1795,10 +1661,10 @@ Public Class frmValidator End If Catch ex As Exception LOGGER.Warn($"Error while setting depending control-value for [{oDEPENDING_CtrlName}]: " & ex.Message) - _dependingControl_in_action = False + _DependingControl_In_Action = False End Try SendKeys.Send("{TAB}") - ControlHandleStarted = True + _ControlHandleStarted = True Else LOGGER.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") End If @@ -1826,14 +1692,14 @@ Public Class frmValidator Dim oDEPENDING_GUID = oRowDependingControl.Item("GUID") Dim oDEPENDING_CtrlName = oRowDependingControl.Item("NAME") LOGGER.Debug($"Control {oDEPENDING_CtrlName} is depending on lookUp {oCheckboxname}..") - If _dependingControl_in_action = True Then + If _DependingControl_In_Action = True Then LOGGER.Debug($"..but _dependingControl_in_action = True ==> Exit Sub!") Exit Sub End If If Not IsDBNull(oRowDependingControl.Item("CONNECTION_ID")) And Not IsDBNull(oRowDependingControl.Item("SQL_UEBERPRUEFUNG")) Then Dim oSqlCommand = IIf(IsDBNull(oRowDependingControl.Item("SQL_UEBERPRUEFUNG")), "", oRowDependingControl.Item("SQL_UEBERPRUEFUNG")) oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) - _dependingControl_in_action = True + _DependingControl_In_Action = True 'Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oRowDependingControl.Item("CONNECTION_ID"), $"CheckBox_DependingControls - oControlID: {oControlID}") Dim oDTDEPENDING_RESULT As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSqlCommand, DatabaseType.ECM) With { .ConnectionId = oRowDependingControl.Item("CONNECTION_ID") @@ -1850,7 +1716,7 @@ Public Class frmValidator Case GetType(TextEdit).ToString Try Dim oValue As Object = oDTDEPENDING_RESULT.Rows(0).Item(0) - oValue = GenericEx.NotNull(Of Object)(oValue, Nothing) + oValue = ObjectEx.NotNull(Of Object)(oValue, Nothing) Try 'oControl.Text = oValue DirectCast(oControl, TextEdit).EditValue = oValue @@ -1906,7 +1772,7 @@ Public Class frmValidator End Select - _dependingControl_in_action = False + _DependingControl_In_Action = False Exit For End If @@ -1916,10 +1782,10 @@ Public Class frmValidator End If Catch ex As Exception LOGGER.Warn($"Error while setting depending control-value for [{oDEPENDING_CtrlName}]: " & ex.Message) - _dependingControl_in_action = False + _DependingControl_In_Action = False End Try SendKeys.Send("{TAB}") - ControlHandleStarted = True + _ControlHandleStarted = True Else LOGGER.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") End If @@ -1948,12 +1814,12 @@ Public Class frmValidator Dim oDEPENDING_COLUMN = oRow.Item("SPALTENNAME") Dim oSqlCommand = oRow.Item("SQL_COMMAND") Dim oAdvancedLookup = oRow.Item("ADVANCED_LOOKUP") - If _dependingColumn_in_action = True Then + If _DependingColumn_In_Action = True Then Exit Sub End If oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) - _dependingColumn_in_action = True + _DependingColumn_In_Action = True Try 'Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oCONNID, $"LookupControl_DependingColumn - oDEPENDING_CONTROL_ID: {oDEPENDING_CONTROL_ID}") Dim oDTDEPENDING_RESULT As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSqlCommand, DatabaseType.ECM) With { @@ -1967,7 +1833,7 @@ Public Class frmValidator If oControlId = oDEPENDING_CONTROL_ID Then ControlCreator.GridTables_CacheDatatableForColumn(oControlId, oDEPENDING_COLUMN, oSqlCommand, oCONNID, oAdvancedLookup) - _dependingColumn_in_action = False + _DependingColumn_In_Action = False Exit For End If Next @@ -1975,7 +1841,7 @@ Public Class frmValidator Catch ex As Exception LOGGER.Error(ex) - _dependingColumn_in_action = False + _DependingColumn_In_Action = False End Try Next End If @@ -1992,13 +1858,13 @@ Public Class frmValidator Dim oSqlCommand = oRow.Item("SQL_COMMAND") Dim oAdvancedLookup = oRow.Item("ADVANCED_LOOKUP") - If _dependingColumn_in_action = True Then + If _DependingColumn_In_Action = True Then Exit Sub End If oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) - _dependingColumn_in_action = True + _DependingColumn_In_Action = True Try 'Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oCONNID, $"CheckBox_DependingColumn - oDEPENDING_CONTROL_ID: {oDEPENDING_CONTROL_ID}") Dim oDTDEPENDING_RESULT As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSqlCommand, DatabaseType.ECM) With { @@ -2011,7 +1877,7 @@ Public Class frmValidator Dim oControlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_CONTROL_ID Then ControlCreator.GridTables_CacheDatatableForColumn(oControlId, oDEPENDING_COLUMN, oSqlCommand, oCONNID, oAdvancedLookup) - _dependingColumn_in_action = False + _DependingColumn_In_Action = False Exit For End If Next @@ -2019,7 +1885,7 @@ Public Class frmValidator Catch ex As Exception LOGGER.Error(ex) - _dependingColumn_in_action = False + _DependingColumn_In_Action = False End Try Next End If @@ -2038,7 +1904,7 @@ Public Class frmValidator .FilterExpression = String.Format("CONTROL_ACTIVE = 1 AND PROFIL_ID = {0} And SQL_UEBERPRUEFUNG Like '%{1}%'", CURRENT_ProfilGUID, oCombobox.Name) }) If Not IsNothing(DT) And DT.Rows.Count > 0 Then - If _dependingControl_in_action = True Then + If _DependingControl_In_Action = True Then Exit Sub End If Dim _Step = 0 @@ -2053,11 +1919,11 @@ Public Class frmValidator sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, PanelValidatorControl, True) _Step = 3 - _dependingControl_in_action = True + _DependingControl_In_Action = True _Step = 4 Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1)) _Step = 5 - _dependingControl_in_action = False + _DependingControl_In_Action = False End If Catch ex As Exception @@ -2076,14 +1942,14 @@ Public Class frmValidator LOGGER.Error(ex) LOGGER.Info("Unexpected Error in Eventhandler Variable SQL Result ComboBox - ERROR: " & ex.Message) End Try - ControlHandleStarted = True + _ControlHandleStarted = True End If End If End Sub Private Sub Controls2beEnabled(pControlName As String) Try ' 18.10.2021: ENABLE_SQL nicht beim Form Load verarbeiten - If FormLoaded = False Then + If _FormLoaded = False Then Exit Sub End If @@ -2099,14 +1965,14 @@ Public Class frmValidator Dim oENABLE_GUID = oRowEnablingControl.Item("GUID") Dim oENABLE_CtrlName = oRowEnablingControl.Item("NAME") LOGGER.Debug($"Control {oENABLE_CtrlName} is depending on Control: {pControlName}..") - If _dependingControl_in_action = True Then + If _DependingControl_In_Action = True Then LOGGER.Debug($"..but _dependingControl_in_action = True ==> Exit Sub!") Exit Sub End If If Not IsDBNull(oRowEnablingControl.Item("CONNECTION_ID")) And Not IsDBNull(oRowEnablingControl.Item("SQL_ENABLE")) Then Dim oSqlCommand = IIf(IsDBNull(oRowEnablingControl.Item("SQL_ENABLE")), "", oRowEnablingControl.Item("SQL_ENABLE")) oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) - _dependingControl_in_action = True + _DependingControl_In_Action = True Dim oConnectionId As Integer = oRowEnablingControl.Item("CONNECTION_ID") @@ -2122,7 +1988,7 @@ Public Class frmValidator oFound = True LOGGER.Debug($"Got the depending control ID:{oENABLE_GUID}..Setting enabled/Disabled...") oControl.Enabled = oENABLERESULT - _dependingControl_in_action = False + _DependingControl_In_Action = False Exit For End If @@ -2133,7 +1999,7 @@ Public Class frmValidator End If Catch ex As Exception LOGGER.Warn($"Error while setting enabling control-value for [{oENABLE_CtrlName}]: " & ex.Message) - _dependingControl_in_action = False + _DependingControl_In_Action = False End Try Else LOGGER.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") @@ -2276,12 +2142,11 @@ Public Class frmValidator Public Sub OnDTPValueChanged(sender As System.Object, e As System.EventArgs) Dim dtp As DateTimePicker = sender If _Indexe_Loaded = True Then - ValueDTP = dtp.Value If dtp.Name = last_control.Name Then ' Abschluss() Else SendKeys.Send("{TAB}") - ControlHandleStarted = True + _ControlHandleStarted = True End If End If End Sub @@ -2410,8 +2275,7 @@ Public Class frmValidator Try Dim oNormalizedPath = WINDREAM_MOD.GetNormalizedPath(oWMOwnPath, 1) CURRENT_WMFILE = WINDREAM_MOD.Session.GetWMObjectByPath(WMEntity.WMEntityDocument, oNormalizedPath) - WMDocFileString = oNormalizedPath - LOGGER.Debug("WMDocFileString: " & WMDocFileString) + LOGGER.Debug("CURRENT_WMFILE: [{0}]", CURRENT_WMFILE) Return True Catch ex As Exception Dim _err1 As Boolean = False @@ -2421,7 +2285,6 @@ Public Class frmValidator LOGGER.Info("Error Number: " & Err.Number.ToString) errormessage = $"Could not create a WMObject(1) for [{oWMOwnPath}]!" frmError.ShowDialog() - WMDocFileString = "" Return False End Try @@ -2458,13 +2321,11 @@ Public Class frmValidator End If WMDocPathWindows = oResult - OLD_Document_Path = WMDocPathWindows CURRENT_DOC_PATH = WMDocPathWindows LOGGER.Info($"GetWMDocPathWindows CURRENT_DOC_PATH: {CURRENT_DOC_PATH}") Return True Catch ex As Exception WMDocPathWindows = "" - OLD_Document_Path = "" CURRENT_DOC_PATH = "" errormessage = $"Unexpected error in GetDocPathWindows: [{ex.Message}]!" frmError.ShowDialog() @@ -2493,7 +2354,6 @@ Public Class frmValidator activate_controls(False) oErrMsgMissingInput = "" WMDocPathWindows = "" - WMDocFileString = "" 'Me.lblerror.Visible = False @@ -2505,7 +2365,6 @@ Public Class frmValidator CURRENT_WMFILE = Nothing Else LOGGER.Debug("Following Document ") - docCounter += 1 End If ' Controls nicht beim ersten Laden leeren @@ -3023,7 +2882,7 @@ Public Class frmValidator Dim oSourceIndexName As String = oControlRow.Item("INDEX_NAME") ' Wenn kein defaultValue existiert, leeren String setzen - Dim oDefaultValue As String = GenericEx.NotNull(oControlRow.Item("DEFAULT_VALUE"), String.Empty) + Dim oDefaultValue As String = ObjectEx.NotNull(oControlRow.Item("DEFAULT_VALUE"), String.Empty) oIndexName = oSourceIndexName oControName = oControl.Name Dim oLoadIndex As Boolean = oControlRow.Item("LOAD_IDX_VALUE") @@ -3084,9 +2943,9 @@ Public Class frmValidator 'oFormattedValue = ClassFormat.GetFormattedValue(oControl.Name, oValueFromSource, oFormatString) If Not IsNothing(oFormattedValue) And oFormattedValue <> String.Empty Then - oTextBox.EditValue = GenericEx.NotNull(oFormattedValue, oDefaultValue) + oTextBox.EditValue = ObjectEx.NotNull(oFormattedValue, oDefaultValue) Else - oTextBox.EditValue = GenericEx.NotNull(oValueFromSource, oDefaultValue) + oTextBox.EditValue = ObjectEx.NotNull(oValueFromSource, oDefaultValue) End If Try @@ -3568,13 +3427,11 @@ Public Class frmValidator LOGGER.Debug("DATE konnte umgewandelt werden") Catch ex As Exception LOGGER.Error(ex) - ValueDTP = tempdate LOGGER.Debug("DATE wurde auf heute gesetzt") End Try DTP.Text = tempdate Else LOGGER.Debug("DATE ist leer") - ValueDTP = tempdate DTP.Text = tempdate End If Catch ex As Exception @@ -3742,8 +3599,8 @@ Public Class frmValidator Load_Next_Document(True) Controls2B_EnDisabled_on_Load() - _dependingControl_in_action = False - _dependingColumn_in_action = False + _DependingControl_In_Action = False + _DependingColumn_In_Action = False ' 18.10.2021: Brauchen Sie das Überhaupt?? 'Controls2beDisabled() @@ -3753,7 +3610,7 @@ Public Class frmValidator _frmValidatorSearch?.BringToFront() End If - FormLoaded = True + _FormLoaded = True Try If USER_GHOST_MODE_ACTIVE Then BbtnitmSave.Enabled = False @@ -3944,7 +3801,7 @@ Public Class frmValidator Sub Finish_WFStep(Optional includeFI As Boolean = True) btnSave.Enabled = False LOGGER.Debug("Abschluss für Dok: " & CURRENT_DOC_PATH & " gestartet") - ItemWorked = True + _ItemWorked = True Dim oErrorOcurred As Boolean = False If OverrideAll = False Then 'Eingaben auf Form überprüfen @@ -3987,7 +3844,7 @@ Public Class frmValidator My.Settings.Save() frmError.ShowDialog() oErrorOcurred = True - ItemWorked = False + _ItemWorked = False End If If Not IsNothing(oSQLCommand) Then Dim oResultfromSQL As Object = DatabaseFallback.GetScalarValueWithConnection(oSQLCommand, oConnectionID) @@ -3999,7 +3856,7 @@ Public Class frmValidator My.Settings.Save() frmError.ShowDialog() oErrorOcurred = True - ItemWorked = False + _ItemWorked = False Else LOGGER.Warn($"FinalIndexResult from SQL is DBNull - AttributeName [{oFinalIndexRow.Item("INDEXNAME")}] - oContinueOnIndifferentState = true, Continuing with next Attribute and Replacing with empty String") oResultfromSQL = "" @@ -4013,7 +3870,7 @@ Public Class frmValidator My.Settings.Save() frmError.ShowDialog() oErrorOcurred = True - ItemWorked = False + _ItemWorked = False Else LOGGER.Warn($"FinalIndexResult from SQL is EmptyValue - AttributeName [{oFinalIndexRow.Item("INDEXNAME")}] - oContinueOnIndifferentState = true, So continuing with next Attribute") Continue For @@ -4058,7 +3915,7 @@ Public Class frmValidator My.Settings.Save() frmError.ShowDialog() oErrorOcurred = True - ItemWorked = False + _ItemWorked = False End If Else LOGGER.Debug("Now the final indexing...") @@ -4090,12 +3947,12 @@ Public Class frmValidator My.Settings.Save() frmError.ShowDialog() oErrorOcurred = True - ItemWorked = False + _ItemWorked = False End If End If If oErrorOcurred = True Then - ItemWorked = False + _ItemWorked = False Exit For End If Next @@ -4251,7 +4108,7 @@ Public Class frmValidator My.Settings.Save() frmError.ShowDialog() oErrorOcurred = True - ItemWorked = False + _ItemWorked = False End If End If @@ -4265,7 +4122,7 @@ Public Class frmValidator My.Settings.Save() frmError.ShowDialog() oErrorOcurred = True - ItemWorked = False + _ItemWorked = False LOGGER.Info("Unexpected error in Finish: " & ex.Message, True) Exit Sub End Try @@ -4275,7 +4132,7 @@ Public Class frmValidator errormessage = oErrMsgMissingInput frmError.ShowDialog() oErrorOcurred = True - ItemWorked = False + _ItemWorked = False Exit Sub End If Else @@ -4288,7 +4145,7 @@ Public Class frmValidator End If If oErrorOcurred = True Then MsgBox("Unhandled error occured ... please check your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE) - ItemWorked = False + _ItemWorked = False Else LOGGER.Debug("Validation of document ended successfully!") Dim oPROCSQL = $"EXEC PRPM_CHECK_NEXT_WF {CURRENT_DOC_GUID}" @@ -4443,8 +4300,8 @@ Public Class frmValidator End If oControlId = oControlRow.Item("GUID") - Dim oRegexMatch As String = GenericEx.NotNull(oControlRow.Item("REGEX_MATCH"), String.Empty) - Dim oRegexMessage As String = GenericEx.NotNull(oControlRow.Item("REGEX_MESSAGE_DE"), String.Empty) + Dim oRegexMatch As String = ObjectEx.NotNull(oControlRow.Item("REGEX_MATCH"), String.Empty) + Dim oRegexMessage As String = ObjectEx.NotNull(oControlRow.Item("REGEX_MESSAGE_DE"), String.Empty) oControlName = oControlRow.Item("CTRL_NAME") Dim oOVERWRITE_DATA = oControlRow.Item("OVERWRITE_DATA") @@ -5265,7 +5122,7 @@ Public Class frmValidator Dim oValueList As New List(Of String) For Each item As Object In oRow.ItemArray - item = GenericEx.NotNull(item, String.Empty) + item = ObjectEx.NotNull(item, String.Empty) ' Convert to string using InvariantCulture, so converting back from string does not screw up values If TypeOf item IsNot String Then item = String.Format(CultureInfo.InvariantCulture, "{0}", item) @@ -5416,35 +5273,6 @@ Public Class frmValidator Finish_WFStep() End Sub - Private Sub btnNavigatorfirst_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) - If e.Button = Windows.Forms.MouseButtons.Left Then - navStep = "first" - End If - End Sub - - Private Sub btnNavigatorprevious_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) - If e.Button = Windows.Forms.MouseButtons.Left Then - navStep = "previous" - End If - End Sub - - Private Sub btnNavigatornext_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) - If e.Button = Windows.Forms.MouseButtons.Left Then - navStep = "next" - End If - End Sub - - Private Sub btnNavigatorlast_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) - If e.Button = Windows.Forms.MouseButtons.Left Then - navStep = "last" - End If - End Sub - - Private Sub frmValidation_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown - If e.Button = Windows.Forms.MouseButtons.Left Then - navStep = Nothing - End If - End Sub Sub Datei_ueberspringen() Try LOGGER.Debug("Skipping document....(Datei_ueberspringen)") @@ -5606,7 +5434,7 @@ Public Class frmValidator End Sub Private Sub frmValidator_Resize(sender As Object, e As EventArgs) Handles Me.Resize - If FormLoaded = False Then + If _FormLoaded = False Then Exit Sub End If @@ -5860,7 +5688,7 @@ Public Class frmValidator Private Sub BarCheckItemLoadOnClick_CheckedChanged(sender As Object, e As ItemClickEventArgs) Handles Attmnt_bbtnitm_LoadonClick.CheckedChanged - If FormLoaded = False Then + If _FormLoaded = False Then Exit Sub End If CONFIG.Config.ADDITIONAL_SEARCHES_LOAD_ONCLICK = Attmnt_bbtnitm_LoadonClick.Checked From 12c36eeb92d4e1d47ea4f85d57b7474542cdb7c6 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 13 Jun 2023 09:12:45 +0200 Subject: [PATCH 12/13] WIP move grid functions to extra class --- app/TaskFlow/ClassControlCreator.vb | 294 +++++++-------------- app/TaskFlow/ControlCreator/Constants.vb | 21 ++ app/TaskFlow/ControlCreator/GridControl.vb | 215 +++++++++++++++ app/TaskFlow/TaskFlow.vbproj | 2 + app/TaskFlow/frmValidator.vb | 3 - 5 files changed, 332 insertions(+), 203 deletions(-) create mode 100644 app/TaskFlow/ControlCreator/Constants.vb create mode 100644 app/TaskFlow/ControlCreator/GridControl.vb diff --git a/app/TaskFlow/ClassControlCreator.vb b/app/TaskFlow/ClassControlCreator.vb index b016cad..43c7b8d 100644 --- a/app/TaskFlow/ClassControlCreator.vb +++ b/app/TaskFlow/ClassControlCreator.vb @@ -155,19 +155,6 @@ Public Class ClassControlCreator ' ----------------------- NEW CONTROLS ----------------------- - 'Public Function CreateNewTextBox(location As Point) As TextBox - ' Dim control As New TextBox With { - ' .Name = $"{PREFIX_TEXTBOX}_{clsTools.ShortGuid()}", - ' .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT), - ' .Location = location, - ' .ReadOnly = True, - ' .BackColor = Color.White, - ' .Cursor = Cursors.Hand - ' } - - ' Return control - 'End Function - Public Function CreateNewTextBox(location As Point) As TextEdit Dim control As New TextEdit With { .Name = $"{PREFIX_TEXTBOX}_{clsTools.ShortGuid()}", @@ -264,9 +251,9 @@ Public Class ClassControlCreator .Name = $"{PREFIX_TABLE}_{clsTools.ShortGuid}", .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT_TABLE), .Cursor = Cursors.Hand, - .Location = location + .Location = location, + .UseEmbeddedNavigator = True } - oControl.UseEmbeddedNavigator = True oControl.ForceInitialize() Dim oView As GridView = oControl.DefaultView oView.OptionsView.ShowGroupPanel = False @@ -302,37 +289,6 @@ Public Class ClassControlCreator ' ----------------------- EXISITING CONTROLS ----------------------- - 'Public Function CreateExistingTextbox(oControlRow As DataRow, designMode As Boolean) As TextBox - ' Try - ' Dim control As TextBox = CreateBaseControl(New TextBox(), oControlRow, designMode) - - ' control.BackColor = Color.White - - ' If oControlRow.Item("HEIGHT") > 27 Then - ' control.Multiline = True - - ' End If - - ' control.Height = oControlRow.Item("HEIGHT") - ' control.Width = oControlRow.Item("WIDTH") - - ' If Not designMode Then - ' control.AcceptsReturn = True - ' control.ReadOnly = oControlRow.Item("READ_ONLY") - ' control.TabStop = Not oControlRow.Item("READ_ONLY") - ' control.BackColor = IIf(oControlRow.Item("READ_ONLY"), Color.LightGray, Color.White) - ' control.ScrollBars = ScrollBars.Vertical - ' Else - ' control.ReadOnly = True - ' End If - - ' Return control - ' Catch ex As Exception - ' Logger.Error(ex) - ' End Try - - 'End Function - Public Function CreateExistingTextbox(oControlRow As DataRow, designMode As Boolean) As BaseEdit Try Dim oHeight = oControlRow.ItemEx("HEIGHT", 0) @@ -349,17 +305,11 @@ Public Class ClassControlCreator oControl = CreateBaseControl(New TextEdit(), oControlRow, designMode) End If - 'Dim oControl As TextEdit = CreateBaseControl(New TextEdit(), oControlRow, designMode) Dim oMeta As ControlMetadata = oControl.Tag oControl.BackColor = Color.White oMeta.BackColor = Color.White - ' TODO: Add separate function for MultilineEdit - 'If oControlRow.Item("HEIGHT") > 27 Then - ' control.Multiline = True - 'End If - oControl.Height = oHeight oControl.Width = oWidth @@ -380,10 +330,6 @@ Public Class ClassControlCreator oControl.Properties.EditFormat.FormatType = FormatType.Custom oControl.Properties.EditFormat.FormatString = ClassFormat.GetFormatString(oFormatString) End If - - 'TODO: Find alternatives for TextEdit - 'control.ScrollBars = ScrollBars.Vertical - 'control.AcceptsReturn = True Else oControl.ReadOnly = True End If @@ -391,6 +337,7 @@ Public Class ClassControlCreator Return oControl Catch ex As Exception Logger.Error(ex) + Return Nothing End Try End Function @@ -407,6 +354,7 @@ Public Class ClassControlCreator Return control End Function + Public Function CreateExistingButton(row As DataRow, designMode As Boolean) As Button Dim oControl As Button = CreateBaseControl(New Button(), row, designMode) @@ -524,9 +472,9 @@ Public Class ClassControlCreator End Function Public Function CreateExistingGridControl(row As DataRow, DT_MY_COLUMNS As DataTable, designMode As Boolean) As GridControl + Dim oGridControlCreator = New ControlCreator.GridControl(LogConfig, GridTables) Dim oControl As GridControl = CreateBaseControl(New GridControl(), row, designMode) Dim oControlId = DirectCast(oControl.Tag, ControlMetadata).Guid - Dim oDatatable As New DataTable Dim oView As GridView oControl.ForceInitialize() @@ -593,64 +541,8 @@ Public Class ClassControlCreator GridTables.Add(oControlId, New Dictionary(Of String, RepositoryItem)()) End If - For Each oRow As DataRow In DT_MY_COLUMNS.Rows - ' Create Columns in Datatable - - Dim oColumn = New DataColumn() With { - .ColumnName = oRow.Item("SPALTENNAME"), - .Caption = oRow.Item("SPALTEN_HEADER_LANG"), - .ReadOnly = False - } - Select Case oRow.Item("TYPE_COLUMN") - Case CONTROL_TYPE_TEXT - oColumn.DataType = GetType(String) - Case CONTROL_TYPE_INTEGER - oColumn.DataType = GetType(Integer) - Case CONTROL_TYPE_DOUBLE - oColumn.DataType = GetType(Double) - Case CONTROL_TYPE_CURRENCY - oColumn.DataType = GetType(Double) - Case CONTROL_TYPE_BOOLEAN - oColumn.DataType = GetType(Boolean) - Case Else - oColumn.DataType = GetType(String) - End Select - - oDatatable.Columns.Add(oColumn) - - ' Fetch and cache Combobox results - Dim oConnectionId As Integer = NotNull(oRow.Item("CONNECTION_ID"), 0) - Dim oSqlCommand As String = NotNull(oRow.Item("SQL_COMMAND"), "") - - If oConnectionId > 0 And oSqlCommand <> "" Then - Try - Dim oComboboxDataTable As DataTable = Nothing - Dim oColumnName As String = oRow.Item("SPALTENNAME") - Logger.Debug("Working on SQL for Column[{0}]...", oColumnName) - If Not clsPatterns.HasComplexPatterns(oSqlCommand) Then - Logger.Debug("SQL has no complex patterns!") - 'oComboboxDataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oConnectionId) - oComboboxDataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSqlCommand, DatabaseType.ECM) With { - .ConnectionId = oConnectionId - }) - Else - Logger.Debug("...has complex patterns!!") - End If - - Dim oRepositoryItem = GridTables_GetRepositoryItemForColumn(oColumnName, oComboboxDataTable, oRow.Item("ADVANCED_LOOKUP")) - - If GridTables.Item(oControlId).ContainsKey(oColumnName) Then - GridTables.Item(oControlId).Item(oColumnName) = oRepositoryItem - Else - GridTables.Item(oControlId).Add(oColumnName, oRepositoryItem) - End If - Catch ex As Exception - Logger.Warn("Could not load data for column {0} in control {1}", oRow.Item("SPALTENNAME"), oControl.Name) - Logger.Error(ex) - End Try - End If - Next - + Dim oDataTable = oGridControlCreator.CreateGridColumns(DT_MY_COLUMNS) + GridTables = oGridControlCreator.FillGridTables(DT_MY_COLUMNS, oControlId, oControl.Name) oView.PopulateColumns(oDatatable) oControl.DataSource = oDatatable oControl.RefreshDataSource() @@ -679,79 +571,80 @@ Public Class ClassControlCreator End Try End If - - Dim oShouldDisplayFooter As Boolean = False - - For Each oCol As GridColumn In oView.Columns - Dim oColumnData As DataRow = DT_MY_COLUMNS. - Select($"SPALTENNAME = '{oCol.FieldName}'"). - FirstOrDefault() - - If oColumnData Is Nothing Then - Continue For - End If - - Dim oSequence As Integer = oColumnData.Item("SEQUENCE") - oCol.VisibleIndex = oSequence - - Dim oColumnType As String = oColumnData.Item("TYPE_COLUMN") - - Select Case oColumnType - Case "INTEGER" - oCol.DisplayFormat.FormatType = FormatType.Custom - oCol.DisplayFormat.FormatString = "N0" - - Case "DOUBLE" - oCol.DisplayFormat.FormatType = FormatType.Custom - oCol.DisplayFormat.FormatString = "N2" - - Case "CURRENCY" - oCol.DisplayFormat.FormatType = FormatType.Custom - oCol.DisplayFormat.FormatString = "C2" - End Select - - Dim oSummaryFunction As String = oColumnData.Item("SUMMARY_FUNCTION") - - Select Case oSummaryFunction - Case AGGREGATE_TOTAL_INTEGER - oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum - oCol.SummaryItem.DisplayFormat = "SUM: {0:N0}" - oShouldDisplayFooter = True - - Case AGGREGATE_TOTAL_FLOAT - oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum - oCol.SummaryItem.DisplayFormat = "SUM: {0:N2}" - oShouldDisplayFooter = True - - Case AGGREGATE_TOTAL_CURRENCY - oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum - oCol.SummaryItem.DisplayFormat = "SUM: {0:C2}" - oShouldDisplayFooter = True - - Case AGGREGATE_TOTAL_AVG - oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Average - oCol.SummaryItem.DisplayFormat = "AVG: {0}" - oShouldDisplayFooter = True - - Case AGGREGATE_TOTAL_MAX - oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Max - oCol.SummaryItem.DisplayFormat = "MAX: {0}" - oShouldDisplayFooter = True - - Case AGGREGATE_TOTAL_MIN - oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Min - oCol.SummaryItem.DisplayFormat = "MIN: {0}" - oShouldDisplayFooter = True - - Case AGGREGATE_TOTAL_COUNT - oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Count - oCol.SummaryItem.DisplayFormat = "NUM: {0}" - oShouldDisplayFooter = True - - End Select - Next - - oView.OptionsView.ShowFooter = oShouldDisplayFooter + oGridControlCreator.ConfigureViewColumns(DT_MY_COLUMNS, oView) + + ' Dim oShouldDisplayFooter As Boolean = False + ' + 'For Each oCol As GridColumn In oView.Columns + ' Dim oColumnData As DataRow = DT_MY_COLUMNS. + ' Select($"SPALTENNAME = '{oCol.FieldName}'"). + ' FirstOrDefault() + + ' If oColumnData Is Nothing Then + ' Continue For + ' End If + + ' Dim oSequence As Integer = oColumnData.Item("SEQUENCE") + ' oCol.VisibleIndex = oSequence + + ' Dim oColumnType As String = oColumnData.Item("TYPE_COLUMN") + + ' Select Case oColumnType + ' Case "INTEGER" + ' oCol.DisplayFormat.FormatType = FormatType.Custom + ' oCol.DisplayFormat.FormatString = "N0" + + ' Case "DOUBLE" + ' oCol.DisplayFormat.FormatType = FormatType.Custom + ' oCol.DisplayFormat.FormatString = "N2" + + ' Case "CURRENCY" + ' oCol.DisplayFormat.FormatType = FormatType.Custom + ' oCol.DisplayFormat.FormatString = "C2" + ' End Select + + ' Dim oSummaryFunction As String = oColumnData.Item("SUMMARY_FUNCTION") + + ' Select Case oSummaryFunction + ' Case AGGREGATE_TOTAL_INTEGER + ' oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum + ' oCol.SummaryItem.DisplayFormat = "SUM: {0:N0}" + ' oShouldDisplayFooter = True + + ' Case AGGREGATE_TOTAL_FLOAT + ' oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum + ' oCol.SummaryItem.DisplayFormat = "SUM: {0:N2}" + ' oShouldDisplayFooter = True + + ' Case AGGREGATE_TOTAL_CURRENCY + ' oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum + ' oCol.SummaryItem.DisplayFormat = "SUM: {0:C2}" + ' oShouldDisplayFooter = True + + ' Case AGGREGATE_TOTAL_AVG + ' oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Average + ' oCol.SummaryItem.DisplayFormat = "AVG: {0}" + ' oShouldDisplayFooter = True + + ' Case AGGREGATE_TOTAL_MAX + ' oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Max + ' oCol.SummaryItem.DisplayFormat = "MAX: {0}" + ' oShouldDisplayFooter = True + + ' Case AGGREGATE_TOTAL_MIN + ' oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Min + ' oCol.SummaryItem.DisplayFormat = "MIN: {0}" + ' oShouldDisplayFooter = True + + ' Case AGGREGATE_TOTAL_COUNT + ' oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Count + ' oCol.SummaryItem.DisplayFormat = "NUM: {0}" + ' oShouldDisplayFooter = True + + ' End Select + 'Next + ' + ' oView.OptionsView.ShowFooter = oShouldDisplayFooter AddHandler oView.InitNewRow, Sub(sender As Object, e As InitNewRowEventArgs) Try @@ -817,18 +710,7 @@ Public Class ClassControlCreator AddHandler oView.ShowingEditor, AddressOf View_ShowingEditor AddHandler oView.ShownEditor, AddressOf View_ShownEditor AddHandler oView.ValidateRow, AddressOf View_ValidateRow - AddHandler oControl.LostFocus, Sub(sender As GridControl, e As EventArgs) - Dim oView2 As GridView = sender.FocusedView - - ' 19.08.2022: - ' Calling UpdateCurrentRow when newRowModified Is true - ' leads to some weird jumping of focus in the current cell. - ' This seems to fix it. - If newRowModified = False Then - oView2.UpdateCurrentRow() - End If - - End Sub + AddHandler oControl.LostFocus, AddressOf Control_LostFocus ' 08.11.2021: Fix editor being empty on first open oView.FocusInvalidRow() @@ -838,6 +720,18 @@ Public Class ClassControlCreator Private newRowModified As Boolean = False + Private Sub Control_LostFocus(sender As GridControl, e As EventArgs) + Dim oView2 As GridView = sender.FocusedView + + ' 19.08.2022: + ' Calling UpdateCurrentRow when newRowModified Is true + ' leads to some weird jumping of focus in the current cell. + ' This seems to fix it. + If newRowModified = False Then + oView2.UpdateCurrentRow() + End If + End Sub + Private Sub View_ShowingEditor(sender As Object, e As CancelEventArgs) Dim view As GridView = TryCast(sender, GridView) Logger.Debug("Showing editor.") diff --git a/app/TaskFlow/ControlCreator/Constants.vb b/app/TaskFlow/ControlCreator/Constants.vb new file mode 100644 index 0000000..fd5c4d3 --- /dev/null +++ b/app/TaskFlow/ControlCreator/Constants.vb @@ -0,0 +1,21 @@ +Namespace ControlCreator + Public Class Constants + Public Const CONTROL_TYPE_TEXT = "TEXT" + Public Const CONTROL_TYPE_INTEGER = "INTEGER" + Public Const CONTROL_TYPE_BOOLEAN = "BOOLEAN" + Public Const CONTROL_TYPE_DOUBLE = "DOUBLE" + Public Const CONTROL_TYPE_CURRENCY = "CURRENCY" + Public Const CONTROL_TYPE_DATE = "DATE" + Public Const CONTROL_TYPE_DATETIME = "DATETIME" + + Public Const AGGREGATE_NONE = "NONE" + Public Const AGGREGATE_TOTAL_INTEGER = "TOTAL_INTEGER" + Public Const AGGREGATE_TOTAL_FLOAT = "TOTAL_FLOAT" + Public Const AGGREGATE_TOTAL_CURRENCY = "TOTAL_CURRENCY" + Public Const AGGREGATE_TOTAL_MIN = "TOTAL_MIN" + Public Const AGGREGATE_TOTAL_MAX = "TOTAL_MAX" + Public Const AGGREGATE_TOTAL_AVG = "TOTAL_AVG" + Public Const AGGREGATE_TOTAL_COUNT = "TOTAL_COUNT" + End Class + +End Namespace diff --git a/app/TaskFlow/ControlCreator/GridControl.vb b/app/TaskFlow/ControlCreator/GridControl.vb new file mode 100644 index 0000000..2bb7f8d --- /dev/null +++ b/app/TaskFlow/ControlCreator/GridControl.vb @@ -0,0 +1,215 @@ +Imports DevExpress.Utils +Imports DevExpress.XtraEditors +Imports DevExpress.XtraEditors.Repository +Imports DevExpress.XtraGrid.Columns +Imports DevExpress.XtraGrid.Views.Grid +Imports DigitalData.Controls.LookupGrid +Imports DigitalData.Modules.EDMI.API.Constants +Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback +Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.Base +Imports System.ComponentModel + +Namespace ControlCreator + Public Class GridControl + Private ReadOnly _LogConfig As LogConfig + Private ReadOnly _GridTables As Dictionary(Of Integer, Dictionary(Of String, RepositoryItem)) + + Public Sub New(pLogConfig As LogConfig, pGridTables As Dictionary(Of Integer, Dictionary(Of String, RepositoryItem))) + _LogConfig = pLogConfig + _GridTables = pGridTables + End Sub + + Public Function CreateGridColumns(pColumnTable As DataTable) As DataTable + Dim oDataTable As New DataTable + + For Each oRow As DataRow In pColumnTable.Rows + ' Create Columns in Datatable + + Dim oColumn = New DataColumn() With { + .ColumnName = oRow.Item("SPALTENNAME"), + .Caption = oRow.Item("SPALTEN_HEADER_LANG"), + .ReadOnly = False + } + Select Case oRow.Item("TYPE_COLUMN") + Case Constants.CONTROL_TYPE_TEXT + oColumn.DataType = GetType(String) + Case Constants.CONTROL_TYPE_INTEGER + oColumn.DataType = GetType(Integer) + Case Constants.CONTROL_TYPE_DOUBLE + oColumn.DataType = GetType(Double) + Case Constants.CONTROL_TYPE_CURRENCY + oColumn.DataType = GetType(Double) + Case Constants.CONTROL_TYPE_BOOLEAN + oColumn.DataType = GetType(Boolean) + Case Else + oColumn.DataType = GetType(String) + End Select + + oDataTable.Columns.Add(oColumn) + Next + + Return oDataTable + End Function + + Public Function FillGridTables(pColumnTable As DataTable, pControlId As Integer, pControlName As String) As Dictionary(Of Integer, Dictionary(Of String, RepositoryItem)) + For Each oRow As DataRow In pColumnTable.Rows + ' Fetch and cache Combobox results + Dim oConnectionId As Integer = oRow.ItemEx("CONNECTION_ID", 0) + Dim oSqlCommand As String = oRow.ItemEx("SQL_COMMAND", "") + + If oConnectionId > 0 And oSqlCommand <> "" Then + Try + Dim oComboboxDataTable As DataTable = Nothing + Dim oColumnName As String = oRow.Item("SPALTENNAME") + LOGGER.Debug("Working on SQL for Column[{0}]...", oColumnName) + If Not clsPatterns.HasComplexPatterns(oSqlCommand) Then + LOGGER.Debug("SQL has no complex patterns!") + 'oComboboxDataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oConnectionId) + oComboboxDataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSqlCommand, DatabaseType.ECM) With { + .ConnectionId = oConnectionId + }) + Else + LOGGER.Debug("...has complex patterns!!") + End If + + Dim oRepositoryItem = GridTables_GetRepositoryItemForColumn(oColumnName, oComboboxDataTable, oRow.Item("ADVANCED_LOOKUP")) + + If _GridTables.Item(pControlId).ContainsKey(oColumnName) Then + _GridTables.Item(pControlId).Item(oColumnName) = oRepositoryItem + Else + _GridTables.Item(pControlId).Add(oColumnName, oRepositoryItem) + End If + Catch ex As Exception + LOGGER.Warn("Could not load data for column {0} in control {1}", oRow.Item("SPALTENNAME"), pControlName) + LOGGER.Error(ex) + End Try + End If + Next + + Return _GridTables + End Function + + Private Function GridTables_GetRepositoryItemForColumn(pColumnName As String, pDataTable As DataTable, pIsAdvancedLookup As Boolean) As RepositoryItem + If pIsAdvancedLookup Then + + Dim oEditor = New RepositoryItemLookupControl3 + + If pDataTable IsNot Nothing Then + oEditor.DisplayMember = pDataTable.Columns.Item(0).ColumnName + oEditor.ValueMember = pDataTable.Columns.Item(0).ColumnName + oEditor.DataSource = pDataTable + End If + + Return oEditor + Else + Dim oEditor = New RepositoryItemComboBox() + Dim oItems As New List(Of String) + + AddHandler oEditor.Validating, Sub(_sender As ComboBoxEdit, _e As CancelEventArgs) + If oItems.Contains(_sender.EditValue) Then + _e.Cancel = False + Else + _e.Cancel = True + End If + + End Sub + + If pDataTable IsNot Nothing Then + For Each oRow2 As DataRow In pDataTable.Rows + Dim oValue = oRow2.Item(0) + + Try + If oRow2.ItemArray.Length > 1 Then + oValue &= $" | {oRow2.Item(1)}" + End If + Catch ex As Exception + End Try + + oEditor.Items.Add(oValue) + oItems.Add(oValue) + Next + End If + + Return oEditor + End If + End Function + + Public Sub ConfigureViewColumns(pColumnTable As DataTable, pGridView As GridView) + Dim oShouldDisplayFooter As Boolean = False + + For Each oCol As GridColumn In pGridView.Columns + Dim oColumnData As DataRow = pColumnTable. + Select($"SPALTENNAME = '{oCol.FieldName}'"). + FirstOrDefault() + + If oColumnData Is Nothing Then + Continue For + End If + + Dim oSequence As Integer = oColumnData.Item("SEQUENCE") + oCol.VisibleIndex = oSequence + + Dim oColumnType As String = oColumnData.Item("TYPE_COLUMN") + + Select Case oColumnType + Case "INTEGER" + oCol.DisplayFormat.FormatType = FormatType.Custom + oCol.DisplayFormat.FormatString = "N0" + + Case "DOUBLE" + oCol.DisplayFormat.FormatType = FormatType.Custom + oCol.DisplayFormat.FormatString = "N2" + + Case "CURRENCY" + oCol.DisplayFormat.FormatType = FormatType.Custom + oCol.DisplayFormat.FormatString = "C2" + End Select + + Dim oSummaryFunction As String = oColumnData.Item("SUMMARY_FUNCTION") + + Select Case oSummaryFunction + Case Constants.AGGREGATE_TOTAL_INTEGER + oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum + oCol.SummaryItem.DisplayFormat = "SUM: {0:N0}" + oShouldDisplayFooter = True + + Case Constants.AGGREGATE_TOTAL_FLOAT + oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum + oCol.SummaryItem.DisplayFormat = "SUM: {0:N2}" + oShouldDisplayFooter = True + + Case Constants.AGGREGATE_TOTAL_CURRENCY + oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum + oCol.SummaryItem.DisplayFormat = "SUM: {0:C2}" + oShouldDisplayFooter = True + + Case Constants.AGGREGATE_TOTAL_AVG + oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Average + oCol.SummaryItem.DisplayFormat = "AVG: {0}" + oShouldDisplayFooter = True + + Case Constants.AGGREGATE_TOTAL_MAX + oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Max + oCol.SummaryItem.DisplayFormat = "MAX: {0}" + oShouldDisplayFooter = True + + Case Constants.AGGREGATE_TOTAL_MIN + oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Min + oCol.SummaryItem.DisplayFormat = "MIN: {0}" + oShouldDisplayFooter = True + + Case Constants.AGGREGATE_TOTAL_COUNT + oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Count + oCol.SummaryItem.DisplayFormat = "NUM: {0}" + oShouldDisplayFooter = True + + End Select + Next + + pGridView.OptionsView.ShowFooter = oShouldDisplayFooter + End Sub + End Class + + +End Namespace diff --git a/app/TaskFlow/TaskFlow.vbproj b/app/TaskFlow/TaskFlow.vbproj index 351f479..8271227 100644 --- a/app/TaskFlow/TaskFlow.vbproj +++ b/app/TaskFlow/TaskFlow.vbproj @@ -282,6 +282,8 @@ + + True True diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index e6c2a61..d143fc8 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -2445,9 +2445,6 @@ Public Class frmValidator End If End If - - - FillIndexValues(first) For Each oControl As Control In PanelValidatorControl.Controls From 3d95847c61f6d47953966c92b6605b73f888e53d Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 13 Jun 2023 09:13:12 +0200 Subject: [PATCH 13/13] Version 2.4.4.2 --- app/TaskFlow/My Project/AssemblyInfo.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/TaskFlow/My Project/AssemblyInfo.vb b/app/TaskFlow/My Project/AssemblyInfo.vb index 9e49413..a3155df 100644 --- a/app/TaskFlow/My Project/AssemblyInfo.vb +++ b/app/TaskFlow/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - +