Пример #1
0
        internal MailAccountContext(MailAccountModel account)
        {
            _account                          = account;
            _appContext                       = App.Context;
            _takeOnlineHint                   = true;
            _outbox                           = new OutboxContext(this);
            _registerCommand                  = new RelayCommand(OnRegister);
            _listMailboxesCommand             = new RelayCommand(OnListMailboxes);
            _testSettingsCommand              = new RelayCommand(OnTestSettings);
            _configAccountCommand             = new RelayCommand(OnConfigAccount);
            _deleteAccountCommand             = new RelayCommand(OnDeleteAccount);
            _showUnsubscribedMailboxesCommand = new RelayCommand(OnShowUnsubscribedMailboxes);
            _hideUnsubscribedMailboxesCommand = new RelayCommand(OnHideUnsubscribedMailboxes);
            _isAutoDetectPreferred            = true;

            _mailboxes = new ObservableCollection <MailboxContext>();
            _mailboxes.CollectionChanged += (sender, e) => {
                RaisePropertyChanged(() => HasMailboxes);
                RaisePropertyChanged(() => Children);
                RaisePropertyChanged(() => MailboxRoots);
            };
        }
Пример #2
0
 private static async Task RequestOutboxContentAsync(OutboxContext outbox)
 {
     await outbox.LoadSmtpRequestsAsync();
 }