Пример #1
0
 public ManageExchangeSourceViewModel(IManageExchangeSourceModel updateManager, IEventAggregator aggregator, IExchangeSource exchangeSource, IAsyncWorker AsyncWorker)
     : this(updateManager, aggregator)
 {
     VerifyArgument.IsNotNull("exchangeSource", exchangeSource);
     AsyncWorker.Start(() => updateManager.FetchSource(exchangeSource.ResourceID), source =>
     {
         _emailServiceSource      = source;
         _emailServiceSource.Path = exchangeSource.Path;
         FromModel(_emailServiceSource);
         SetupHeaderTextFromExisting();
     });
 }
Пример #2
0
 public ManageExchangeSourceViewModel(IManageExchangeSourceModel updateManager, IEventAggregator aggregator)
     : base("ExchangeSource")
 {
     VerifyArgument.IsNotNull("updateManager", updateManager);
     VerifyArgument.IsNotNull("aggregator", aggregator);
     _updateManager = updateManager;
     SendCommand    = new DelegateCommand(p => TestConnection(), p => CanTest());
     OkCommand      = new DelegateCommand(p => SaveConnection(), p => CanSave());
     Testing        = false;
     _testPassed    = false;
     _testFailed    = false;
 }
Пример #3
0
 public ManageExchangeSourceViewModel(IManageExchangeSourceModel updateManager, Task <IRequestServiceNameViewModel> requestServiceNameViewModel, IEventAggregator aggregator) : this(updateManager, aggregator)
 {
     VerifyArgument.IsNotNull("requestServiceNameViewModel", requestServiceNameViewModel);
     _updateManager = updateManager;
     RequestServiceNameViewModel = requestServiceNameViewModel;
     HeaderText      = Resources.Languages.Core.ExchangeSourceNewHeaderLabel;
     Header          = Resources.Languages.Core.ExchangeSourceNewHeaderLabel;
     AutoDiscoverUrl = string.Empty;
     UserName        = string.Empty;
     Password        = string.Empty;
     Timeout         = 10000;
 }