1. 程式人生 > >基於 SailingEase WinForm Framework 開發優秀的客戶端應用程式(3:實現選單/工具欄按鈕的解耦及狀態控制)

基於 SailingEase WinForm Framework 開發優秀的客戶端應用程式(3:實現選單/工具欄按鈕的解耦及狀態控制)

private void InitializeNavigation() { _navigationService.Register("MainMenu://Session[Text='會話']/Session/"); _navigationService.Register("MainMenu://Session/Session/Contact[Text='聯絡人']", new Action(() => { ContactView.ShowInstance(); })); _navigationService.Register(
"MainMenu://Setup[Text='設定']/Contact/"); _navigationService.Register("MainMenu://Setup/Contact/CustomerCategory[Text='業務型別',AuthorizeKey='ManageCustomerCategory']", new Action(() => { CustomerCategoryListView.ShowInstance(); })); _navigationService.Register("MainMenu://Setup/Contact/CustomerImportentLevel[Text='重要級別',AuthorizeKey='ManageCustomerImportentLevel']
", new Action(() => { CustomerImportentLevelListView.ShowInstance(); })); }