public DisplayContainer(AccountConfig account) { View = new EmailListViewModel(account); DisplayIndex = account.DisplayIndex; DisplayNameView = account.DisplayName; ToLoad = account.IsConfigured; }
private void DeleteEmail() { var nextEmail = CollectionHelper.GetNextElementOrDefault(EmailListViewModel.Emails, EmailListViewModel.SelectedEmail); EmailFolder.RemoveEmail(EmailListViewModel.SelectedEmail); EmailListViewModel.SelectedEmail = nextEmail ?? EmailListViewModel.Emails.LastOrDefault(); EmailListViewModel.FocusItem(); }
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); }
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); }
public async Task <IActionResult> EmailInfoManager() { var emails = await this.searchService.GetAllEmailsForManagerAsync(); var libraryViewModel = new EmailListViewModel(emails); return(View(libraryViewModel)); }
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(); }
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)); }