This commit is contained in:
SchreiberM 2016-04-19 11:10:28 +02:00
commit add1a19324
10 changed files with 378 additions and 315 deletions

View File

@ -82,6 +82,40 @@ Public Class ClassControlBuilder
End If End If
End Sub End Sub
Private Sub OnEnabledChanged(sender As Object, e As EventArgs)
Dim control As Control = DirectCast(sender, Control)
' Checkbox, radiobutton, label ist sonderfall
If control.GetType() = GetType(CheckBox) Or _
control.GetType() = GetType(RadioButton) Or _
control.GetType() = GetType(Label) Then
' Hier wird nur die vordergrund-farbe geändert
control.ForeColor = Color.Black
Exit Sub
End If
If control.Enabled Then
control.BackColor = Color.White
control.ForeColor = Color.Black
ElseIf control.Enabled = False Then
control.BackColor = System.Drawing.SystemColors.Info
control.ForeColor = Color.Black 'System.Drawing.SystemColors.InfoText
End If
End Sub
' Wie OnEnabledChanged, nur für TextBVi
Private Sub OnReadOnlyChanged(sender As Object, e As EventArgs)
Dim control As TextBox = DirectCast(sender, TextBox)
If control.ReadOnly = False Then
control.BackColor = Color.White
control.ForeColor = Color.Black
ElseIf control.ReadOnly = True Then
control.BackColor = System.Drawing.SystemColors.Info
control.ForeColor = Color.Black 'System.Drawing.SystemColors.InfoText
End If
End Sub
Public Sub OnTextBoxFocus(sender As Object, ByVal e As EventArgs) Public Sub OnTextBoxFocus(sender As Object, ByVal e As EventArgs)
Dim box As TextBox = sender Dim box As TextBox = sender
box.BackColor = Color.LemonChiffon box.BackColor = Color.LemonChiffon
@ -96,11 +130,11 @@ Public Class ClassControlBuilder
End Sub End Sub
Public Sub OnComboBoxFocus(sender As Object, ByVal e As EventArgs) Public Sub OnComboBoxFocus(sender As Object, ByVal e As EventArgs)
Dim combo As ComboBox = sender Dim combo As CustomComboBox = sender
combo.BackColor = Color.LemonChiffon combo.BackColor = Color.LemonChiffon
End Sub End Sub
Public Sub OnComboBoxLostFocus(sender As Object, ByVal e As EventArgs) Public Sub OnComboBoxLostFocus(sender As Object, ByVal e As EventArgs)
Dim combo As ComboBox = sender Dim combo As CustomComboBox = sender
combo.BackColor = Color.White combo.BackColor = Color.White
End Sub End Sub
Dim CONTROL_ID Dim CONTROL_ID
@ -115,11 +149,11 @@ Public Class ClassControlBuilder
Dim value Dim value
Select Case control.GetType() Select Case control.GetType()
Case GetType(ComboBox) Case GetType(CustomComboBox)
If IsNothing(DirectCast(control, ComboBox).ValueMember) Then If IsNothing(DirectCast(control, CustomComboBox).ValueMember) Then
value = DirectCast(control, ComboBox).Text value = DirectCast(control, CustomComboBox).Text
Else Else
value = DirectCast(control, ComboBox).SelectedValue value = DirectCast(control, CustomComboBox).SelectedValue
End If End If
Case Else Case Else
Exit Sub Exit Sub
@ -159,11 +193,11 @@ Public Class ClassControlBuilder
Dim dt As DataTable = ClassDatabase.Return_Datatable(sqlcommand) Dim dt As DataTable = ClassDatabase.Return_Datatable(sqlcommand)
Dim obj Dim obj
obj = dependingControl.GetType.ToString obj = dependingControl.GetType.ToString
Select Case dependingControl.GetType.ToString Select Case dependingControl.GetType().Name
Case "System.Windows.Forms.ComboBox" Case "ComboBox"
ControlLoader.Combobox.SetDataSource(DirectCast(dependingControl, ComboBox), dt) ControlLoader.Combobox.SetDataSource(DirectCast(dependingControl, CustomComboBox), dt)
Case "System.Windows.Forms.Label" Case "Label"
If dt.Rows.Count = 1 Then If dt.Rows.Count = 1 Then
Try Try
ControlLoader.Label.LoadValue(DirectCast(dependingControl, Label), 9999, 9999, dt.Rows(0).Item(0).ToString, True) ControlLoader.Label.LoadValue(DirectCast(dependingControl, Label), 9999, 9999, dt.Rows(0).Item(0).ToString, True)
@ -171,7 +205,7 @@ Public Class ClassControlBuilder
ClassLogger.Add(ex.Message) ClassLogger.Add(ex.Message)
End Try End Try
End If End If
Case "System.Windows.Forms.TextBox" Case "TextBox"
If dt.Rows.Count = 1 Then If dt.Rows.Count = 1 Then
Try Try
Dim value1 As String = dt.Rows(0).Item(0) Dim value1 As String = dt.Rows(0).Item(0)
@ -228,7 +262,7 @@ Public Class ClassControlBuilder
' Dim dependingControlId As Integer = datatable.Rows(0).Item("GUID") ' Dim dependingControlId As Integer = datatable.Rows(0).Item("GUID")
' Dim panel As Panel = DirectCast(control.Parent, Panel) ' Dim panel As Panel = DirectCast(control.Parent, Panel)
' ' Über die Id das Control finden ' ' Über die Id das Control finden
' Dim dependingControl As ComboBox = panel.Controls.OfType(Of ComboBox)().Where(Function(c As ComboBox) ' Dim dependingControl As CustomComboBox = panel.Controls.OfType(Of CustomComboBox)().Where(Function(c As CustomComboBox)
' Return DirectCast(c.Tag, ClassControlMetadata).Id = dependingControlId ' Return DirectCast(c.Tag, ClassControlMetadata).Id = dependingControlId
' End Function).SingleOrDefault() ' End Function).SingleOrDefault()
@ -267,43 +301,64 @@ Public Class ClassControlBuilder
AddHandler control.MouseHover, AddressOf MouseHover AddHandler control.MouseHover, AddressOf MouseHover
Select Case type Select Case type
Case "Label"
Dim label As Label = CType(control, Label)
AddHandler label.EnabledChanged, AddressOf OnEnabledChanged
Case "TextBox" Case "TextBox"
Dim textbox As TextBox = CType(control, TextBox) Dim textbox As TextBox = CType(control, TextBox)
AddHandler textbox.TextChanged, AddressOf RecordChanged AddHandler textbox.TextChanged, AddressOf RecordChanged
AddHandler textbox.GotFocus, AddressOf OnTextBoxFocus AddHandler textbox.GotFocus, AddressOf OnTextBoxFocus
AddHandler textbox.LostFocus, AddressOf OnTextBoxLostFocus AddHandler textbox.LostFocus, AddressOf OnTextBoxLostFocus
AddHandler textbox.TextChanged, AddressOf OnTextBoxTextChanged AddHandler textbox.TextChanged, AddressOf OnTextBoxTextChanged
AddHandler textbox.ReadOnlyChanged, AddressOf OnReadOnlyChanged
Case "ComboBox" Case "ComboBox"
Dim combo As ComboBox = CType(control, ComboBox) Dim combo As CustomComboBox = CType(control, CustomComboBox)
AddHandler combo.SelectedValueChanged, AddressOf RecordChanged AddHandler combo.SelectedValueChanged, AddressOf RecordChanged
AddHandler combo.SelectedValueChanged, AddressOf OnComboBoxValueChanged AddHandler combo.SelectedValueChanged, AddressOf OnComboBoxValueChanged
AddHandler combo.TextChanged, AddressOf RecordChanged AddHandler combo.TextChanged, AddressOf RecordChanged
AddHandler combo.GotFocus, AddressOf OnComboBoxFocus 'AddHandler combo.GotFocus, AddressOf OnComboBoxFocus
AddHandler combo.LostFocus, AddressOf OnComboBoxLostFocus 'AddHandler combo.LostFocus, AddressOf OnComboBoxLostFocus
AddHandler combo.EnabledChanged, AddressOf OnEnabledChanged
Case "RadioButton" Case "RadioButton"
Dim radiobutton As RadioButton = CType(control, RadioButton) Dim radiobutton As RadioButton = CType(control, RadioButton)
AddHandler radiobutton.CheckedChanged, AddressOf RecordChanged AddHandler radiobutton.CheckedChanged, AddressOf RecordChanged
AddHandler radiobutton.EnabledChanged, AddressOf OnEnabledChanged
Case "CheckBox" Case "CheckBox"
Dim checkbox As CheckBox = CType(control, CheckBox) Dim checkbox As CheckBox = CType(control, CheckBox)
AddHandler checkbox.CheckedChanged, AddressOf RecordChanged AddHandler checkbox.CheckedChanged, AddressOf RecordChanged
AddHandler checkbox.EnabledChanged, AddressOf OnEnabledChanged
Case "PictureBox" Case "PictureBox"
Dim picturebox As PictureBox = CType(control, PictureBox) Dim picturebox As PictureBox = CType(control, PictureBox)
AddHandler picturebox.BackgroundImageChanged, AddressOf RecordChanged AddHandler picturebox.BackgroundImageChanged, AddressOf RecordChanged
AddHandler picturebox.EnabledChanged, AddressOf OnEnabledChanged
Case "DateEdit" Case "DateEdit"
Dim datetimepick As DevExpress.XtraEditors.DateEdit = CType(control, DevExpress.XtraEditors.DateEdit) Dim datetimepick As DevExpress.XtraEditors.DateEdit = CType(control, DevExpress.XtraEditors.DateEdit)
AddHandler datetimepick.DateTimeChanged, AddressOf RecordChanged AddHandler datetimepick.DateTimeChanged, AddressOf RecordChanged
AddHandler datetimepick.EnabledChanged, AddressOf OnEnabledChanged
Case "ListBoxControl" Case "ListBoxControl"
Dim listbox As DevExpress.XtraEditors.ListBoxControl = CType(control, DevExpress.XtraEditors.ListBoxControl) Dim listbox As DevExpress.XtraEditors.ListBoxControl = CType(control, DevExpress.XtraEditors.ListBoxControl)
AddHandler listbox.SelectedValueChanged, AddressOf RecordChanged AddHandler listbox.SelectedValueChanged, AddressOf RecordChanged
AddHandler listbox.EnabledChanged, AddressOf OnEnabledChanged
Case "CheckedListBoxControl" Case "CheckedListBoxControl"
Dim chklistbox As DevExpress.XtraEditors.CheckedListBoxControl = CType(control, DevExpress.XtraEditors.CheckedListBoxControl) Dim chklistbox As DevExpress.XtraEditors.CheckedListBoxControl = CType(control, DevExpress.XtraEditors.CheckedListBoxControl)
AddHandler chklistbox.ItemCheck, AddressOf RecordChanged AddHandler chklistbox.ItemCheck, AddressOf RecordChanged
AddHandler chklistbox.EnabledChanged, AddressOf OnEnabledChanged
Case "DataGridView" Case "DataGridView"
Dim gridview As DataGridView = CType(control, DataGridView) Dim gridview As DataGridView = CType(control, DataGridView)
AddHandler gridview.RowsAdded, AddressOf RecordChanged AddHandler gridview.RowsAdded, AddressOf RecordChanged
AddHandler gridview.CellValueChanged, AddressOf RecordChanged AddHandler gridview.CellValueChanged, AddressOf RecordChanged
AddHandler gridview.RowsRemoved, AddressOf RecordChanged AddHandler gridview.RowsRemoved, AddressOf RecordChanged
AddHandler gridview.EnabledChanged, AddressOf OnEnabledChanged
End Select End Select
End Sub End Sub
@ -480,7 +535,7 @@ Public Class ClassControlBuilder
End If End If
End Sub End Sub
Private Sub AddComboHandler(control As ComboBox, format As String) Private Sub AddComboHandler(control As CustomComboBox, format As String)
If format = "Currency" Then If format = "Currency" Then
AddHandler control.Leave, AddressOf Combo_Currency_Handler AddHandler control.Leave, AddressOf Combo_Currency_Handler
ElseIf format = "Decimal" Then ElseIf format = "Decimal" Then
@ -510,7 +565,7 @@ Public Class ClassControlBuilder
End Sub End Sub
Private Sub Combo_Currency_Handler(sender As Object, e As EventArgs) Private Sub Combo_Currency_Handler(sender As Object, e As EventArgs)
Dim control As ComboBox = DirectCast(sender, ComboBox) Dim control As CustomComboBox = DirectCast(sender, CustomComboBox)
Dim value As Decimal Dim value As Decimal
If Decimal.TryParse(control.Text.Trim(), value) Then If Decimal.TryParse(control.Text.Trim(), value) Then
control.Text = value.ToString("c") control.Text = value.ToString("c")
@ -521,7 +576,7 @@ Public Class ClassControlBuilder
End Sub End Sub
Private Sub Combo_Decimal_Handler(sender As Object, e As EventArgs) Private Sub Combo_Decimal_Handler(sender As Object, e As EventArgs)
Dim control As ComboBox = DirectCast(sender, ComboBox) Dim control As CustomComboBox = DirectCast(sender, CustomComboBox)
Dim value As Decimal Dim value As Decimal
If Decimal.TryParse(control.Text.Trim(), value) Then If Decimal.TryParse(control.Text.Trim(), value) Then
control.Text = value.ToString("###,###") control.Text = value.ToString("###,###")
@ -544,31 +599,32 @@ Public Class ClassControlBuilder
Public Sub SetActiveColor(ActiveControl As Control) Public Sub SetActiveColor(ActiveControl As Control)
Dim ActiveColor As Color = Color.DarkOrange Dim ActiveColor As Color = Color.DarkOrange
Dim CurrentType As String = ActiveControl.GetType.ToString Dim CurrentType As String = ActiveControl.GetType().Name
Select Case CurrentType Select Case CurrentType
Case "System.Windows.Forms.TextBox" Case "TextBox"
ActiveControl.BackColor = ActiveColor ActiveControl.BackColor = ActiveColor
Case "System.Windows.Forms.ComboBox" Case "ComboBox"
'Case "System.Windows.Forms.ComboBox"
ActiveControl.BackColor = ActiveColor ActiveControl.BackColor = ActiveColor
Case "System.Windows.Forms.Label" Case "Label"
ActiveControl.BackColor = ActiveColor ActiveControl.BackColor = ActiveColor
Case "System.Windows.Forms.CheckBox" Case "CheckBox"
ActiveControl.BackColor = ActiveColor ActiveControl.BackColor = ActiveColor
Case "System.Windows.Forms.Button" Case "Button"
ActiveControl.BackColor = ActiveColor ActiveControl.BackColor = ActiveColor
Case "System.Windows.Forms.DataGridView" Case "DataGridView"
Dim current As DataGridView = DirectCast(ActiveControl, DataGridView) Dim current As DataGridView = DirectCast(ActiveControl, DataGridView)
current.BackgroundColor = ActiveColor current.BackgroundColor = ActiveColor
Case "DevExpress.XtraEditors.DateEdit" Case "DateEdit"
ActiveControl.BackColor = ActiveColor ActiveControl.BackColor = ActiveColor
Case "System.Window.Forms.GroupBox" Case "GroupBox"
ActiveControl.BackColor = ActiveColor ActiveControl.BackColor = ActiveColor
Case "System.Windows.Forms.PictureBox" Case "PictureBox"
ActiveControl.BackColor = ActiveColor ActiveControl.BackColor = ActiveColor
Case "DevExpress.XtraEditors.CheckedListBoxControl" Case "CheckedListBoxControl"
ActiveControl.BackColor = ActiveColor ActiveControl.BackColor = ActiveColor
Case "DevExpress.XtraEditors.ListBoxControl" Case "ListBoxControl"
ActiveControl.BackColor = ActiveColor ActiveControl.BackColor = ActiveColor
End Select End Select
End Sub End Sub
@ -576,56 +632,58 @@ Public Class ClassControlBuilder
Public Sub ResetActiveColor(ActiveControl As Control) Public Sub ResetActiveColor(ActiveControl As Control)
For Each inctrl As Control In Me._master_panel.Controls For Each inctrl As Control In Me._master_panel.Controls
If inctrl.Name <> ActiveControl.Name Then If inctrl.Name <> ActiveControl.Name Then
Dim Type As String = inctrl.GetType.ToString Dim Type As String = inctrl.GetType().Name
Select Case Type Select Case Type
Case "System.Windows.Forms.TextBox" Case "TextBox"
inctrl.BackColor = Color.White inctrl.BackColor = Color.White
Case "System.Windows.Forms.ComboBox" Case "ComboBox"
'Case "System.Windows.Forms.ComboBox"
inctrl.BackColor = Color.White inctrl.BackColor = Color.White
Case "System.Windows.Forms.Label" Case "Label"
inctrl.BackColor = Color.Transparent inctrl.BackColor = Color.Transparent
Case "System.Windows.Forms.CheckBox" Case "CheckBox"
inctrl.BackColor = Color.Transparent inctrl.BackColor = Color.Transparent
Case "System.Windows.Forms.DataGridView" Case "DataGridView"
Dim ctrl As DataGridView = DirectCast(inctrl, DataGridView) Dim ctrl As DataGridView = DirectCast(inctrl, DataGridView)
ctrl.BackgroundColor = SystemColors.ControlDark ctrl.BackgroundColor = SystemColors.ControlDark
Case "DevExpress.XtraEditors.DateEdit" Case "DateEdit"
inctrl.BackColor = Color.White inctrl.BackColor = Color.White
Case "System.Windows.Forms.Button" Case "Button"
inctrl.BackColor = SystemColors.Control inctrl.BackColor = SystemColors.Control
Case "System.Windows.Forms.GroupBox" Case "GroupBox"
inctrl.BackColor = SystemColors.Control inctrl.BackColor = SystemColors.Control
Case "DevExpress.XtraEditors.CheckedListBoxControl" Case "CheckedListBoxControl"
inctrl.BackColor = Color.White inctrl.BackColor = Color.White
Case "DevExpress.XtraEditors.ListBoxControl" Case "ListBoxControl"
inctrl.BackColor = Color.White inctrl.BackColor = Color.White
Case "System.Windows.Forms.PictureBox" Case "PictureBox"
inctrl.BackColor = SystemColors.ControlDark inctrl.BackColor = SystemColors.ControlDark
For Each gbctrl As Control In inctrl.Controls For Each gbctrl As Control In inctrl.Controls
If gbctrl.Name <> ActiveControl.Name Then If gbctrl.Name <> ActiveControl.Name Then
Dim gbType As String = gbctrl.GetType.ToString Dim gbType As String = gbctrl.GetType.ToString
Select Case gbType Select Case gbType
Case "System.Windows.Forms.TextBox" Case "TextBox"
gbctrl.BackColor = Color.White gbctrl.BackColor = Color.White
Case "System.Windows.Forms.ComboBox" Case "ComboBox"
'Case "System.Windows.Forms.ComboBox"
gbctrl.BackColor = Color.White gbctrl.BackColor = Color.White
Case "System.Windows.Forms.Label" Case "Label"
gbctrl.BackColor = Color.Transparent gbctrl.BackColor = Color.Transparent
Case "System.Windows.Forms.CheckBox" Case "CheckBox"
gbctrl.BackColor = Color.Transparent gbctrl.BackColor = Color.Transparent
Case "System.Windows.Forms.DataGridView" Case "DataGridView"
Dim ctrl As DataGridView = DirectCast(gbctrl, DataGridView) Dim ctrl As DataGridView = DirectCast(gbctrl, DataGridView)
ctrl.BackgroundColor = SystemColors.ControlDark ctrl.BackgroundColor = SystemColors.ControlDark
Case "DevExpress.XtraEditors.DateEdit" Case "DateEdit"
gbctrl.BackColor = Color.White gbctrl.BackColor = Color.White
Case "System.Windows.Forms.Button" Case "Button"
gbctrl.BackColor = SystemColors.Control gbctrl.BackColor = SystemColors.Control
Case "System.Windows.Forms.PictureBox" Case "PictureBox"
inctrl.BackColor = SystemColors.ControlDark inctrl.BackColor = SystemColors.ControlDark
Case "DevExpress.XtraEditors.CheckedListBoxControl" Case "CheckedListBoxControl"
inctrl.BackColor = Color.White inctrl.BackColor = Color.White
Case "DevExpress.XtraEditors.ListBoxControl" Case "ListBoxControl"
inctrl.BackColor = Color.White inctrl.BackColor = Color.White
End Select End Select
End If End If
@ -988,7 +1046,9 @@ Public Class ClassControlBuilder
Optional parent As GroupBox = Nothing, Optional parent As GroupBox = Nothing,
Optional _designMode As Boolean = False) Optional _designMode As Boolean = False)
Try Try
Dim control As New ComboBox Dim _control As New ComboBox
Dim control As New CustomComboBox
Dim defaultSize As Size = New Size(120, 24) Dim defaultSize As Size = New Size(120, 24)
Dim metadata As New ClassControlMetadata() Dim metadata As New ClassControlMetadata()
@ -1036,7 +1096,7 @@ Public Class ClassControlBuilder
End If End If
Me.SetEventHandlers(control) Me.SetEventHandlers(control)
Me.CurrentControl = DirectCast(control, ComboBox) Me.CurrentControl = DirectCast(control, CustomComboBox)
If Not IsNothing(parent) Then If Not IsNothing(parent) Then
control.Parent = parent control.Parent = parent
Me.AddToGroupBox(parent, control) Me.AddToGroupBox(parent, control)
@ -1049,7 +1109,7 @@ Public Class ClassControlBuilder
End Try End Try
End Sub End Sub
Public Sub AutoCompleteCombo_KeyUp(ByVal cbo As ComboBox, ByVal e As KeyEventArgs) Public Sub AutoCompleteCombo_KeyUp(ByVal cbo As CustomComboBox, ByVal e As KeyEventArgs)
''Allow select keys without Autocompleting ''Allow select keys without Autocompleting
Select Case e.KeyCode Select Case e.KeyCode
Case Keys.Back, Keys.Left, Keys.Right, Keys.Up, Keys.Delete, Keys.Down Case Keys.Back, Keys.Left, Keys.Right, Keys.Up, Keys.Delete, Keys.Down
@ -1093,7 +1153,7 @@ Public Class ClassControlBuilder
'End If 'End If
End Sub End Sub
Public Sub AutoCompleteCombo_Leave(ByVal cbo As ComboBox) Public Sub AutoCompleteCombo_Leave(ByVal cbo As CustomComboBox)
Dim iFoundIndex As Integer Dim iFoundIndex As Integer
iFoundIndex = cbo.FindStringExact(cbo.Text) iFoundIndex = cbo.FindStringExact(cbo.Text)
cbo.SelectedIndex = iFoundIndex cbo.SelectedIndex = iFoundIndex

