Beispiel #1
0
 public DelegateUserViewModel(DelegateUser ewsDelegateUser, DelegatesViewModel parentDelegatesViewModel)
 {
     EwsDelegateUser          = ewsDelegateUser;
     ParentDelegatesViewModel = parentDelegatesViewModel;
     RemoveDelegateCommand    = new Command
     {
         CanExecuteDelegate = () => (!parentDelegatesViewModel.Worker.IsBusy),
         ExecuteDelegate    = x => ParentDelegatesViewModel.RemoveDelegate(EwsDelegateUser)
     };
 }
Beispiel #2
0
        public MailboxViewModel(MailboxWrapper mailbox)
        {
            Mailbox                              = mailbox;
            Folders                              = new ObservableCollection <MailboxFolderViewModel>();
            Delegates                            = new DelegatesViewModel(this);
            getFoldersWorker                     = new BackgroundWorker();
            getFoldersWorker.DoWork             += getFoldersWorker_DoWork;
            getFoldersWorker.RunWorkerCompleted += getFoldersWorker_RunWorkerCompleted;
            getFoldersWorker.RunWorkerAsync();

            MailboxesAndGroupsView        = new ListCollectionView(MasterAddressList);
            MailboxesAndGroupsView.Filter = obj => (((MailboxWrapper)obj).DistinguishedName != Mailbox.DistinguishedName);
        }