예제 #1
0
        public ViewModel()
        {
            _instrumentRepository = new MyInstrumentRepository();
            _instrumentRepository.Init(50);
            Instruments =
                new ObservableCollection <InstrumentViewModel>(
                    _instrumentRepository.GetInstruments().Select(instrument => new InstrumentViewModel(instrument)));
            _pricer = new Pricer(_instrumentRepository, 1);

            StartCommand   = new RelayCommand(o => { _pricer.Price(); }, o => true);
            StopCommand    = new RelayCommand(o => { _pricer.StopPrice(); }, o => true);
            RestartCommand = new RelayCommand(o => { _pricer.Restart(); }, o => true);
        }
예제 #2
0
 private void Stop(object sender, EventArgs e)
 {
     _pricer.StopPrice();
 }