Наследование: System.Waf.Applications.Controller
Пример #1
0
        private void CloseCurrentView()
        {
            shellService.ClearToolBarCommands();

            activeEmailFolderController?.Shutdown();
            activeEmailFolderController = null;
        }
Пример #2
0
        private void ShowEmails(EmailFolder emailFolder)
        {
            activeEmailFolderController = container.GetExportedValue<EmailFolderController>();
            activeEmailFolderController.EmailFolder = emailFolder;
            activeEmailFolderController.Initialize();
            activeEmailFolderController.Run();

            ToolBarCommand uiNewEmailCommand = new ToolBarCommand(newEmailCommand, "_New email", 
                "Creates a new email.");
            ToolBarCommand uiDeleteEmailCommand = new ToolBarCommand(activeEmailFolderController.DeleteEmailCommand, "_Delete",
                "Deletes the selected email.");
            ToolBarCommand uiEmailAccountsCommand = new ToolBarCommand(emailAccountsController.EmailAccountsCommand, "_Email accounts",
                "Opens a window that shows the email accounts.");
            shellService.AddToolBarCommands(new[] { uiNewEmailCommand, uiDeleteEmailCommand, uiEmailAccountsCommand });
        }
Пример #3
0
        private void ShowEmails(EmailFolder emailFolder)
        {
            activeEmailFolderController             = emailFolderControllerFactory.CreateExport().Value;
            activeEmailFolderController.EmailFolder = emailFolder;
            activeEmailFolderController.Initialize();
            activeEmailFolderController.Run();

            var uiNewEmailCommand    = new ToolBarCommand(newEmailCommand, "_New email", "Creates a new email.");
            var uiDeleteEmailCommand = new ToolBarCommand(activeEmailFolderController.DeleteEmailCommand, "_Delete",
                                                          "Deletes the selected email.");
            var uiEmailAccountsCommand = new ToolBarCommand(emailAccountsController.EmailAccountsCommand, "_Email accounts",
                                                            "Opens a window that shows the email accounts.");

            shellService.AddToolBarCommands(new[] { uiNewEmailCommand, uiDeleteEmailCommand, uiEmailAccountsCommand });
        }
Пример #4
0
 private void CloseCurrentView()
 {
     shellService.ClearToolBarCommands();
     
     if (activeEmailFolderController != null)
     {
         activeEmailFolderController.Shutdown();
         activeEmailFolderController = null;
     }
 }