public InductorElm(Point pos) : base(pos) { mInd = new Inductor(mCir); Inductance = 0.001; ReferenceName = "L"; mInd.Setup(Inductance, mCurrent, mFlags); }
public override void SetElementValue(int n, ElementInfo ei) { if (n == 0 && ei.Value > 0) { Inductance = ei.Value; setTextPos(); } if (n == 1) { ReferenceName = ei.Textf.Text; setTextPos(); } if (n == 2) { if (ei.CheckBox.Checked) { mFlags &= ~Inductor.FLAG_BACK_EULER; } else { mFlags |= Inductor.FLAG_BACK_EULER; } } mInd.Setup(Inductance, mCurrent, mFlags); }
public InductorElm(Point p1, Point p2, int f, StringTokenizer st) : base(p1, p2, f) { mInd = new Inductor(mCir); try { Inductance = st.nextTokenDouble(); mCurrent = st.nextTokenDouble(); ReferenceName = st.nextToken(); } catch { } mInd.Setup(Inductance, mCurrent, mFlags); }