Example #1
0
        private void NewEmailAccount()
        {
            EditEmailAccountController editEmailAccountController = editEmailAccountControllerFactory.CreateExport().Value;

            editEmailAccountController.OwnerWindow  = emailAccountsViewModel.View;
            editEmailAccountController.EmailAccount = new EmailAccount();

            editEmailAccountController.Initialize();
            if (editEmailAccountController.Run())
            {
                Root.AddEmailAccount(editEmailAccountController.EmailAccount);
            }
        }
Example #2
0
        private void EditEmailAccount()
        {
            var originalAccount = emailAccountsViewModel.SelectedEmailAccount;

            EditEmailAccountController editEmailAccountController = editEmailAccountControllerFactory.CreateExport().Value;

            editEmailAccountController.OwnerWindow  = emailAccountsViewModel.View;
            editEmailAccountController.EmailAccount = originalAccount.Clone();

            editEmailAccountController.Initialize();
            if (editEmailAccountController.Run())
            {
                Root.ReplaceEmailAccount(originalAccount, editEmailAccountController.EmailAccount);
            }
        }