Example #1
0
 public override void SetElementValue(int n, ElementInfo ei)
 {
     if (n == 0)
     {
         Text = ei.Textf.Text;
     }
     if (n == 1)
     {
         mFlags = ei.ChangeFlag(mFlags, FLAG_INTERNAL);
     }
 }
Example #2
0
 public override void SetElementValue(int n, ElementInfo ei)
 {
     if (n == 0)
     {
         if (ei.CheckBox.Checked)
         {
             mFlags |= FLAG_FLIP_X;
         }
         else
         {
             mFlags &= ~FLAG_FLIP_X;
         }
         SetPoints();
     }
     if (n == 1)
     {
         if (ei.CheckBox.Checked)
         {
             mFlags |= FLAG_FLIP_Y;
         }
         else
         {
             mFlags &= ~FLAG_FLIP_Y;
         }
         SetPoints();
     }
     if (n == 2)
     {
         invertreset = ei.CheckBox.Checked;
         SetupPins();
         SetPoints();
     }
     if (n == 3 && ei.Value >= 3)
     {
         bits = (int)ei.Value;
         SetupPins();
         SetPoints();
     }
     if (n == 4)
     {
         modulus = (int)ei.Value;
     }
     if (n == 5)
     {
         mFlags = ei.ChangeFlag(mFlags, FLAG_UP_DOWN);
         SetupPins();
         SetPoints();
     }
 }
Example #3
0
 public override void SetElementValue(int n, ElementInfo ei)
 {
     if (n == 0)
     {
         mMaxResistance = ei.Value;
     }
     if (n == 1)
     {
         ReferenceName = ei.Textf.Text;
         mLabel.Text   = ReferenceName;
         ControlPanel.SetSliderPanelHeight();
         setNamePos();
     }
     if (n == 2)
     {
         mFlags = ei.ChangeFlag(mFlags, FLAG_SHOW_VALUES);
     }
 }
Example #4
0
 public override void SetElementValue(int n, ElementInfo ei)
 {
     if (n == 0)
     {
         ReferenceName = ei.Textf.Text;
         setTextPos();
     }
     if (n == 1)
     {
         mVt = mPnp * ei.Value;
     }
     if (n == 2 && ei.Value > 0)
     {
         mHfe = mLastHfe = ei.Value;
     }
     if (n == 3)
     {
         mGlobalFlags = (!ei.CheckBox.Checked)
             ? (mGlobalFlags | FLAG_HIDE_BULK) : (mGlobalFlags & ~(FLAG_HIDE_BULK | FLAG_DIGITAL));
         SetPoints();
         ei.NewDialog = true;
     }
     if (n == 4)
     {
         mFlags = ei.CheckBox.Checked
             ? (mFlags | FLAG_FLIP) : (mFlags & ~FLAG_FLIP);
         SetPoints();
     }
     if (n == 5 && !ShowBulk)
     {
         mGlobalFlags = ei.CheckBox.Checked
             ? (mGlobalFlags | FLAG_DIGITAL) : (mGlobalFlags & ~FLAG_DIGITAL);
         SetPoints();
     }
     if (n == 5 && ShowBulk)
     {
         mFlags = ei.ChangeFlag(mFlags, FLAG_BODY_DIODE);
     }
 }
Example #5
0
 public override void SetElementValue(int n, ElementInfo ei)
 {
     if (n == 2)
     {
         if (ei.CheckBox.Checked)
         {
             mFlags |= FLAG_RESET;
         }
         else
         {
             mFlags &= ~FLAG_RESET;
         }
         SetupPins();
         allocNodes();
         SetPoints();
     }
     if (n == 3)
     {
         mFlags         = ei.ChangeFlag(mFlags, FLAG_POSITIVE_EDGE);
         pins[1].bubble = !positiveEdgeTriggered;
     }
     base.SetElementValue(n, ei);
 }