コード例 #1
0
 public SearchResultViewModel(SearchFlipViewModel parent, SearchResultModel model)
     : base(model)
 {
     _parent = parent;
     _model = model;
     this.CompositeDisposable.Add(
         new EventListener<Action>(
             h => _model.FocusRequired += h,
             h => _model.FocusRequired -= h,
             this.SetFocus));
 }
コード例 #2
0
 public MainWindowViewModel()
 {
     CompositeDisposable.Add(_backstageViewModel = new BackstageViewModel());
     CompositeDisposable.Add(_inputAreaViewModel = new InputAreaViewModel());
     CompositeDisposable.Add(_mainAreaViewModel = new MainAreaViewModel());
     CompositeDisposable.Add(_globalAccountSelectionFlipViewModel = new AccountSelectionFlipViewModel());
     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<Tuple<string, FilterExpressionBase>>(
         h => MainWindowModel.ConfirmMuteRequested += h,
         h => MainWindowModel.ConfirmMuteRequested -= h)
         .Subscribe(OnMuteRequested));
     CompositeDisposable.Add(Observable.FromEvent<bool>(
         h => MainWindowModel.BackstageTransitionRequested += h,
         h => MainWindowModel.BackstageTransitionRequested -= h)
         .Subscribe(this.TransitionBackstage));
     this._backstageViewModel.Initialize();
 }
コード例 #3
0
 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();
 }
コード例 #4
0
 public SearchResultViewModel(SearchFlipViewModel parent, SearchResultModel model)
     : base(model)
 {
     _parent = parent;
     _model = model;
 }