Esempio n. 1
0
 public TwitterAccountConfigurationViewModel(SettingFlipViewModel parent, TwitterAccount account)
 {
     _parent       = parent;
     this._account = account;
     _accounts     = new DispatcherCollection <TwitterAccountViewModel>(DispatcherHelper.UIDispatcher);
     Setting.Accounts.Collection.ListenCollectionChanged()
     .Subscribe(_ => RefreshCandidates());
     this.RefreshCandidates();
 }
 public MainWindowViewModel()
 {
     CompositeDisposable.Add(_backstageViewModel = new BackstageViewModel());
     CompositeDisposable.Add(this._inputViewModel = new InputViewModel());
     CompositeDisposable.Add(_mainAreaViewModel = new MainAreaViewModel());
     CompositeDisposable.Add(_globalAccountSelectionFlipViewModel = new AccountSelectionFlipViewModel());
     CompositeDisposable.Add(_settingFlipViewModel = new SettingFlipViewModel(this));
     CompositeDisposable.Add(_tabConfigurationFlipViewModel = new TabConfigurationFlipViewModel());
     CompositeDisposable.Add(_searchFlipViewModel = new SearchFlipViewModel());
     CompositeDisposable.Add(Observable
         .FromEvent<FocusRequest>(
             h => MainWindowModel.FocusRequested += h,
             h => MainWindowModel.FocusRequested -= h)
         .Subscribe(SetFocus));
     CompositeDisposable.Add(Observable
         .FromEvent<bool>(
             h => MainWindowModel.BackstageTransitionRequested += h,
             h => MainWindowModel.BackstageTransitionRequested -= h)
         .Subscribe(this.TransitionBackstage));
     CompositeDisposable.Add(Setting.BackgroundImagePath.ListenValueChanged(
         _ =>
         {
             RaisePropertyChanged(() => BackgroundImageUri);
             RaisePropertyChanged(() => BackgroundImage);
         }));
     CompositeDisposable.Add(Setting.BackgroundImageTransparency.ListenValueChanged(
         _ => RaisePropertyChanged(() => BackgroundImageOpacity)));
     this._backstageViewModel.Initialize();
 }
Esempio n. 3
0
 public TwitterAccountConfigurationViewModel(SettingFlipViewModel parent, TwitterAccount account)
 {
     _parent = parent;
     this._account = account;
     _accounts = new DispatcherCollection<TwitterAccountViewModel>(DispatcherHelper.UIDispatcher);
     Setting.Accounts.Collection.ListenCollectionChanged()
            .Subscribe(_ => RefreshCandidates());
     this.RefreshCandidates();
 }
 public MainWindowViewModel()
 {
     CompositeDisposable.Add(_backstageViewModel = new BackstageViewModel());
     CompositeDisposable.Add(_inputAreaViewModel = new InputAreaViewModel());
     CompositeDisposable.Add(_mainAreaViewModel = new MainAreaViewModel());
     CompositeDisposable.Add(_globalAccountSelectionFlipViewModel = new AccountSelectionFlipViewModel());
     CompositeDisposable.Add(_settingFlipViewModel = new SettingFlipViewModel(this));
     CompositeDisposable.Add(_tabConfigurationFlipViewModel = new TabConfigurationFlipViewModel());
     CompositeDisposable.Add(_searchFlipViewModel = new SearchFlipViewModel());
     CompositeDisposable.Add(Observable.FromEvent<FocusRequest>(
         h => MainWindowModel.FocusRequested += h,
         h => MainWindowModel.FocusRequested -= h)
                                       .Subscribe(SetFocus));
     CompositeDisposable.Add(Observable.FromEvent<bool>(
         h => MainWindowModel.BackstageTransitionRequested += h,
         h => MainWindowModel.BackstageTransitionRequested -= h)
                                       .Subscribe(this.TransitionBackstage));
     this._backstageViewModel.Initialize();
 }