Example #1
0
        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);
            }
        }
Example #2
0
        public UnitArrang(BComponent units, IEditWindow window)
        {
            this.window = window;
            rows.Add(new List <BComponent>());

            BuildArrangMap(units, 0);
            currentRowId = findLongestRow;
        }
Example #3
0
 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);
 }
Example #4
0
 public BatchEditWindowTestViewModel(ICrudMgr <RealData> mgr, IMessageBox messageBox, IEditWindow editWindow) :
     base(mgr, messageBox, editWindow)
 {
 }