public ActionEditorViewModel( ObjectAction selectedAction, IEnumerable <ObjectAction> actions, DataProvider dataProvider) { _isInEditMode = true; _actions = actions; _objectsRepository = dataProvider.ObjectsRepository; _variablesRepository = dataProvider.VariablesRepository; _dialogsHelper = dataProvider.DialogsManager; Action = selectedAction; Title = "Редактирование действия"; Init(); Update(); //HasChanges = false; }
public ActionEditorViewModel( IVariableWrapper variable, IEnumerable <ObjectAction> actions, DataProvider dataProvider) { _isInEditMode = false; _actions = actions; _objectsRepository = dataProvider.ObjectsRepository; _variablesRepository = dataProvider.VariablesRepository; _dialogsHelper = dataProvider.DialogsManager; Action = new ObjectAction(variable); Title = "Создание действия"; Init(); ConditionOperand = ConditionOperands.Count == 0 ? null : ConditionOperands[0]; Operation = ActionOperation.SetValue; TargetName = TargetIsEmpty ? null : TargetNames[0]; //HasChanges = false; }