我有以下代碼:冷凝vb.net代碼
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
我期待整合成一個子此,而無需任何重複代碼(所有潛艇目前持有btnSubmitUIDisabled()
和lblStatusClear()
)
我想關於CASE
聲明,但也會有重複的代碼。這是一個WPF應用程序,所有「TextChanged」事件都位於xaml中,因此在每個子結尾處沒有「Handles」。
在此先感謝。
我剛剛點擊「發佈您的答案」與完全相同的東西,當橙色的酒吧出現在頂端... – Vedran 2010-07-23 20:56:03