コード例 #1
0
        private void CloseAddressBook()
        {
            shellService.ClearToolBarCommands();

            if (activeContactController != null)
            {
                activeContactController.Shutdown();
                activeContactController = null;
            }
        }
コード例 #2
0
ファイル: ModuleController.cs プロジェクト: PeterQin/HiClock
        private void ShowAddressBook()
        {
            activeContactController = container.GetExportedValue<ContactController>();
            activeContactController.Root = root;
            activeContactController.Initialize();
            activeContactController.Run();

            ToolBarCommand uiNewContactCommand = new ToolBarCommand(activeContactController.NewContactCommand, "_New contact",
                "Creates a new contact.");
            ToolBarCommand uiDeleteCommand = new ToolBarCommand(activeContactController.DeleteContactCommand, "_Delete",
                "Deletes the selected contact.");
            shellService.AddToolBarCommands(new[] { uiNewContactCommand, uiDeleteCommand });
        }
コード例 #3
0
 private void CloseAddressBook()
 {
     shellService.ClearToolBarCommands();
     activeContactController?.Shutdown();
     activeContactController = null;
 }