public void AddTransitionHandler(object sender, EventArgs args) { SelectStartAndTargetStateForTransition dialog = new SelectStartAndTargetStateForTransition(); dialog.SetStateMachine(Item.EnclosingStateMachine, Item); dialog.ShowDialog(GuiUtils.MdiWindow); if (dialog.OkCkicked) { State sourceState = Item.EnclosingStateMachine.FindState(dialog.StartStateName); if (sourceState != null) { Rule rule = Rule.CreateDefault(sourceState.StateMachine.Rules); sourceState.StateMachine.appendRules(rule); RuleCondition ruleCondition = (RuleCondition)rule.RuleConditions[0]; Action action = Action.CreateDefault(ruleCondition.Actions); action.ExpressionText = "THIS <- " + dialog.EndStateName; ruleCondition.appendActions(action); RefreshModel.Execute(); } } }
/// <summary> /// Adds an action /// </summary> public void AddActionHandler(object sender, EventArgs args) { Item.appendActions(Action.CreateDefault(Item.Actions)); }
public void AddHandler(object sender, EventArgs args) { Item.appendActions(Action.CreateDefault(Item.Actions)); Item.setVerified(false); }