public EditWindowViewModel(IEditWindow view) { View = view; View.BindDataContext(this); ds = new DataService(); var MainRes = App.Container.Resolve <IMainWindowViewModel>(); Receipe = MainRes.SelectedReceipe; RecIngList = new ObservableCollection <ReceipeIngridient>(); foreach (var item in MainRes.ReceipeIngridientList) { RecIngList.Add(item); } IngredientList = new ObservableCollection <string>(); foreach (var item in ds.GetIng()) { IngredientList.Add(item.IngredientName); } UnitList = new ObservableCollection <string>(); foreach (var item in ds.GetUnits()) { UnitList.Add(item.UnitName); } }
public UnitArrang(BComponent units, IEditWindow window) { this.window = window; rows.Add(new List <BComponent>()); BuildArrangMap(units, 0); currentRowId = findLongestRow; }
protected BatchEditWithWindow(ICrudMgr <T> mgr, IMessageBox messageBox, IEditWindow editWindow) : base(mgr, messageBox) { _editWindow = editWindow; _refreshCommand = new DelegateCommand(Refresh); _addCommand = new DelegateCommand(Add); _modifyCommand = new DelegateCommand(Modify); _deleteCommand = new DelegateCommand(Delete); _saveCommand = new DelegateCommand(Save); }
public BatchEditWindowTestViewModel(ICrudMgr <RealData> mgr, IMessageBox messageBox, IEditWindow editWindow) : base(mgr, messageBox, editWindow) { }