Example #1
0
 public CategoryCommand(DGNode node, DGFlag newValue)
 {
     this.mNode     = node;
     this.mOldValue = node.mCategory;
     this.mNewValue = newValue;
     this.mLabel    = "Change DG Node Category";
 }
Example #2
0
        public void SetCategory(DGFlag category, bool set = true)
        {
            DGFlag flags = set ? this.mCategory | category : this.mCategory & ~category;

            if (this.mCategory != flags)
            {
                this.mCategory = flags;
                this.UpdateDecisionGraph();
            }
        }
Example #3
0
 public void SetCategory(DGFlag category, bool set = true)
 {
     if (set)
     {
         this.mCategory |= category;
     }
     else
     {
         this.mCategory &= ~category;
     }
 }
Example #4
0
            private void SetValue(DGFlag value)
            {
                DecisionGraph dg = this.mNode.mState.State.DecisionGraph;

                if (dg != null && this.mNode.mDGN != null)
                {
                    dg.Remove(this.mNode.mDGN);
                    if ((DGFlag.EntryPoint & value) ==
                        DGFlag.EntryPoint)
                    {
                        dg.AddEntryPoint(this.mNode.mDGN);
                    }
                    if ((DGFlag.DecisionMaker & value) ==
                        DGFlag.DecisionMaker)
                    {
                        dg.AddDecisionMaker(this.mNode.mDGN);
                    }
                }
                this.mNode.mCategory = value;
            }