public ActionViewModel(Action actionTemplate, ActionsViewModel actionsViewModel, IErrorCatch errorCatcher) { this.ActionsViewModel = actionsViewModel; this.EditableAction = actionTemplate; this.Name = actionTemplate.Name; this.EditableActionParams = new ObservableCollection<ActionParam>(); this.AddActionCommand = new DelegateCommand<object>(this.OnAddAction); var actionParams = this.EditableAction.ActionParams.ToList(); foreach (var actionParam in actionParams) this.EditableActionParams.Add(actionParam); base.ErrorCatcher = errorCatcher; }
public ActionViewModel(Action actionTemplate, ActionsViewModel actionsViewModel, IErrorCatch errorCatcher) { this.ActionsViewModel = actionsViewModel; this.EditableAction = actionTemplate; this.Name = actionTemplate.Name; this.EditableActionParams = new ObservableCollection <ActionParam>(); this.AddActionCommand = new DelegateCommand <object>(this.OnAddAction); var actionParams = this.EditableAction.ActionParams.ToList(); foreach (var actionParam in actionParams) { this.EditableActionParams.Add(actionParam); } base.ErrorCatcher = errorCatcher; }
protected virtual void InitViewModels() { ActionsViewModel = new ActionsViewModel(BaseLayer, ActionErrorCatcher); ActionViewModel = new ActionViewModel(CreateActionTemplate(), ActionsViewModel, ActionErrorCatcher); EventsViewModel = new EventsViewModel(BaseLayer, EventErrorCatcher); EventViewModel = new EventViewModel(CreateEventTemplate(), EventsViewModel, EventErrorCatcher); TaskParamsViewModel = new TaskParamsViewModel(BaseLayer, TaskParamErrorCatcher); EventsDepActionsViewModel = new EventsDepActionsViewModel(BaseLayer, EventErrorCatcher); EventDepActionViewModel = new EventDepActionViewModel(BaseLayer, CreateEventTemplate(), EventsDepActionsViewModel, EventErrorCatcher); }