View File

@ -487,14 +487,8 @@ Public Class ClassControlCommandsUI
End Sub End Sub
Private Sub UpdateAllControls(FormID As Integer, RecordID As Integer, controls As Control.ControlCollection) Private Sub UpdateAllControls(FormID As Integer, RecordID As Integer, controls As Control.ControlCollection)
Dim controlGUID
Try Try
For Each ctrl As Control In controls For Each ctrl As Control In controls
controlGUID = DirectCast(ctrl.Tag, ClassControlMetadata).Id
If controlGUID = 993 Then
Console.WriteLine("Obacht")
End If
Dim CONTROL_ID As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id 'GetControlID_for_RecordID(ctrl.Name, RecordID) Dim CONTROL_ID As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id 'GetControlID_for_RecordID(ctrl.Name, RecordID)
If LogErrorsOnly = False Then ClassLogger.Add(" >> CONTROL_ID: " & CONTROL_ID, False) If LogErrorsOnly = False Then ClassLogger.Add(" >> CONTROL_ID: " & CONTROL_ID, False)
Dim CONTROL_VALUE As String = GetControlValue(ctrl) Dim CONTROL_VALUE As String = GetControlValue(ctrl)
@ -512,27 +506,15 @@ Public Class ClassControlCommandsUI
End If End If
If TypeOf ctrl Is DevExpress.XtraEditors.CheckedListBoxControl Then If TypeOf ctrl Is DevExpress.XtraEditors.CheckedListBoxControl Then
Try Dim id As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id
If Not IsNothing(CONTROL_VALUE) Then UpdateMultipleValues(id, RecordID, CONTROL_VALUE)
Dim id As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id Continue For
UpdateMultipleValues(id, RecordID, CONTROL_VALUE)
Continue For
End If
Catch ex As Exception
MsgBox("Unexpected Error in UpdateAllControls-CheckedListBox: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End If End If
If TypeOf ctrl Is Windows.Forms.DataGridView Then If TypeOf ctrl Is Windows.Forms.DataGridView Then
Try Dim id As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id
Dim id As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id UpdateMultipleValues(id, RecordID, CONTROL_VALUE)
UpdateMultipleValues(id, RecordID, CONTROL_VALUE) Continue For
Continue For
Catch ex As Exception
MsgBox("Unexpected Error in UpdateAllControls-DataGridView: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End If End If
Dim ValueExists = ClassDatabase.Execute_Scalar(String.Format("SELECT RECORD_ID FROM VWPMO_VALUES WHERE RECORD_ID = {0} AND CONTROL_ID = {1}", RecordID, CONTROL_ID)) Dim ValueExists = ClassDatabase.Execute_Scalar(String.Format("SELECT RECORD_ID FROM VWPMO_VALUES WHERE RECORD_ID = {0} AND CONTROL_ID = {1}", RecordID, CONTROL_ID))
@ -549,7 +531,7 @@ Public Class ClassControlCommandsUI
End If End If
Next Next
Catch ex As Exception Catch ex As Exception
MsgBox("Unexpected Error in UpdateAllControls - Control-ID: " & controlGUID.tostring & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Unexpected Error in UpdateAllControls: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub
@ -580,169 +562,135 @@ Public Class ClassControlCommandsUI
End Sub End Sub
Function GetControlValue(ctrl As Control) As String Function GetControlValue(ctrl As Control) As String
Try
Dim type = ctrl.GetType().Name
Dim CONTROL_ID As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id ' GetControlID_for_RecordID(ctrl.Name, CURRENT_RECORD_ID)
If LogErrorsOnly = False Then ClassLogger.Add(" >> GetControlValue CONTROL_ID: " & CONTROL_ID, False)
Dim CONTROL_VALUE As String = Nothing
If LogErrorsOnly = False Then ClassLogger.Add(" >> type = " & type.ToString, False)
Select Case type
Case "TextBox"
Return DirectCast(ctrl, TextBox).Text
Case "ComboBox"
If LogErrorsOnly = False Then ClassLogger.Add(" >> Return Value: " & DirectCast(ctrl, ComboBox).Text, False)
Return DirectCast(ctrl, ComboBox).Text
Case "CheckBox"
Return DirectCast(ctrl, CheckBox).Checked.ToString()
Case "RadioButton"
Return DirectCast(ctrl, RadioButton).Checked.ToString()
Case "DateEdit"
Dim Value = DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).EditValue
If IsDBNull(Value) Then Dim type = ctrl.GetType().Name
Return "" Dim CONTROL_ID As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id ' GetControlID_for_RecordID(ctrl.Name, CURRENT_RECORD_ID)
Else If LogErrorsOnly = False Then ClassLogger.Add(" >> GetControlValue CONTROL_ID: " & CONTROL_ID, False)
Return DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).DateTime.ToString("yyyy-MM-dd") Dim CONTROL_VALUE As String = Nothing
End If If LogErrorsOnly = False Then ClassLogger.Add(" >> type = " & type.ToString, False)
Case "PictureBox" Select Case type
'Return "PictureBox" 'Es ist egal was für ein String hier zurückgegeben wird, hauptsache nicht Nothing Case "TextBox"
Case "CheckedListBoxControl" Return DirectCast(ctrl, TextBox).Text
Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl Case "ComboBox"
chklbx = DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl) If LogErrorsOnly = False Then ClassLogger.Add(" >> Return Value: " & DirectCast(ctrl, CustomComboBox).Text, False)
Return DirectCast(ctrl, CustomComboBox).Text
Case "CheckBox"
Return DirectCast(ctrl, CheckBox).Checked.ToString()
Case "RadioButton"
Return DirectCast(ctrl, RadioButton).Checked.ToString()
Case "DateEdit"
Dim Value = DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).EditValue
'TODO: Wenn keine Datasource vorhanden, angecheckte einträge als string speichern If IsDBNull(Value) Then
If IsNothing(chklbx.DataSource) Then Return ""
Dim result As New List(Of String) Else
Dim result_string As String Return DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).DateTime.ToString("yyyy-MM-dd")
End If
Case "PictureBox"
'Return "PictureBox" 'Es ist egal was für ein String hier zurückgegeben wird, hauptsache nicht Nothing
Case "CheckedListBoxControl"
Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
chklbx = DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl)
For Each item As DevExpress.XtraEditors.Controls.CheckedListBoxItem In chklbx.CheckedItems 'TODO: Wenn keine Datasource vorhanden, angecheckte einträge als string speichern
result.Add(item.Value.ToString.Trim) If IsNothing(chklbx.DataSource) Then
Next Dim result As New List(Of String)
Dim result_string As String
result_string = String.Join(";", result) For Each item As DevExpress.XtraEditors.Controls.CheckedListBoxItem In chklbx.CheckedItems
result.Add(item.Value.ToString.Trim)
' Hier wird ein String zurückgegeben, der als VALUE gespeichert werden soll
' Überspringt den Rest der funktion
Return result_string
End If
Dim countSelectedItems As Integer = 0
For Each item As Object In DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl).CheckedItems
countSelectedItems += 1
Next Next
Dim sqlControl = ClassDatabase.Execute_Scalar("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID) result_string = String.Join(";", result)
sqlControl = sqlControl.ToString.ToUpper
Dim checked_result_string As String
If sqlControl.contains("SELECT [RECORD-ID],") Then
'Alle Recorddatensätze durchlaufen und überprüfen ob nicht angehakt
'Wenn nicht angehakt dann Record löschen
Dim index As Integer = 0
For i As Integer = 0 To chklbx.ItemCount - 1
Dim item = chklbx.GetItem(i)
Dim row As DataRowView = CType(item, DataRowView)
If chklbx.GetItemCheckState(i) = 0 Then
Try
If CInt(row(0)) > 0 Then
'Überprüfen ob es den Record gibt
Dim SQL = "SELECT COUNT(*) FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
If ClassDatabase.Execute_Scalar(SQL) = 1 Then
SQL = "DELETE FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
If ClassDatabase.Execute_non_Query(SQL) = True Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> TBPMO_RECORD_CONNECT-Entry after 'deselect CheckedListBox' deleted", False)
End If
End If
End If
Catch ex As Exception
ClassLogger.Add(" >> ERROR CHECKEDLISTBOX NoINTEGER-COLUMN: " & ex.Message)
Return Nothing
End Try
End If
Next
'Für jeden gecheckten Eintrag den Record der Stammentität mit dem selektierten linken
Dim checked_result As New List(Of String)
For Each item As Object In DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl).CheckedItems
Dim row As DataRowView = CType(item, DataRowView)
Try
If CInt(row(0)) > 0 Then
Dim rid = CInt(row(0))
Dim checked_value = row(1)
checked_result.Add(checked_value)
checked_result_string = String.Join(";", checked_result)
Dim SQL = "SELECT COUNT(*) FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
If ClassDatabase.Execute_Scalar(SQL) = 0 Then
If CURRENT_RECORD_ID = 0 Then
MsgBox("Attention: no current record Selected!", MsgBoxStyle.Exclamation)
Else
If ConnectRecord(CURRENT_RECORD_ID, CInt(row(0)), "CheckedListBox;" & ctrl.Name) = True Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> Checked ListBox record '" & rid.ToString & "' was linked successfully.", False)
End If
End If
End If
End If
Catch ex As Exception
ClassLogger.Add("Error in CheckedListBoxGetControlValue: " & ex.Message, True)
End Try
Next
Else 'Einfach nur eine Datensauswahl mit Strings!
If countSelectedItems > 0 Then
Dim checked_result As New List(Of String)
For Each item As Object In DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl).CheckedItems
Dim row As DataRowView = CType(item, DataRowView)
Dim checked_value = row(1)
checked_result.Add(checked_value)
checked_result_string = String.Join(";", checked_result)
Next
Else
checked_result_string = ""
End If
End If
' Hier wird ein String zurückgegeben, der als VALUE gespeichert werden soll ' Hier wird ein String zurückgegeben, der als VALUE gespeichert werden soll
' Überspringt den Rest der funktion ' Überspringt den Rest der funktion
If Not IsNothing(checked_result_string) Then Return result_string
Dim sql = String.Format("select count(*) from TBPMO_CONTROL_VALUE where CONTROL_ID = {0} and RECORD_ID = {1}", CONTROL_ID, CURRENT_RECORD_ID) End If
If ClassDatabase.Execute_Scalar(sql) = 0 Then
InsertControlValue(CONTROL_ID, CURRENT_RECORD_ID, checked_result_string) 'Alle Recorddatensätze durchlaufen und überprüfen ob nicht angehakt
'Wenn nicht angehakt dann Record löschen
Dim index As Integer = 0
For i As Integer = 0 To chklbx.ItemCount - 1
Dim item = chklbx.GetItem(i)
Dim row As DataRowView = CType(item, DataRowView)
If chklbx.GetItemCheckState(i) = 0 Then
If CInt(row(0)) > 0 Then
'Überprüfen ob es den Record gibt
Dim SQL = "SELECT COUNT(*) FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
If ClassDatabase.Execute_Scalar(SQL) = 1 Then
SQL = "DELETE FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
If ClassDatabase.Execute_non_Query(SQL) = True Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> TBPMO_RECORD_CONNECT-Entry after 'deselect CheckedListBox' deleted", False)
End If
End If
End If End If
Return checked_result_string
Else
'In jedem Fall Nothing zurückgeben
Return Nothing
End If End If
Next
'Für jeden gecheckten Eintrag den Record der Stammentität mit dem selektierten linken
Dim checked_result As New List(Of String)
Dim checked_result_string As String
Case "ListBoxControl" For Each item As Object In DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl).CheckedItems
Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(ctrl, DevExpress.XtraEditors.ListBoxControl) Dim row As DataRowView = CType(item, DataRowView)
Return listbox.SelectedValue Try
If CInt(row(0)) > 0 Then
Dim rid = CInt(row(0))
Dim checked_value = row(1)
checked_result.Add(checked_value)
checked_result_string = String.Join(";", checked_result)
Dim SQL = "SELECT COUNT(*) FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
If ClassDatabase.Execute_Scalar(SQL) = 0 Then
If CURRENT_RECORD_ID = 0 Then
MsgBox("Attention: no current record Selected!", MsgBoxStyle.Exclamation)
Else
If ConnectRecord(CURRENT_RECORD_ID, CInt(row(0)), "CheckedListBox;" & ctrl.Name) = True Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> Checked ListBox record '" & rid.ToString & "' was linked successfully.", False)
End If
End If
Case "DataGridView" End If
Dim list As New List(Of String)
Dim dgv As DataGridView = DirectCast(ctrl, DataGridView)
For Each row As DataGridViewRow In dgv.Rows
Dim cell As DataGridViewCell = row.Cells(0)
If Not IsNothing(cell.Value) Then
list.Add(cell.Value)
End If End If
Next Catch ex As Exception
ClassLogger.Add("Error in CheckedListBoxGetControlValue: " & ex.Message, True)
End Try
Return String.Join(";", list) Next
' Hier wird ein String zurückgegeben, der als VALUE gespeichert werden soll
Case Else ' Überspringt den Rest der funktion
If Not IsNothing(checked_result_string) Then
Dim sql = String.Format("select count(*) from TBPMO_CONTROL_VALUE where CONTROL_ID = {0} and RECORD_ID = {1}", CONTROL_ID, CURRENT_RECORD_ID)
If ClassDatabase.Execute_Scalar(sql) = 0 Then
InsertControlValue(CONTROL_ID, CURRENT_RECORD_ID, "")
End If
Return checked_result_string
Else
'In jedem Fall Nothing zurückgeben
Return Nothing Return Nothing
End Select End If
Catch ex As Exception
ClassLogger.Add("Unexpected Error in GetControlValue: " & ex.Message)
MsgBox("Unexpected Error in GetControlValue: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return Nothing
End Try
Case "ListBoxControl"
Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(ctrl, DevExpress.XtraEditors.ListBoxControl)
Return listbox.SelectedValue
Case "DataGridView"
Dim list As New List(Of String)
Dim dgv As DataGridView = DirectCast(ctrl, DataGridView)
For Each row As DataGridViewRow In dgv.Rows
Dim cell As DataGridViewCell = row.Cells(0)
If Not IsNothing(cell.Value) Then
list.Add(cell.Value)
End If
Next
Return String.Join(";", list)
Case Else
Return Nothing
End Select
End Function End Function
Public Shared Function InsertControlValue(ControlID As Integer, RecordID As Integer, Value As String) Public Shared Function InsertControlValue(ControlID As Integer, RecordID As Integer, Value As String)

View File

@ -107,7 +107,7 @@
End Try End Try
End Function End Function
Overloads Shared Sub SetDataSource(control As Windows.Forms.ComboBox, dt As DataTable) Overloads Shared Sub SetDataSource(control As CustomComboBox, dt As DataTable)
Dim sw As Stopwatch = Stopwatch.StartNew() Dim sw As Stopwatch = Stopwatch.StartNew()
Dim columnCount As Integer = dt.Columns.Count Dim columnCount As Integer = dt.Columns.Count
@ -296,11 +296,11 @@
Public Class Combobox : Inherits _ListControl Public Class Combobox : Inherits _ListControl
Public Shared Sub LoadValue(control As Windows.Forms.ComboBox, recordId As Integer, parentRecordId As Integer, value As String) Public Shared Sub LoadValue(control As CustomComboBox, recordId As Integer, parentRecordId As Integer, value As String)
control.Text = value control.Text = value
End Sub End Sub
Public Shared Sub LoadList(control As Windows.Forms.ComboBox, formId As Integer, connID As Object, SQLCommand As String) Public Shared Sub LoadList(control As CustomComboBox, formId As Integer, connID As Object, SQLCommand As String)
Try Try
Dim dynamic As DynamicValue = GetDynamicValue(DirectCast(control.Tag, ClassControlMetadata).Id, formId, connID, SQLCommand) Dim dynamic As DynamicValue = GetDynamicValue(DirectCast(control.Tag, ClassControlMetadata).Id, formId, connID, SQLCommand)
@ -317,7 +317,7 @@
End Try End Try
End Sub End Sub
Private Shared Sub CalculateDropdownWidth(control As Windows.Forms.ComboBox, dt As DataTable) Private Shared Sub CalculateDropdownWidth(control As CustomComboBox, dt As DataTable)
Try Try
Const WIDEST_WIDTH As Integer = 300 Const WIDEST_WIDTH As Integer = 300
Dim FinalWidth As Integer = WIDEST_WIDTH Dim FinalWidth As Integer = WIDEST_WIDTH

View File

@ -13,8 +13,8 @@ Public Class ClassControlValues
Return True Return True
End If End If
Case GetType(ComboBox) Case GetType(CustomComboBox)
Dim combobox As ComboBox = DirectCast(control, ComboBox) Dim combobox As CustomComboBox = DirectCast(control, CustomComboBox)
If combobox.Text.Trim() = String.Empty Then If combobox.Text.Trim() = String.Empty Then
Return False Return False
Else Else
@ -236,8 +236,8 @@ Public Class ClassControlValues
Dim label As Label = DirectCast(control, Label) Dim label As Label = DirectCast(control, Label)
ControlLoader.Label.LoadValue(label, recordId, parentRecordId, value, entity_ID) ControlLoader.Label.LoadValue(label, recordId, parentRecordId, value, entity_ID)
Case GetType(ComboBox) Case GetType(CustomComboBox)
Dim combobox As ComboBox = DirectCast(control, ComboBox) Dim combobox As CustomComboBox = DirectCast(control, CustomComboBox)
ControlLoader.Combobox.LoadValue(combobox, recordId, parentRecordId, value) ControlLoader.Combobox.LoadValue(combobox, recordId, parentRecordId, value)
Case GetType(CheckBox) Case GetType(CheckBox)
@ -317,8 +317,8 @@ Public Class ClassControlValues
Dim sqlcommand As String = row.Item("SQL") Dim sqlcommand As String = row.Item("SQL")
Dim ConnID = row.Item("CONTROL_CONNID_1") Dim ConnID = row.Item("CONTROL_CONNID_1")
Select Case Ctrl.GetType() Select Case Ctrl.GetType()
Case GetType(ComboBox) Case GetType(CustomComboBox)
Dim combobox = DirectCast(Ctrl, ComboBox) Dim combobox = DirectCast(Ctrl, CustomComboBox)
ControlLoader.Combobox.LoadList(combobox, FormID, ConnID, sqlcommand) ControlLoader.Combobox.LoadList(combobox, FormID, ConnID, sqlcommand)
Case GetType(DevExpress.XtraEditors.ListBoxControl) Case GetType(DevExpress.XtraEditors.ListBoxControl)
@ -377,8 +377,8 @@ Public Class ClassControlValues
sqlcommand = ReplaceSqlCommandPlaceholders(sqlcommand, RecordId, ParentRecordId, entity_ID) sqlcommand = ReplaceSqlCommandPlaceholders(sqlcommand, RecordId, ParentRecordId, entity_ID)
Select Case Ctrl.GetType() Select Case Ctrl.GetType()
Case GetType(ComboBox) Case GetType(CustomComboBox)
Dim combobox = DirectCast(Ctrl, ComboBox) Dim combobox = DirectCast(Ctrl, CustomComboBox)
ControlLoader.Combobox.LoadList(combobox, FormId, connID, sqlcommand) ControlLoader.Combobox.LoadList(combobox, FormId, connID, sqlcommand)
Case GetType(DevExpress.XtraEditors.ListBoxControl) Case GetType(DevExpress.XtraEditors.ListBoxControl)
@ -412,8 +412,8 @@ Public Class ClassControlValues
Public Shared Sub UnloadControlValuesList(RecordID As Integer, FormID As Integer, controls As Control.ControlCollection) Public Shared Sub UnloadControlValuesList(RecordID As Integer, FormID As Integer, controls As Control.ControlCollection)
For Each C As Control In controls For Each C As Control In controls
If TypeOf C Is ComboBox Then If TypeOf C Is CustomComboBox Then
Dim Combobox = DirectCast(C, ComboBox) Dim Combobox = DirectCast(C, CustomComboBox)
Dim currentValue As String = Combobox.Text Dim currentValue As String = Combobox.Text
Combobox.DataSource = Nothing Combobox.DataSource = Nothing
Combobox.Text = currentValue Combobox.Text = currentValue
@ -451,8 +451,8 @@ Public Class ClassControlValues
Case GetType(TextBox) Case GetType(TextBox)
DirectCast(control, TextBox).Text = String.Empty DirectCast(control, TextBox).Text = String.Empty
Case GetType(ComboBox) Case GetType(CustomComboBox)
Dim combo As ComboBox = DirectCast(control, ComboBox) Dim combo As CustomComboBox = DirectCast(control, CustomComboBox)
combo.SelectedIndex = -1 combo.SelectedIndex = -1
combo.Text = String.Empty combo.Text = String.Empty
@ -550,8 +550,8 @@ Public Class ClassControlValues
Dim radio As RadioButton = DirectCast(control, RadioButton) Dim radio As RadioButton = DirectCast(control, RadioButton)
radio.Checked = StrToBool(autoValue) radio.Checked = StrToBool(autoValue)
Case GetType(ComboBox) Case GetType(CustomComboBox)
Dim combobox As ComboBox = DirectCast(control, ComboBox) Dim combobox As CustomComboBox = DirectCast(control, CustomComboBox)
If IsDBNull(autoValue) Then If IsDBNull(autoValue) Then
combobox.SelectedIndex = -1 combobox.SelectedIndex = -1
Else Else

View File

@ -0,0 +1,51 @@
Public Class CustomComboBox
Inherits Windows.Forms.ComboBox
Public Sub New()
MyBase.New()
DrawMode = Windows.Forms.DrawMode.OwnerDrawFixed
End Sub
Protected Overrides Sub OnEnabledChanged(e As EventArgs)
'MyBase.OnEnabledChanged(e)
If Me.Enabled Then
Me.DropDownStyle = ComboBoxStyle.DropDown
Else
Me.DropDownStyle = ComboBoxStyle.DropDownList
End If
End Sub
Protected Overrides Sub OnDrawItem(e As DrawItemEventArgs)
Dim g As System.Drawing.Graphics = e.Graphics
Dim rect As Rectangle = e.Bounds
If e.Index >= 0 Then
Dim label As String = Me.Items(e.Index).ToString()
If e.State = (DrawItemState.Disabled Or DrawItemState.NoAccelerator Or DrawItemState.NoFocusRect Or DrawItemState.ComboBoxEdit) Then
' DISABLED STATE
g.FillRectangle(New SolidBrush(System.Drawing.SystemColors.Info), rect)
g.DrawString(label, e.Font, Brushes.Black, rect)
e.DrawFocusRectangle()
ElseIf (e.State = (DrawItemState.NoAccelerator Or DrawItemState.NoFocusRect)) Then
' ITEMS NOT IN FOCUS
g.FillRectangle(New SolidBrush(Color.White), rect)
g.DrawString(label, e.Font, Brushes.Black, rect)
e.DrawFocusRectangle()
Else
' ITEMS IN FOCUS
g.FillRectangle(New SolidBrush(System.Drawing.SystemColors.Highlight), rect)
g.DrawString(label, e.Font, Brushes.White, rect)
e.DrawFocusRectangle()
End If
End If
g.Dispose()
End Sub
End Class

View File

@ -245,6 +245,9 @@
<Compile Include="ClassControlMetadata.vb" /> <Compile Include="ClassControlMetadata.vb" />
<Compile Include="ClassControlValueCache.vb" /> <Compile Include="ClassControlValueCache.vb" />
<Compile Include="ClassConverter.vb" /> <Compile Include="ClassConverter.vb" />
<Compile Include="ClassCustomComboBox.vb">
<SubType>Component</SubType>
</Compile>
<Compile Include="ClassFolderWatcher.vb" /> <Compile Include="ClassFolderWatcher.vb" />
<Compile Include="ClassJumpRecord.vb" /> <Compile Include="ClassJumpRecord.vb" />
<Compile Include="ClassLicence.vb" /> <Compile Include="ClassLicence.vb" />

View File

@ -1,10 +1,11 @@
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraNavBar.NavBarControl, DevExpress.XtraNavBar.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraPdfViewer.PdfViewer, DevExpress.XtraPdfViewer.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraVerticalGrid.VGridControl, DevExpress.XtraVerticalGrid.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Docking.DockManager, DevExpress.XtraBars.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Navigation.TileNavPane, DevExpress.XtraBars.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraBars.Navigation.TileNavPane, DevExpress.XtraBars.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraVerticalGrid.VGridControl, DevExpress.XtraVerticalGrid.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraNavBar.NavBarControl, DevExpress.XtraNavBar.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraPdfViewer.PdfViewer, DevExpress.XtraPdfViewer.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Docking.DockManager, DevExpress.XtraBars.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

View File

@ -22,7 +22,6 @@ Partial Class frmConstructor_Main
'Das Bearbeiten mit dem Code-Editor ist nicht möglich. 'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConstructor_Main)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConstructor_Main))
Dim GridLevelNode1 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode() Dim GridLevelNode1 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
Dim GridLevelNode2 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode() Dim GridLevelNode2 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
@ -30,12 +29,12 @@ Partial Class frmConstructor_Main
Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl()
Me.SplitContainerTop = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerTop = New DevExpress.XtraEditors.SplitContainerControl()
Me.TreeViewMain = New System.Windows.Forms.TreeView() Me.TreeViewMain = New System.Windows.Forms.TreeView()
Me.CMSEntity = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.CMSEntity = New System.Windows.Forms.ContextMenuStrip()
Me.ResetEbenenAuswahlToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ResetEbenenAuswahlToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.DateiimportEntitätToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DateiimportEntitätToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.FormDesignerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.FormDesignerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.GridControlMain = New DevExpress.XtraGrid.GridControl() Me.GridControlMain = New DevExpress.XtraGrid.GridControl()
Me.ContextMenuGrid = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuGrid = New System.Windows.Forms.ContextMenuStrip()
Me.FunktionenDataGridToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.FunktionenDataGridToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
Me.AnsichtUmschaltenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.AnsichtUmschaltenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
@ -82,7 +81,7 @@ Partial Class frmConstructor_Main
Me.Panel1 = New System.Windows.Forms.Panel() Me.Panel1 = New System.Windows.Forms.Panel()
Me.GridControlPos = New DevExpress.XtraGrid.GridControl() Me.GridControlPos = New DevExpress.XtraGrid.GridControl()
Me.grvwGridPos = New DevExpress.XtraGrid.Views.Grid.GridView() Me.grvwGridPos = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.BindingNavigatorPOS = New System.Windows.Forms.BindingNavigator(Me.components) Me.BindingNavigatorPOS = New System.Windows.Forms.BindingNavigator()
Me.BindingNavigatorAddNewItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorAddNewItem = New System.Windows.Forms.ToolStripButton()
Me.BindingNavigatorCountItem = New System.Windows.Forms.ToolStripLabel() Me.BindingNavigatorCountItem = New System.Windows.Forms.ToolStripLabel()
Me.BindingNavigatorDeleteItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorDeleteItem = New System.Windows.Forms.ToolStripButton()
@ -124,20 +123,20 @@ Partial Class frmConstructor_Main
Me.tsslblStatus = New System.Windows.Forms.ToolStripStatusLabel() Me.tsslblStatus = New System.Windows.Forms.ToolStripStatusLabel()
Me.tsslblRecord = New System.Windows.Forms.ToolStripStatusLabel() Me.tsslblRecord = New System.Windows.Forms.ToolStripStatusLabel()
Me.tsslblWorkflowstate = New System.Windows.Forms.ToolStripStatusLabel() Me.tsslblWorkflowstate = New System.Windows.Forms.ToolStripStatusLabel()
Me.BindingSource_Entity = New System.Windows.Forms.BindingSource(Me.components) Me.BindingSource_Entity = New System.Windows.Forms.BindingSource()
Me.DD_ECMAdmin = New DD_Record_Organiser.DD_ECMAdmin() Me.DD_ECMAdmin = New DD_Record_Organiser.DD_ECMAdmin()
Me.ImageCollection1 = New DevExpress.Utils.ImageCollection(Me.components) Me.ImageCollection1 = New DevExpress.Utils.ImageCollection()
Me.ttToolTip = New System.Windows.Forms.ToolTip(Me.components) Me.ttToolTip = New System.Windows.Forms.ToolTip()
Me.ContextMenuDetails = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuDetails = New System.Windows.Forms.ContextMenuStrip()
Me.DD_DMSDataSet = New DD_Record_Organiser.DD_DMSDataSet() Me.DD_DMSDataSet = New DD_Record_Organiser.DD_DMSDataSet()
Me.VWPMO_WF_USER_ACTIVEBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.VWPMO_WF_USER_ACTIVEBindingSource = New System.Windows.Forms.BindingSource()
Me.VWPMO_WF_USER_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_ACTIVETableAdapter() Me.VWPMO_WF_USER_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_ACTIVETableAdapter()
Me.TableAdapterManager = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TableAdapterManager() Me.TableAdapterManager = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TableAdapterManager()
Me.TBPMO_FILES_USERTableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TBPMO_FILES_USERTableAdapter() Me.TBPMO_FILES_USERTableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TBPMO_FILES_USERTableAdapter()
Me.VWPMO_WF_ACTIVEBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.VWPMO_WF_ACTIVEBindingSource = New System.Windows.Forms.BindingSource()
Me.VWPMO_WF_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_ACTIVETableAdapter() Me.VWPMO_WF_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_ACTIVETableAdapter()
Me.TBPMO_FILES_USERBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.TBPMO_FILES_USERBindingSource = New System.Windows.Forms.BindingSource()
Me.ToolTipController = New DevExpress.Utils.ToolTipController(Me.components) Me.ToolTipController = New DevExpress.Utils.ToolTipController()
CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerMain.SuspendLayout() Me.SplitContainerMain.SuspendLayout()
CType(Me.SplitContainerTop, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerTop, System.ComponentModel.ISupportInitialize).BeginInit()

