/// <summary> /// Creates the <see cref="ActionBase" /> derived class instace. /// </summary> /// <returns> /// The instance of <see cref="ActionBase" /> derived class. /// </returns> /// <exception cref="System.NotImplementedException"></exception> public override ActionBase CreateAction() { var result = new SendToWindowAction(); result.ActionsToExecute.Add(new SendTextAction()); return(result); }
/// <summary> /// Initializes a new instance of the <see cref="SendToWindowActionViewModel"/> class. /// </summary> /// <param name="action">The action.</param> /// <param name="actionDescriptor">The action descriptor.</param> /// <param name="allActionDescriptions">All action descriptions.</param> public SendToWindowActionViewModel([NotNull] SendToWindowAction action, [NotNull] ActionDescription actionDescriptor, [NotNull] IEnumerable <ActionDescription> allActionDescriptions) : base(action, actionDescriptor, allActionDescriptions) { _action = action; _allDescriptors = allActionDescriptions; _actionsToExecute = new ActionsViewModel(action.ActionsToExecute, allActionDescriptions); _actionsToExecute.PropertyChanged += HandleActionDescriptionChange; }
/// <summary> /// Clones this instance. /// </summary> /// <returns> /// A deep copy of this instance. /// </returns> /// <exception cref="System.NotImplementedException"></exception> public override ActionViewModelBase Clone() { var conditionalAction = new SendToWindowAction(); return(new SendToWindowActionViewModel(conditionalAction, ActionDescriptor, _allDescriptors) { OutputWindowName = OutputWindowName, SendToAllWindows = SendToAllWindows, ActionsToExecute = ActionsToExecute.Clone(conditionalAction.ActionsToExecute) }); }