WIP: first pass of depending controls
This commit is contained in:
@@ -151,11 +151,35 @@ Public Class ClassPatterns
|
||||
End If
|
||||
|
||||
Dim controlName As String = GetNextPattern(result, PATTERN_CTRL).Value
|
||||
Dim control As Control = panel.Controls.Find(controlName, False).FirstOrDefault()
|
||||
'Dim control As Control = panel.Controls.Find(controlName, False).FirstOrDefault()
|
||||
Dim oFoundControl As Control = Nothing
|
||||
|
||||
If control IsNot Nothing Then
|
||||
Dim value As String = control.Text
|
||||
result = ReplacePattern(result, PATTERN_CTRL, value)
|
||||
For Each oControl As Control In panel.Controls
|
||||
If TypeOf oControl Is Label Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim oMeta = DirectCast(oControl.Tag, ClassControls.ControlMeta)
|
||||
Dim oIndex As String = oMeta.IndexName
|
||||
|
||||
If oIndex = controlName Then
|
||||
oFoundControl = oControl
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If oFoundControl IsNot Nothing Then
|
||||
Dim oValue As String = String.Empty
|
||||
|
||||
If TypeOf oFoundControl Is TextBox Then
|
||||
oValue = DirectCast(oFoundControl, TextBox).Text
|
||||
ElseIf TypeOf oFoundControl Is CheckBox Then
|
||||
oValue = IIf(DirectCast(oFoundControl, CheckBox).Checked, 1, 0)
|
||||
Else
|
||||
oValue = ""
|
||||
End If
|
||||
|
||||
result = ReplacePattern(result, PATTERN_CTRL, oValue)
|
||||
End If
|
||||
|
||||
oTryCounter += 1
|
||||
|
||||
Reference in New Issue
Block a user