/// <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;
        }
예제 #2
0
        /// <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();
        }
예제 #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;
 }