예제 #1
0
 public DisplayContainer(AccountConfig account)
 {
     View            = new EmailListViewModel(account);
     DisplayIndex    = account.DisplayIndex;
     DisplayNameView = account.DisplayName;
     ToLoad          = account.IsConfigured;
 }
예제 #2
0
        private void DeleteEmail()
        {
            var nextEmail = CollectionHelper.GetNextElementOrDefault(EmailListViewModel.Emails, EmailListViewModel.SelectedEmail);

            EmailFolder.RemoveEmail(EmailListViewModel.SelectedEmail);
            EmailListViewModel.SelectedEmail = nextEmail ?? EmailListViewModel.Emails.LastOrDefault();
            EmailListViewModel.FocusItem();
        }
예제 #3
0
 public EmailFolderController(IShellService shellService, EmailLayoutViewModel emailLayoutViewModel, EmailListViewModel emailListViewModel, EmailViewModel emailViewModel)
 {
     this.shellService         = shellService;
     this.emailLayoutViewModel = emailLayoutViewModel;
     EmailListViewModel        = emailListViewModel;
     EmailViewModel            = emailViewModel;
     deleteEmailCommand        = new DelegateCommand(DeleteEmail, CanDeleteEmail);
 }
예제 #4
0
 public EmailFolderController(IShellService shellService, EmailLayoutViewModel emailLayoutViewModel, EmailListViewModel emailListViewModel, EmailViewModel emailViewModel)
 {
     this.shellService = shellService;
     this.emailLayoutViewModel = emailLayoutViewModel;
     this.emailListViewModel = emailListViewModel;
     this.emailViewModel = emailViewModel;
     this.deleteEmailCommand = new DelegateCommand(DeleteEmail, CanDeleteEmail);
 }
예제 #5
0
        public async Task <IActionResult> EmailInfoManager()
        {
            var emails = await this.searchService.GetAllEmailsForManagerAsync();

            var libraryViewModel = new EmailListViewModel(emails);

            return(View(libraryViewModel));
        }
예제 #6
0
        private void DeleteEmail()
        {
            // Use the EmailCollectionView, which represents the sorted/filtered state of the emails, to determine the next email to select.
            var nextEmail = CollectionHelper.GetNextElementOrDefault(EmailListViewModel.EmailCollectionView, EmailListViewModel.SelectedEmail);

            EmailFolder.RemoveEmail(EmailListViewModel.SelectedEmail);
            EmailListViewModel.SelectedEmail = nextEmail ?? EmailListViewModel.EmailCollectionView.LastOrDefault();
            EmailListViewModel.FocusItem();
        }
예제 #7
0
        public async Task <IActionResult> Index(Guid application)
        {
            var model = new EmailListViewModel()
            {
                Application  = application,
                Applications = await Registry.GetApplications(),
                Emails       = await Server.GetEmails(application, DateTime.Now.Subtract(new TimeSpan(1, 0, 0, 0)), DateTime.Now, 1, 10)
            };

            return(View(model));
        }