Пример #1
0
 public override MathNode CreateDefaultNode(int i)
 {
     if (i == 0)
     {
         MathNodeObjRef v = new MathNodeObjRef(this);
         v.ObjectReference.Type = MathExp.RaisTypes.ObjectRefType.Property;
         return(v);
     }
     else if (i == 1)
     {
         MathNodeDefaultValue v = new MathNodeDefaultValue(this);
         return(v);
     }
     return(base.CreateDefaultNode(i));
 }
Пример #2
0
 public override System.Drawing.SizeF OnCalculateDrawSize(System.Drawing.Graphics g)
 {
     if (this[1] is MathNodeDefaultValue)
     {
         MathNodeDefaultValue v = this[1] as MathNodeDefaultValue;
         if (v != null && v.InPort != null)
         {
             if (v.InPort.LinkedPortID != 0)
             {
                 return(this[0].CalculateDrawSize(g));
             }
         }
     }
     return(base.OnCalculateDrawSize(g));
 }
Пример #3
0
 public override void OnDraw(System.Drawing.Graphics g)
 {
     if (this[1] is MathNodeDefaultValue)
     {
         MathNodeDefaultValue v = this[1] as MathNodeDefaultValue;
         if (v != null && v.InPort != null)
         {
             if (v.InPort.LinkedPortID != 0)
             {
                 this[0].OnDraw(g);
                 return;
             }
         }
     }
     base.OnDraw(g);
 }