/// <summary>
        /// Create a process action view model.
        /// </summary>
        /// <param name="process">
        /// The process.
        /// </param>
        /// <param name="action">
        /// The action.
        /// </param>
        /// <returns>
        /// The <see cref="IProcessActionViewModel"/>.
        /// </returns>
        public IProcessActionViewModel CreateViewModel(ProcessEdit process, ProcessActionEdit action)
        {
            var viewModel = new ProcessActionViewModel(PropertyPathViewModelFactory);
            viewModel.Refresh(process, action);

            return viewModel;
        }
        /// <summary>
        /// The refresh.
        /// </summary>
        /// <param name="process">
        /// The process.
        /// </param>
        /// <param name="action">
        /// The action.
        /// </param>
        public void Refresh(ProcessEdit process, ProcessActionEdit action)
        {
            Model = action;
            ParentProcess = process;
            _actionType = Model.ActionType;
            RaisePropertyChanged(() => ActionType);

            UpdateAssignmentProperties();
        }
Beispiel #3
0
 /// <summary>
 /// Determines whether the action type has changed.
 /// </summary>
 /// <param name="e">
 /// The event args.
 /// </param>
 /// <param name="action">
 /// The action.
 /// </param>
 /// <returns>
 /// <c>true</c> if the action type has changed; otherwise, <c>false</c>.
 /// </returns>
 public static bool HasActionTypeChanged(ChildChangedEventArgs e, ProcessActionEdit action)
 {
     return e.ChildObject is ProcessActionEdit && e.ChildObject == action && e.PropertyChangedArgs != null
            && e.PropertyChangedArgs.PropertyName == ProcessActionEdit.ActionTypeProperty.Name;
 }