public OutputViewModel(IMessageAggregator messenger)
 {
     Logs = new BindableCollection <LogViewModel>();
     messenger.GetStream <EcrRespondedEvent>()
     .Subscribe(e => Log(e.Response));
     messenger.GetStream <EcrThrewExceptionEvent>()
     .Subscribe(e => Log(e.Exception));
 }
Ejemplo n.º 2
0
 public ShellViewModel(IMessageAggregator messenger)
 {
     PortNames  = new ObservableCollection <string>(SerialPort.GetPortNames());
     _messenger = messenger;
     messenger.GetStream <ChangeSelectedPortCommand>()
     .Subscribe(cmd =>
     {
         this._selectedPortName = cmd.PortName;
         NotifyOfPropertyChange(() => SelectedPortName);
     });
 }
Ejemplo n.º 3
0
		public ShellViewModel(IMessageAggregator messenger)
		{
			PortNames = new ObservableCollection<string>(SerialPort.GetPortNames());
			_messenger = messenger;
			messenger.GetStream<ChangeSelectedPortCommand>()
				.Subscribe(cmd =>
				{
					this._selectedPortName = cmd.PortName;
					NotifyOfPropertyChange(() => SelectedPortName);
				});
		}