1
我有一个菜单单击事件,看起来是这样的....推荐一个合适的对象为导向的设计模式来替换此代码
Public Sub ToolbarManager_ToolClick(sender as Object, e as EventArgs)
Case "New"
CreateNewFile()
Case "Save"
SaveCurrentFile()
Case "Exit"
ExitApp()
Case.......
etc...
etc...
End Sub
这令我是“丑陋” - 但我不确定'最好'的方式或最恰当的方式来清理它。