Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/ProcessManager_Client
This commit is contained in:
@@ -47,7 +47,7 @@ Public Class ClassControlCreator
|
|||||||
|
|
||||||
Public Class ControlMetadata
|
Public Class ControlMetadata
|
||||||
Public Guid As Integer
|
Public Guid As Integer
|
||||||
Public [ReadOnly] As Boolean
|
Public [ReadOnly] As Boolean = False
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Private Shared Function TransformDataRow(row As DataRow) As ControlDBProps
|
Private Shared Function TransformDataRow(row As DataRow) As ControlDBProps
|
||||||
@@ -82,7 +82,6 @@ Public Class ClassControlCreator
|
|||||||
.Guid = props.Guid,
|
.Guid = props.Guid,
|
||||||
.ReadOnly = props.ReadOnly
|
.ReadOnly = props.ReadOnly
|
||||||
}
|
}
|
||||||
'ctrl.Tag = props.Guid
|
|
||||||
ctrl.Name = props.Name
|
ctrl.Name = props.Name
|
||||||
ctrl.Location = props.Location
|
ctrl.Location = props.Location
|
||||||
ctrl.Font = props.Font
|
ctrl.Font = props.Font
|
||||||
@@ -93,7 +92,7 @@ Public Class ClassControlCreator
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If props.ReadOnly Then
|
If props.ReadOnly Then
|
||||||
ctrl.BackColor = Color.Gray
|
ctrl.BackColor = Color.LightGray
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return ctrl
|
Return ctrl
|
||||||
@@ -243,6 +242,7 @@ Public Class ClassControlCreator
|
|||||||
control.AcceptsReturn = True
|
control.AcceptsReturn = True
|
||||||
control.ReadOnly = row.Item("READ_ONLY")
|
control.ReadOnly = row.Item("READ_ONLY")
|
||||||
control.TabStop = Not row.Item("READ_ONLY")
|
control.TabStop = Not row.Item("READ_ONLY")
|
||||||
|
control.BackColor = IIf(row.Item("READ_ONLY"), Color.LightGray, Color.White)
|
||||||
Else
|
Else
|
||||||
control.ReadOnly = True
|
control.ReadOnly = True
|
||||||
End If
|
End If
|
||||||
@@ -267,10 +267,10 @@ Public Class ClassControlCreator
|
|||||||
If Not designMode Then
|
If Not designMode Then
|
||||||
control.Enabled = Not row.Item("READ_ONLY")
|
control.Enabled = Not row.Item("READ_ONLY")
|
||||||
control.TabStop = Not row.Item("READ_ONLY")
|
control.TabStop = Not row.Item("READ_ONLY")
|
||||||
|
control.BackColor = IIf(row.Item("READ_ONLY"), Color.LightGray, Color.White)
|
||||||
|
|
||||||
control.AutoCompleteMode = AutoCompleteMode.SuggestAppend
|
control.AutoCompleteMode = AutoCompleteMode.SuggestAppend
|
||||||
control.AutoCompleteSource = AutoCompleteSource.ListItems
|
control.AutoCompleteSource = AutoCompleteSource.ListItems
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return control
|
Return control
|
||||||
@@ -332,6 +332,7 @@ Public Class ClassControlCreator
|
|||||||
Public Shared Function CreateExistingLookupControl(row As DataRow, designMode As Boolean) As LookupControl2
|
Public Shared Function CreateExistingLookupControl(row As DataRow, designMode As Boolean) As LookupControl2
|
||||||
Dim control As LookupControl2 = CreateBaseControl(New LookupControl2(), row, designMode)
|
Dim control As LookupControl2 = CreateBaseControl(New LookupControl2(), row, designMode)
|
||||||
control.Width = row.Item("WIDTH")
|
control.Width = row.Item("WIDTH")
|
||||||
|
control.ReadOnly = row.Item("READ_ONLY")
|
||||||
|
|
||||||
If designMode Then
|
If designMode Then
|
||||||
control.Cursor = Cursors.Hand
|
control.Cursor = Cursors.Hand
|
||||||
|
|||||||
@@ -46,12 +46,6 @@
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Return value
|
Return value
|
||||||
|
|
||||||
'If isVector Then
|
|
||||||
' Return $"{PREFIX_VECTOR}{value}"
|
|
||||||
'Else
|
|
||||||
' Return value
|
|
||||||
'End If
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
MsgBox($"Error in GetValue: {ex.Message}", MsgBoxStyle.Critical)
|
MsgBox($"Error in GetValue: {ex.Message}", MsgBoxStyle.Critical)
|
||||||
|
|||||||
23
app/DD_PM_WINDREAM/ClassVectorBehaviourListConverter.vb
Normal file
23
app/DD_PM_WINDREAM/ClassVectorBehaviourListConverter.vb
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
Imports System.ComponentModel
|
||||||
|
Imports System.Globalization
|
||||||
|
|
||||||
|
Public Class ClassVectorBehaviourListConverter
|
||||||
|
Inherits TypeConverter
|
||||||
|
|
||||||
|
Public Overrides Function GetStandardValuesSupported(context As ITypeDescriptorContext) As Boolean
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overrides Function GetStandardValues(context As ITypeDescriptorContext) As StandardValuesCollection
|
||||||
|
Dim oBehaviourList = DirectCast(context.Instance, FinalIndexProperties).VectorBehaviourType
|
||||||
|
Return New StandardValuesCollection(oBehaviourList)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overrides Function ConvertTo(context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) As Object
|
||||||
|
If IsNothing(value) Then
|
||||||
|
Return ""
|
||||||
|
Else
|
||||||
|
Return value.ToString()
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
@@ -220,6 +220,7 @@
|
|||||||
<Compile Include="ClassSQLTypeConverter.vb" />
|
<Compile Include="ClassSQLTypeConverter.vb" />
|
||||||
<Compile Include="ClassSQLValue.vb" />
|
<Compile Include="ClassSQLValue.vb" />
|
||||||
<Compile Include="ClassUser.vb" />
|
<Compile Include="ClassUser.vb" />
|
||||||
|
<Compile Include="ClassVectorBehaviourListConverter.vb" />
|
||||||
<Compile Include="ClassWorkDoc.vb" />
|
<Compile Include="ClassWorkDoc.vb" />
|
||||||
<Compile Include="clsPatterns.vb" />
|
<Compile Include="clsPatterns.vb" />
|
||||||
<Compile Include="clsWMDocGrid.vb" />
|
<Compile Include="clsWMDocGrid.vb" />
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ Module ModuleFinalIndexProperties
|
|||||||
|
|
||||||
<Category("Index")>
|
<Category("Index")>
|
||||||
<DisplayName("IndexBehaviour")>
|
<DisplayName("IndexBehaviour")>
|
||||||
<PropertyAttributesProvider("IndexTypeStringProvider")>
|
<TypeConverter(GetType(ClassVectorBehaviourListConverter))>
|
||||||
|
<PropertyAttributesProvider("VectorIndexOnlyProvider")>
|
||||||
Public Property VectorBehaviour As String
|
Public Property VectorBehaviour As String
|
||||||
|
|
||||||
<Category("Index")>
|
<Category("Index")>
|
||||||
@@ -77,6 +78,8 @@ Module ModuleFinalIndexProperties
|
|||||||
Public Property Indicies As List(Of String)
|
Public Property Indicies As List(Of String)
|
||||||
<Browsable(False)>
|
<Browsable(False)>
|
||||||
Public Property IndiciesType As List(Of Integer)
|
Public Property IndiciesType As List(Of Integer)
|
||||||
|
<Browsable(False)>
|
||||||
|
Public Property VectorBehaviourType As List(Of String)
|
||||||
|
|
||||||
Public Sub VectorIndexBooleanProvider(attrs As PropertyAttributes)
|
Public Sub VectorIndexBooleanProvider(attrs As PropertyAttributes)
|
||||||
MaybeSetReadOnlyIfNotVectorIndex(attrs)
|
MaybeSetReadOnlyIfNotVectorIndex(attrs)
|
||||||
@@ -107,6 +110,10 @@ Module ModuleFinalIndexProperties
|
|||||||
MaybeSetReadOnlyIfSQLHasNoValue(attrs)
|
MaybeSetReadOnlyIfSQLHasNoValue(attrs)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub VectorIndexOnlyProvider(attrs As PropertyAttributes)
|
||||||
|
MaybeSetBrowsable(attrs, {ClassFinalIndex.INDEX_TYPE_VECTOR_STRING})
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub MaybeSetReadOnlyIfSQLHasNoValue(attrs As PropertyAttributes)
|
Public Sub MaybeSetReadOnlyIfSQLHasNoValue(attrs As PropertyAttributes)
|
||||||
Dim hasSQLValue As Boolean = (SQLCommand.Value <> String.Empty)
|
Dim hasSQLValue As Boolean = (SQLCommand.Value <> String.Empty)
|
||||||
|
|
||||||
|
|||||||
@@ -2812,7 +2812,7 @@ der Wertänderungen nutzen wollen:</value>
|
|||||||
<value>Neu hinzufügen</value>
|
<value>Neu hinzufügen</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BindingNavigatorCountItem1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="BindingNavigatorCountItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>127, 24</value>
|
<value>128, 24</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BindingNavigatorCountItem1.Text" xml:space="preserve">
|
<data name="BindingNavigatorCountItem1.Text" xml:space="preserve">
|
||||||
<value>von {0} finalen Indexen</value>
|
<value>von {0} finalen Indexen</value>
|
||||||
@@ -2978,7 +2978,7 @@ der Wertänderungen nutzen wollen:</value>
|
|||||||
<value>9, 133</value>
|
<value>9, 133</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BindingNavigator1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="BindingNavigator1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>798, 27</value>
|
<value>679, 27</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BindingNavigator1.TabIndex" type="System.Int32, mscorlib">
|
<data name="BindingNavigator1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>92</value>
|
<value>92</value>
|
||||||
|
|||||||
@@ -952,7 +952,7 @@ Public Class frmAdministration
|
|||||||
Dim description As String = NotNull(focusedRow.Item("DESCRIPTION"), "")
|
Dim description As String = NotNull(focusedRow.Item("DESCRIPTION"), "")
|
||||||
Dim preventDuplicates As Boolean = NotNull(focusedRow.Item("PREVENT_DUPLICATES"), False)
|
Dim preventDuplicates As Boolean = NotNull(focusedRow.Item("PREVENT_DUPLICATES"), False)
|
||||||
Dim allowNewValues As Boolean = NotNull(focusedRow.Item("ALLOW_NEW_VALUES"), False)
|
Dim allowNewValues As Boolean = NotNull(focusedRow.Item("ALLOW_NEW_VALUES"), False)
|
||||||
Dim VectorBehaviour As String = NotNull(focusedRow.Item("IF_VEKTOR_BEHAVIOUR"), False)
|
Dim VectorBehaviour As String = NotNull(focusedRow.Item("IF_VEKTOR_BEHAVIOUR"), "Add")
|
||||||
|
|
||||||
|
|
||||||
CURRENT_INDEX_ID = guid
|
CURRENT_INDEX_ID = guid
|
||||||
@@ -1003,6 +1003,10 @@ Public Class frmAdministration
|
|||||||
obj.Indicies = Windream_Indicies
|
obj.Indicies = Windream_Indicies
|
||||||
obj.IndiciesType = Windream_Indicies_Types
|
obj.IndiciesType = Windream_Indicies_Types
|
||||||
obj.IndexName = index
|
obj.IndexName = index
|
||||||
|
obj.VectorBehaviourType = New List(Of String) From {
|
||||||
|
"Add",
|
||||||
|
"Overwrite"
|
||||||
|
}
|
||||||
|
|
||||||
If Not index Is Nothing Then
|
If Not index Is Nothing Then
|
||||||
Dim indexType As Integer = ClassFinalIndex.GetIndexType(index, Windream_Indicies, Windream_Indicies_Types)
|
Dim indexType As Integer = ClassFinalIndex.GetIndexType(index, Windream_Indicies, Windream_Indicies_Types)
|
||||||
@@ -1168,13 +1172,4 @@ Public Class frmAdministration
|
|||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
'Private Sub viewFinalIndex_ValidateRow(sender As Object, e As Views.Base.ValidateRowEventArgs) Handles viewFinalIndex.ValidateRow
|
|
||||||
' Dim rowView As DataRowView = e.Row
|
|
||||||
|
|
||||||
' If rowView.IsNew Then
|
|
||||||
' Dim props As FinalIndexProperties = PropertyGrid1.SelectedObject
|
|
||||||
' End If
|
|
||||||
'End Sub
|
|
||||||
End Class
|
End Class
|
||||||
@@ -437,27 +437,33 @@ Public Class frmFormDesigner
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Sub SetActiveControlColor()
|
Sub SetActiveControlColor()
|
||||||
|
If DirectCast(CurrentControl.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
|
||||||
CurrentControl.BackColor = Color.DarkOrange
|
CurrentControl.BackColor = Color.DarkOrange
|
||||||
|
End If
|
||||||
|
|
||||||
' Reset Color of all other controls
|
' Reset Color of all other controls
|
||||||
For Each inctrl As Control In Me.pnldesigner.Controls
|
For Each oControl As Control In Me.pnldesigner.Controls
|
||||||
If inctrl.Name <> CurrentControl.Name Then
|
If oControl.Name <> CurrentControl.Name Then
|
||||||
Dim Type As String = inctrl.GetType.ToString
|
Dim oMetadata = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata)
|
||||||
|
|
||||||
|
If oMetadata.ReadOnly = False Then
|
||||||
|
Dim Type As String = oControl.GetType.ToString
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case "System.Windows.Forms.TextBox"
|
Case "System.Windows.Forms.TextBox"
|
||||||
inctrl.BackColor = Color.White
|
oControl.BackColor = Color.White
|
||||||
Case "System.Windows.Forms.ComboBox"
|
Case "System.Windows.Forms.ComboBox"
|
||||||
inctrl.BackColor = Color.White
|
oControl.BackColor = Color.White
|
||||||
Case "System.Windows.Forms.Label"
|
Case "System.Windows.Forms.Label"
|
||||||
inctrl.BackColor = Color.Transparent
|
oControl.BackColor = Color.Transparent
|
||||||
Case "System.Windows.Forms.CheckBox"
|
Case "System.Windows.Forms.CheckBox"
|
||||||
inctrl.BackColor = Color.Transparent
|
oControl.BackColor = Color.Transparent
|
||||||
Case "DD_PM_WINDREAM.ClassControlCreator+LineLabel"
|
Case "DD_PM_WINDREAM.ClassControlCreator+LineLabel"
|
||||||
inctrl.BackColor = inctrl.ForeColor
|
oControl.BackColor = oControl.ForeColor
|
||||||
Case "DigitalData.Controls.LookupGrid.LookupControl2"
|
Case "DigitalData.Controls.LookupGrid.LookupControl2"
|
||||||
inctrl.BackColor = Color.White
|
oControl.BackColor = Color.White
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -622,6 +628,12 @@ Public Class frmFormDesigner
|
|||||||
Dim CurrentPosition = CurrentControl.Location
|
Dim CurrentPosition = CurrentControl.Location
|
||||||
Dim OldPosition As Point = DirectCast(pgControls.SelectedObject, BaseProperties).Location
|
Dim OldPosition As Point = DirectCast(pgControls.SelectedObject, BaseProperties).Location
|
||||||
|
|
||||||
|
If CurrentPosition.X = OldPosition.X + 2 And CurrentPosition.Y = OldPosition.Y + 2 Then
|
||||||
|
CurrentControl.Location = New Point(CurrentPosition.X - 2, CurrentPosition.Y - 2)
|
||||||
|
MyBase.Cursor = Cursors.Default
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
If Not Point.op_Inequality(CurrentPosition, OldPosition) Then
|
If Not Point.op_Inequality(CurrentPosition, OldPosition) Then
|
||||||
MyBase.Cursor = Cursors.Default
|
MyBase.Cursor = Cursors.Default
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
|||||||
@@ -1534,11 +1534,10 @@ Public Class frmMain
|
|||||||
CURRENT_CLICKED_PROFILE_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(hi.RowHandle), GridView_Docs.Columns("PROFILE_ID"))
|
CURRENT_CLICKED_PROFILE_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(hi.RowHandle), GridView_Docs.Columns("PROFILE_ID"))
|
||||||
ElseIf hi.InDataRow Then
|
ElseIf hi.InDataRow Then
|
||||||
GridViewItem_Clicked = "ROW"
|
GridViewItem_Clicked = "ROW"
|
||||||
Dim profileid = CURRENT_CLICKED_PROFILE_ID
|
CURRENT_CLICKED_PROFILE_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(hi.RowHandle), GridView_Docs.Columns("PROFILE_ID"))
|
||||||
Else
|
Else
|
||||||
GridViewItem_Clicked = Nothing
|
GridViewItem_Clicked = Nothing
|
||||||
End If
|
End If
|
||||||
'End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GridView_Docs_ColumnWidthChanged(sender As Object, e As Views.Base.ColumnEventArgs) Handles GridView_Docs.ColumnWidthChanged
|
Private Sub GridView_Docs_ColumnWidthChanged(sender As Object, e As Views.Base.ColumnEventArgs) Handles GridView_Docs.ColumnWidthChanged
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ Public Class frmMassValidator
|
|||||||
Dim oCount = 0
|
Dim oCount = 0
|
||||||
|
|
||||||
For Each oControlRow As DataRow In DTCONTROLS.Rows
|
For Each oControlRow As DataRow In DTCONTROLS.Rows
|
||||||
Dim ctrl As Control
|
Dim oControl As Control
|
||||||
|
|
||||||
Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper
|
Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper
|
||||||
Case "TXT"
|
Case "TXT"
|
||||||
@@ -146,13 +146,17 @@ Public Class frmMassValidator
|
|||||||
AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus
|
AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus
|
||||||
AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp
|
AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp
|
||||||
|
|
||||||
ctrl = txt
|
oControl = txt
|
||||||
Case "LBL"
|
Case "LBL"
|
||||||
LOGGER.Debug("Versuch LBL zu laden")
|
LOGGER.Debug("Versuch LBL zu laden")
|
||||||
ctrl = ClassControlCreator.CreateExistingLabel(oControlRow, False)
|
oControl = ClassControlCreator.CreateExistingLabel(oControlRow, False)
|
||||||
Case "CMB"
|
Case "CMB"
|
||||||
LOGGER.Debug("Versuch CMB zu laden")
|
LOGGER.Debug("Versuch CMB zu laden")
|
||||||
|
|
||||||
|
If oControlRow.Item("READ_ONLY") Then
|
||||||
|
Dim cmbReadonly = ClassControlCreator.CreateExistingTextbox(oControlRow, False)
|
||||||
|
oControl = cmbReadonly
|
||||||
|
Else
|
||||||
Dim cmb = ClassControlCreator.CreateExistingCombobox(oControlRow, False)
|
Dim cmb = ClassControlCreator.CreateExistingCombobox(oControlRow, False)
|
||||||
|
|
||||||
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
|
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
|
||||||
@@ -279,28 +283,33 @@ Public Class frmMassValidator
|
|||||||
End Using
|
End Using
|
||||||
cmb.DropDownWidth = maxWith
|
cmb.DropDownWidth = maxWith
|
||||||
|
|
||||||
ctrl = cmb
|
oControl = cmb
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Case "DTP"
|
Case "DTP"
|
||||||
LOGGER.Debug("Versuch DTP zu laden")
|
LOGGER.Debug("Versuch DTP zu laden")
|
||||||
ctrl = ClassControlCreator.CreateExistingDatepicker(oControlRow, False)
|
oControl = ClassControlCreator.CreateExistingDatepicker(oControlRow, False)
|
||||||
Case "DGV"
|
Case "DGV"
|
||||||
LOGGER.Debug("Versuch DGV zu laden")
|
LOGGER.Debug("Versuch DGV zu laden")
|
||||||
Dim dgv = ClassControlCreator.CreateExistingDataGridView(oControlRow, False)
|
Dim dgv = ClassControlCreator.CreateExistingDataGridView(oControlRow, False)
|
||||||
|
|
||||||
AddHandler dgv.RowValidating, AddressOf onDGVRowValidating
|
AddHandler dgv.RowValidating, AddressOf onDGVRowValidating
|
||||||
|
|
||||||
ctrl = dgv
|
oControl = dgv
|
||||||
Case "CHK"
|
Case "CHK"
|
||||||
LOGGER.Debug("Versuch Checkbox zu laden")
|
LOGGER.Debug("Versuch Checkbox zu laden")
|
||||||
|
|
||||||
ctrl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False)
|
oControl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False)
|
||||||
Case "LINE"
|
Case "LINE"
|
||||||
LOGGER.Debug("Versuch Linie zu laden")
|
LOGGER.Debug("Versuch Linie zu laden")
|
||||||
|
|
||||||
ctrl = ClassControlCreator.CreateExistingLine(oControlRow, False)
|
oControl = ClassControlCreator.CreateExistingLine(oControlRow, False)
|
||||||
Case "LOOKUP"
|
Case "LOOKUP"
|
||||||
Dim lookup As LookupControl2 = ClassControlCreator.CreateExistingLookupControl(oControlRow, False)
|
Dim lookup As LookupControl2 = ClassControlCreator.CreateExistingLookupControl(oControlRow, False)
|
||||||
ctrl = lookup
|
oControl = lookup
|
||||||
lookup.PreventDuplicates = oControlRow.Item("VKT_PREVENT_MULTIPLE_VALUES")
|
lookup.PreventDuplicates = oControlRow.Item("VKT_PREVENT_MULTIPLE_VALUES")
|
||||||
lookup.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM")
|
lookup.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM")
|
||||||
lookup.MultiSelect = oControlRow.Item("MULTISELECT")
|
lookup.MultiSelect = oControlRow.Item("MULTISELECT")
|
||||||
@@ -312,7 +321,7 @@ Public Class frmMassValidator
|
|||||||
''Wenn Multiselect false dann prüfen ob abhängiges Control
|
''Wenn Multiselect false dann prüfen ob abhängiges Control
|
||||||
If CBool(oControlRow.Item("MULTISELECT")) = False Then
|
If CBool(oControlRow.Item("MULTISELECT")) = False Then
|
||||||
Dim filteredData As DataTable = DTCONTROLS.Clone()
|
Dim filteredData As DataTable = DTCONTROLS.Clone()
|
||||||
Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{ctrl.Name}%'"
|
Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{oControl.Name}%'"
|
||||||
DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges)
|
DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges)
|
||||||
If filteredData.Rows.Count = 1 Then
|
If filteredData.Rows.Count = 1 Then
|
||||||
AddHandler lookup.SelectedValuesChanged, AddressOf onLookUp1
|
AddHandler lookup.SelectedValuesChanged, AddressOf onLookUp1
|
||||||
@@ -329,14 +338,14 @@ Public Class frmMassValidator
|
|||||||
Where r.CONTROL_ID = oControlRow.Item("GUID")
|
Where r.CONTROL_ID = oControlRow.Item("GUID")
|
||||||
Select r).ToList()
|
Select r).ToList()
|
||||||
|
|
||||||
ctrl = ClassControlCreator.CreateExistingGridControl(oControlRow, columns, False)
|
oControl = ClassControlCreator.CreateExistingGridControl(oControlRow, columns, False)
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If ctrl IsNot Nothing AndAlso TypeOf ctrl IsNot Label Then
|
If oControl IsNot Nothing AndAlso TypeOf oControl IsNot Label Then
|
||||||
ctrl.TabIndex = oCount
|
oControl.TabIndex = oCount
|
||||||
End If
|
End If
|
||||||
|
|
||||||
pnldesigner.Controls.Add(ctrl)
|
pnldesigner.Controls.Add(oControl)
|
||||||
|
|
||||||
oCount += 1
|
oCount += 1
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -662,11 +662,23 @@ Public Class frmValidator
|
|||||||
oMyControl = ClassControlCreator.CreateExistingLabel(oControlRow, False)
|
oMyControl = ClassControlCreator.CreateExistingLabel(oControlRow, False)
|
||||||
Case "CMB"
|
Case "CMB"
|
||||||
LOGGER.Debug("Versuch CMB zu laden")
|
LOGGER.Debug("Versuch CMB zu laden")
|
||||||
|
If oControlRow.Item("READ_ONLY") Then
|
||||||
|
Dim cmbReadonly = ClassControlCreator.CreateExistingTextbox(oControlRow, False)
|
||||||
|
oMyControl = cmbReadonly
|
||||||
|
Else
|
||||||
Dim cmb = ClassControlCreator.CreateExistingCombobox(oControlRow, False)
|
Dim cmb = ClassControlCreator.CreateExistingCombobox(oControlRow, False)
|
||||||
|
|
||||||
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
|
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
|
||||||
|
AddHandler cmb.GotFocus, Sub(sender As Control, e As EventArgs)
|
||||||
|
If DirectCast(cmb.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
|
||||||
|
cmb.BackColor = Color.Lime
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
AddHandler cmb.LostFocus, Sub(sender As Control, e As EventArgs)
|
||||||
|
If DirectCast(cmb.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
|
||||||
|
cmb.BackColor = Color.White
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
#Region "CONTROL LIST"
|
#Region "CONTROL LIST"
|
||||||
|
|
||||||
Dim ControlID = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetGUID(CURRENT_ProfilGUID, cmb.Name)
|
Dim ControlID = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetGUID(CURRENT_ProfilGUID, cmb.Name)
|
||||||
@@ -793,13 +805,14 @@ Public Class frmValidator
|
|||||||
cmb.DropDownWidth = maxWith
|
cmb.DropDownWidth = maxWith
|
||||||
|
|
||||||
oMyControl = cmb
|
oMyControl = cmb
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'add_ComboBox(dr.Item("GUID"), dr.Item("CTRL_NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
|
|
||||||
Case "DTP"
|
Case "DTP"
|
||||||
LOGGER.Debug("Versuch DTP zu laden")
|
LOGGER.Debug("Versuch DTP zu laden")
|
||||||
oMyControl = ClassControlCreator.CreateExistingDatepicker(oControlRow, False)
|
oMyControl = ClassControlCreator.CreateExistingDatepicker(oControlRow, False)
|
||||||
|
|
||||||
'add_DTP(dr.Item("GUID"), dr.Item("NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
|
|
||||||
Case "DGV"
|
Case "DGV"
|
||||||
LOGGER.Debug("Versuch DGV zu laden")
|
LOGGER.Debug("Versuch DGV zu laden")
|
||||||
Dim dgv = ClassControlCreator.CreateExistingDataGridView(oControlRow, False)
|
Dim dgv = ClassControlCreator.CreateExistingDataGridView(oControlRow, False)
|
||||||
@@ -832,15 +845,24 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
AddHandler lookup.GotFocus, Sub(sender As Control, e As EventArgs)
|
||||||
|
If DirectCast(lookup.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
|
||||||
|
lookup.BackColor = Color.Lime
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
AddHandler lookup.LostFocus, Sub(sender As Control, e As EventArgs)
|
||||||
|
If DirectCast(lookup.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
|
||||||
|
lookup.BackColor = Color.White
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
'Return filteredData
|
'Return filteredData
|
||||||
'AddHandler lookup.Leave, AddressOf onLookUp0
|
'AddHandler lookup.Leave, AddressOf onLookUp0
|
||||||
|
|
||||||
'add_DGV(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("HEIGHT"), dr.Item("WIDTH"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
|
|
||||||
Case "CHK"
|
Case "CHK"
|
||||||
LOGGER.Debug("Versuch Checkbox zu laden")
|
LOGGER.Debug("Versuch Checkbox zu laden")
|
||||||
|
|
||||||
oMyControl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False)
|
oMyControl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False)
|
||||||
'add_Checkbox(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("CTRL_TEXT"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE"))
|
|
||||||
Case "TABLE"
|
Case "TABLE"
|
||||||
LOGGER.Debug("Versuch Tabelle zu laden")
|
LOGGER.Debug("Versuch Tabelle zu laden")
|
||||||
|
|
||||||
@@ -909,12 +931,18 @@ Public Class frmValidator
|
|||||||
|
|
||||||
Public Sub OnTextBoxFocus(sender As Object, e As EventArgs)
|
Public Sub OnTextBoxFocus(sender As Object, e As EventArgs)
|
||||||
Dim box As TextBox = sender
|
Dim box As TextBox = sender
|
||||||
|
|
||||||
|
If DirectCast(box.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
|
||||||
box.BackColor = Color.Lime
|
box.BackColor = Color.Lime
|
||||||
box.SelectAll()
|
box.SelectAll()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs)
|
Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs)
|
||||||
Dim box As TextBox = sender
|
Dim box As TextBox = sender
|
||||||
|
|
||||||
|
If DirectCast(box.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
|
||||||
box.BackColor = Color.White
|
box.BackColor = Color.White
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub OnTextBoxKeyUp(sender As Object, e As KeyEventArgs)
|
Public Sub OnTextBoxKeyUp(sender As Object, e As KeyEventArgs)
|
||||||
If ControlHandleStarted = True Then
|
If ControlHandleStarted = True Then
|
||||||
|
|||||||
Reference in New Issue
Block a user