示例#1
0
        public PropertyEditor(CircuitElm elm)
        {
            InitializeComponent();

            if (elm.type != 'w' && elm.type != 'g')
            {
                TextBox r = new TextBox();
                r.SetBounds(20, 15, 110, 50);
                r.Text = elm.characteristic.ToString();
                Controls.Add(r);

                r.TextChanged += delegate
                { if (r.Text != String.Empty)
                  {
                      elm.characteristic = (float)Convert.ToDouble(r.Text);
                  }
                };
            }
        }
示例#2
0
        public PropertyEditor(CircuitElm elm, int a)
        {
            InitializeComponent();

            if (elm.type != 'v')
            {
                return;
            }


            TextBox r = new TextBox();

            r.SetBounds(20, 15, 110, 50);
            r.Text = elm.frequency.ToString();
            Controls.Add(r);

            r.TextChanged += delegate
            { if (r.Text != String.Empty)
              {
                  elm.frequency = Convert.ToDouble(r.Text);
              }
            };
        }
示例#3
0
文件: Scope.cs 项目: andyubird2/Spice
 public Scope(CircuitElm celm, Rectangle rect)
 {
     elm  = celm;
     data = new List <double>(new double[rect.Width]);
     area = rect;
 }