View File

@ -1984,66 +1984,67 @@ Public Class frmConstructor_Main
Select Case Control.GetType() Select Case Control.GetType()
Case GetType(Windows.Forms.GroupBox) Case GetType(Windows.Forms.GroupBox)
Lock_Record_Controls_Recursive(state, DirectCast(Control, GroupBox).Controls) Lock_Record_Controls_Recursive(state, DirectCast(Control, GroupBox).Controls)
Case GetType(Windows.Forms.TextBox) Case GetType(Windows.Forms.TextBox)
Dim txt As TextBox = CType(Control, TextBox) Dim txt As TextBox = CType(Control, TextBox)
txt.ReadOnly = state txt.ReadOnly = state
Case Else
Control.Enabled = Not state
Case GetType(Windows.Forms.CheckBox) 'Case GetType(Windows.Forms.CheckBox)
Dim chk As CheckBox = CType(Control, CheckBox) ' Dim chk As CheckBox = CType(Control, CheckBox)
If state = True Then ' If state = True Then
chk.Enabled = False ' chk.Enabled = False
Else ' Else
chk.Enabled = True ' chk.Enabled = True
End If ' End If
Case GetType(Windows.Forms.RadioButton) 'Case GetType(Windows.Forms.RadioButton)
Dim rb As RadioButton = CType(Control, RadioButton) ' Dim rb As RadioButton = CType(Control, RadioButton)
If state = True Then ' If state = True Then
rb.Enabled = False ' rb.Enabled = False
Else ' Else
rb.Enabled = True ' rb.Enabled = True
End If ' End If
Case GetType(Windows.Forms.ComboBox) 'Case GetType(CustomComboBox)
Dim cbobx As System.Windows.Forms.ComboBox = CType(Control, System.Windows.Forms.ComboBox) ' Dim cbobx As CustomComboBox = CType(Control, CustomComboBox)
If state = True Then ' If state = True Then
cbobx.Enabled = False ' cbobx.Enabled = False
Else ' Else
cbobx.Enabled = True ' cbobx.Enabled = True
End If ' End If
Case GetType(DevExpress.XtraEditors.DateEdit) 'Case GetType(DevExpress.XtraEditors.DateEdit)
Dim dtp As DevExpress.XtraEditors.DateEdit = CType(Control, DevExpress.XtraEditors.DateEdit) ' Dim dtp As DevExpress.XtraEditors.DateEdit = CType(Control, DevExpress.XtraEditors.DateEdit)
If state = True Then ' If state = True Then
dtp.Enabled = False ' dtp.Enabled = False
Else ' Else
dtp.Enabled = True ' dtp.Enabled = True
End If ' End If
Case GetType(DevExpress.XtraEditors.CheckedListBoxControl) 'Case GetType(DevExpress.XtraEditors.CheckedListBoxControl)
Dim chlb As DevExpress.XtraEditors.CheckedListBoxControl = CType(Control, DevExpress.XtraEditors.CheckedListBoxControl) ' Dim chlb As DevExpress.XtraEditors.CheckedListBoxControl = CType(Control, DevExpress.XtraEditors.CheckedListBoxControl)
If state = True Then ' If state = True Then
chlb.Enabled = False ' chlb.Enabled = False
Else ' Else
chlb.Enabled = True ' chlb.Enabled = True
End If ' End If
Case GetType(DevExpress.XtraEditors.ListBoxControl) 'Case GetType(DevExpress.XtraEditors.ListBoxControl)
Dim lb As DevExpress.XtraEditors.ListBoxControl = CType(Control, DevExpress.XtraEditors.ListBoxControl) ' Dim lb As DevExpress.XtraEditors.ListBoxControl = CType(Control, DevExpress.XtraEditors.ListBoxControl)
If state = True Then ' If state = True Then
lb.Enabled = False ' lb.Enabled = False
Else ' Else
lb.Enabled = True ' lb.Enabled = True
End If ' End If
Case GetType(Windows.Forms.Button) 'Case GetType(Windows.Forms.Button)
Dim btn As Button = CType(Control, Button) ' Dim btn As Button = CType(Control, Button)
If state = True Then ' If state = True Then
btn.Enabled = False ' btn.Enabled = False
Else ' Else
btn.Enabled = True ' btn.Enabled = True
End If ' End If
End Select End Select
Next Next
End Sub End Sub

View File

@ -197,7 +197,7 @@ Public Class frmSQLEditor
EnableTables() EnableTables()
End Sub End Sub
Private Sub GetColumns(tableName As String, ByRef combobox As ComboBox) Private Sub GetColumns(tableName As String, ByRef combobox As CustomComboBox)
Try Try
Dim CS As String Dim CS As String
CS = ClassDatabase.GetConnectionString(cmbConnection.SelectedValue) CS = ClassDatabase.GetConnectionString(cmbConnection.SelectedValue)