Exemple #1
0
        public VoltMeterElm(Point pos) : base(pos)
        {
            mMeter = TP_VOL;

            /* default for new elements */
            mFlags = FLAG_SHOWVOLTAGE;
            mScale = E_SCALE.AUTO;
        }
Exemple #2
0
 public AmmeterElm(Point p1, Point p2, int f, StringTokenizer st) : base(p1, p2, f)
 {
     mMeter = st.nextTokenInt();
     try {
         mScale = st.nextTokenEnum <E_SCALE>();
     } catch {
         mScale = E_SCALE.AUTO;
     }
 }
Exemple #3
0
 public VoltMeterElm(Point p1, Point p2, int f, StringTokenizer st) : base(p1, p2, f)
 {
     mMeter = TP_VOL;
     mScale = E_SCALE.AUTO;
     try {
         mMeter = st.nextTokenInt(); /* get meter type from saved dump */
         mScale = st.nextTokenEnum <E_SCALE>();
     } catch { }
 }
Exemple #4
0
 public override void SetElementValue(int n, ElementInfo ei)
 {
     if (n == 0)
     {
         mMeter = ei.Choice.SelectedIndex;
     }
     if (n == 1)
     {
         mScale = (E_SCALE)ei.Choice.SelectedIndex;
     }
 }
Exemple #5
0
 public static string UnitTextWithScale(double val, string utext, E_SCALE scale)
 {
     if (scale == E_SCALE.X1)
     {
         return(val.ToString("0.00") + " " + utext);
     }
     if (scale == E_SCALE.M)
     {
         return((1e3 * val).ToString("0") + " m" + utext);
     }
     if (scale == E_SCALE.MU)
     {
         return((1e6 * val).ToString("0") + " u" + utext);
     }
     return(unitText(val, utext, false));
 }
Exemple #6
0
 public AmmeterElm(Point pos) : base(pos)
 {
     mFlags = FLAG_SHOWCURRENT;
     mScale = E_SCALE.AUTO;
 }