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); } }; } }
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); } }; }
public Scope(CircuitElm celm, Rectangle rect) { elm = celm; data = new List <double>(new double[rect.Width]); area = rect; }