/// <summary> /// Initializes a new instance of the <see cref="TitledCommandEx"/> class. /// </summary> /// <param name="command">The command.</param> /// <param name="title">The title.</param> /// <param name="iconURL">The icon URL.</param> /// <param name="viewModel">The view model.</param> /// <param name="help">The help.</param> /// <param name="isBeta"></param> public TitledCommandEx(ICommand command, string title, string iconURL, BaseViewModel viewModel, string help = "test", bool isBeta = false) : base(command, title, iconURL, help) { if (command == null) return; _isBeta = isBeta; _externalCommand = new ActionCommand<object>(ExecuteExternalCommand); _internalCommand = command; }
/// <summary> /// Initializing FieldDocumentEditViewModel. /// </summary> /// <param name="stepEdit">The ProcessViewSectionStepEdit.</param> /// <param name="parent">Parent model.</param> public void Init(IProcessViewSectionStepEdit stepEdit, BaseViewModel parent) { Model = (FieldListDocumentStepEdit)stepEdit; Parent = parent; if (Model != null && Model.DocumentFieldsList != null) { foreach (var viewModel in this.Model.DocumentFieldsList.Select(document => new FieldDocumentEditViewModel(document, this))) { this.Fields.Add(viewModel); } } else if (Model != null) { Model.DocumentFieldsList = new FieldDocumentList(); } Header = stepEdit.Header; }
/// <summary> /// Initializes the specified step edit. /// </summary> /// <param name="stepEdit">The step edit.</param> /// <param name="parent">The parent.</param> public void Init(IProcessViewSectionStepEdit stepEdit, BaseViewModel parent) { Model = (SingleFieldStepEdit)stepEdit; Header = stepEdit.Header; Parent = parent; var process = Model.GetParent<ProcessEdit>(); if (process != null) { var weakListener = new WeakEventListener <SingleFieldProcessViewSectionStepViewModel, ProcessEdit, ChildChangedEventArgs>(this, process); process.ChildChanged += weakListener.OnEvent; weakListener.OnEventAction += OnProcessChildPropertyChanged; weakListener.OnDetachAction += Static; } FieldTypeFilters = GetSimpleFieldTypes(); }