Add Checkbox and DateTime Editor for frmEdit, New LookupGrid WIP
This commit is contained in:
@@ -17,19 +17,19 @@ Public Class ClassControlPatcher(Of T As Control)
|
||||
_Container = Container
|
||||
End Sub
|
||||
|
||||
Public Function ProcessContainer(Action As Action(Of T)) As ClassControlPatcher(Of T)
|
||||
Public Function ProcessContainer(Action As Action(Of T, Control)) As ClassControlPatcher(Of T)
|
||||
Return ProcessContainer(_Container, Action)
|
||||
End Function
|
||||
|
||||
Public Function ProcessControl(Action As Action(Of T), ByVal Control As Control) As ClassControlPatcher(Of T)
|
||||
Action(Control)
|
||||
Public Function ProcessControl(Action As Action(Of T, Control), ByVal Control As Control) As ClassControlPatcher(Of T)
|
||||
Action(Control, _Container)
|
||||
Return Me
|
||||
End Function
|
||||
Private Function ProcessContainer(ByVal Container As Control, Action As Action(Of T)) As ClassControlPatcher(Of T)
|
||||
Private Function ProcessContainer(ByVal Container As Control, Action As Action(Of T, Control)) As ClassControlPatcher(Of T)
|
||||
For Each oControl As Control In Container.Controls
|
||||
|
||||
If oControl.[GetType]() = GetType(T) Then
|
||||
Action(oControl)
|
||||
Action(oControl, Container)
|
||||
Else
|
||||
ProcessContainer(oControl, Action)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user