private void OnAdd() { var win = new ManualAddWindow(); win.ShowDialog(); Manuals = _mSrv.GetManuals(); if (Manuals.Count != 0) { SelManual = Manuals.First(); } }
public ManualViewModel(IMapper mapper, Fanuc fanuc, ManualService mSrv) { this._fanuc = fanuc; this._mapper = mapper; this._mSrv = mSrv; _AddCmd = new RelayCommand(OnAdd); _DeleteCmd = new RelayCommand(OnDelete); _OpenCmd = new RelayCommand(OnOpen); Manuals = _mSrv.GetManuals(); if (Manuals.Count != 0) { SelManual = Manuals.First(); } }