I have the following code:
Private Sub txtFileFromLocation_TextChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls.TextChangedEventArgs)
MachineNameUIDisabled()
ServiceNameUIDisabled()
ToLocationUIDisabled()
btnSubmitUIDisabled()
lblStatusClear()
End Sub
Private Sub txtMachineName_TextChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls.TextChangedEventArgs)
ServiceNameUIDisabled()
ToLocationUIDisabled()
btnSubmitUIDisabled()
lblStatusClear()
End Sub
Private Sub txtServiceName_TextChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls.TextChangedEventArgs)
ToLocationUIDisabled()
btnSubmitUIDisabled()
lblStatusClear()
End Sub
Private Sub txtFilesToLocation_TextChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls.TextChangedEventArgs)
btnSubmitUIDisabled()
lblStatusClear()
End Sub
I am looking to consolidate this into one sub without having any repeating code (all subs currently hold btnSubmitUIDisabled()
and lblStatusClear()
)
I thought about a CASE
statement but that would also have repetitive code. This is a WPF application and all the "TextChanged" events are located in the xaml, thus no "Handles" at the end of each sub.
Thanks in advance.