public virtual void CheckForErrors(Behaviac.Design.Nodes.BehaviorNode rootBehavior, List <Behaviac.Design.Nodes.Node.ErrorCheck> result) { if (!this.IsPrecondition && !this.IsEffector) { //flagStr = "event"; } else if (this.IsPrecondition) { //flagStr = "precondition"; if (this.IsEffector) { result.Add(new Nodes.Node.ErrorCheck(this.Node, this.Id, this.Label, Nodes.ErrorCheckLevel.Error, "the attachment can only be a Precondition or an Effector!")); } } else if (this.IsEffector) { //flagStr = "effector"; if (this.IsPrecondition) { result.Add(new Nodes.Node.ErrorCheck(this.Node, this.Id, this.Label, Nodes.ErrorCheckLevel.Error, "the attachment can only be a Precondition or an Effector!")); } } else { Debug.Check(false); } }
private List <ParInfo> getPars() { List <ParInfo> pars = new List <ParInfo>(); Nodes.Node node = _object as Nodes.Node; Attachments.Attachment attach = _object as Attachments.Attachment; if (node != null || attach != null || this._root != null) { Behaviac.Design.Nodes.BehaviorNode bn = (node != null ? node.Behavior : null); if (bn == null) { bn = (attach != null ? attach.Behavior : null); } if (bn == null && this._root != null) { bn = this._root.Behavior; } List <ParInfo> allPars = new List <ParInfo>(); ((Nodes.Node)bn).GetAllPars(ref allPars); foreach (ParInfo par in allPars) { if (!string.IsNullOrEmpty(par.Name)) { if (Plugin.IsCompatibleType(FilterType, par.Type)) { pars.Add(par); } } } } return(pars); }
public override NodeViewData CreateNodeViewData(NodeViewData parent, Behaviac.Design.Nodes.BehaviorNode rootBehavior) { NodeViewDataStyled nvd = new NodeViewDataStyled(parent, rootBehavior, this, null, __defaultBackgroundBrush, _label, _description); nvd.ChangeShape(NodeShape.Rectangle); return(nvd); }
public override void CheckForErrors(Behaviac.Design.Nodes.BehaviorNode rootBehavior, List <ErrorCheck> result) { if (_condition.Child == null) { result.Add(new Behaviac.Design.Nodes.Node.ErrorCheck(this, Behaviac.Design.Nodes.ErrorCheckLevel.Error, "You have to specify the condition")); } if (_if.Child == null) { result.Add(new Behaviac.Design.Nodes.Node.ErrorCheck(this, Behaviac.Design.Nodes.ErrorCheckLevel.Error, "'If' is not specified")); } if (_else.Child == null) { result.Add(new Behaviac.Design.Nodes.Node.ErrorCheck(this, Behaviac.Design.Nodes.ErrorCheckLevel.Error, "'Else' is not specified")); } base.CheckForErrors(rootBehavior, result); }
void RootNode_WasSaved(Behaviac.Design.Nodes.BehaviorNode node) { Text = TabText = ((Nodes.Node)node).Label; }
public virtual void CheckForErrors(Behaviac.Design.Nodes.BehaviorNode rootBehavior, List <Behaviac.Design.Nodes.Node.ErrorCheck> result) { }