コード例 #1
0
 public ProducerListViewModel(BLC.BLC blc, Action <int> tab_no)
 {
     this.blc      = blc;
     _tab_no       = tab_no;
     ProducersList = new ObservableCollection <ProducerViewModel>(
         blc.GetProducers().Select(p => new ProducerViewModel(p)));
     AddProducerCommand = new RCommand(_ => AddProducer());
 }
コード例 #2
0
 public InstrumentListViewModel(BLC.BLC blc, Action <int> tab_no, ObservableCollection <ProducerViewModel> producers)
 {
     this.blc    = blc;
     _tab_no     = tab_no;
     Instruments = new ObservableCollection <InstrumentViewModel>(
         blc.GetInstruments().Select(p => new InstrumentViewModel(p)));
     CreateInstrumentCommand = new RCommand(_ => CreateInstrument());
     DeleteInstrumentCommand = new RCommand(_ => DeleteInstrument(), _ => CurrentInstrument != null);
     SaveInstrumentCommand   = new RCommand(_ => SaveInstrument(), _ => CurrentInstrument != null);
     AvailableProducers      = producers;
 }