示例#1
0
        public ChromeViewModel(IStartWindowViewModel main, IOverlayService overlayService)
        {
            Main = main;

            overlayService.Show
            .Subscribe(UpdateOverlay)
            .DisposeWith(this);

            CloseOverlayCommand = ReactiveCommand <object> .Create()
                                  .DisposeWith(this);

            CloseOverlayCommand.Subscribe(x => ClearOverlay())
            .DisposeWith(this);
        }
示例#2
0
        public ChromeViewModel(IMainViewModel main, IOverlayService overlayService)
        {
            Main = main;

            overlayService.Show
            .Subscribe(x => UpdateOverlay(x))
            .DisposeWith(this);

            CloseOverlayCommand = ReactiveCommand <object> .Create()
                                  .DisposeWith(this);

            CloseOverlayCommand.Subscribe(x => ClearOverlay())
            .DisposeWith(this);

            Disposable.Create(() => CloseOverlayCommand = null)
            .DisposeWith(this);
        }