コード例 #1
0
        public ShellViewModel(IEventMessager eventMessager)
        {
            Title = "Big XAML Apps Demo";
            ShowSpotTileCommand = new SimpleCommand <object, object>(x => eventMessager.Publish(new ShowNewSpotTileMessage()));
            SpotTrades          = new ObservableCollection <SpotTrade>();

            eventMessager.Observe <SpotTrade>()
            .Subscribe(x =>
            {
                this.SpotTrades.Add(x);
                base.RaisePropertyChanged(() => SpotTrades);
            });
        }
コード例 #2
0
        public ShellViewModel(IEventMessager eventMessager)
        {
            Title = "Big XAML Apps Demo";
            ShowSpotTileCommand = new SimpleCommand<object, object>(x => eventMessager.Publish(new ShowNewSpotTileMessage()));
            SpotTrades = new ObservableCollection<SpotTrade>();

            eventMessager.Observe<SpotTrade>()
                .Subscribe(x =>
                {
                    this.SpotTrades.Add(x);
                    base.RaisePropertyChanged(()=>SpotTrades);
                });
        }
コード例 #3
0
 private void SetupTopLevelSubscription()
 {
     disposables.Add(spotTileViewModel.OkCommand.CommandExecutedStream.Subscribe(
                         x =>
     {
         spotTileViewModel.IsEnabled = false;
         eventMessager.Publish(new SpotTrade(
                                   spotTileViewModel.SelectedDate,
                                   spotTileViewModel.FakeSpotPair,
                                   spotTileViewModel.RateViewModel.WholeRate,
                                   DateTime.Now));
     }));
 }