public FftToolStrip(GraphControl gc, GraphFFT gf) { graphControl = gc; oldGraph = gf; this.fft = new System.Windows.Forms.ToolStripButton(); this.toolStrip.Dock = System.Windows.Forms.DockStyle.None; this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fft}); this.toolStrip.Location = new System.Drawing.Point(0, 0); this.toolStrip.Name = "toolStrip2"; this.toolStrip.Size = new System.Drawing.Size(497, 25); this.toolStrip.TabIndex = 1; this.toolStrip.Text = "toolStrip2"; // // fft // this.fft.CheckOnClick = true; this.fft.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.fft.Image = null;// ((System.Drawing.Image)(resources.GetObject("fft.Image"))); this.fft.ImageTransparentColor = System.Drawing.Color.Magenta; this.fft.Name = "fft"; this.fft.Size = new System.Drawing.Size(30, 22); this.fft.Text = "FFT"; this.fft.CheckStateChanged += new System.EventHandler(this.fft_CheckStateChanged); }
public ParallaxToolStrip(SerialParallax osc, GraphControl gc) { oscillo = osc; graphControl = gc; // // toolStrip2 // this.toolStrip = new System.Windows.Forms.ToolStrip(); this.toolStrip.Dock = System.Windows.Forms.DockStyle.None; this.toolStrip.Location = new System.Drawing.Point(3, 0); this.toolStrip.Name = "toolStrip2"; this.toolStrip.Size = new System.Drawing.Size(243, 25); this.toolStrip.TabIndex = 1; this.toolStrip.Text = "toolStrip2"; this.triggerLabel = new System.Windows.Forms.ToolStripLabel(); this.trigger = new System.Windows.Forms.ToolStripTextBox(); this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel(); this.triggerMode = new System.Windows.Forms.ToolStripComboBox(); // // triggerLabel // this.triggerLabel.Name = "triggerLabel"; this.triggerLabel.Size = new System.Drawing.Size(42, 22); this.triggerLabel.Text = "trigger"; this.toolStrip.Items.Add(this.triggerLabel); // // trigger // this.trigger.Name = "trigger"; this.trigger.Size = new System.Drawing.Size(50, 25); this.trigger.Text = "0"; this.trigger.Validating += new System.ComponentModel.CancelEventHandler(this.trigger_Validating); this.trigger.Validated += new System.EventHandler(this.trigger_Validated); this.toolStrip.Items.Add(this.trigger); // // triggerMode // this.triggerMode.Items.AddRange(new object[] { "ch1 ˄", "ch1 ˅", "ch2 ˄", "ch2 ˅", "ext ˄"}); this.triggerMode.Name = "triggerMode"; this.triggerMode.Size = new System.Drawing.Size(20, 25); this.triggerMode.SelectedIndexChanged += new System.EventHandler(this.triggerMode_SelectedIndexChanged); triggerMode.SelectedIndex = 0; this.toolStrip.Items.Add(this.triggerMode); //channels.SelectedIndex = 0; trigger.Text = "0"; triggerMode.SelectedIndex = 0; oscillo.TriggerVoltage = (float.Parse(trigger.Text)); }
public AnalogTeensyToolbar(AnalogTeensy osc, GraphControl gc) { oscillo = osc; graphControl = gc; this.toolStrip = new System.Windows.Forms.ToolStrip(); this.sampleCountLabel = new System.Windows.Forms.ToolStripLabel(); this.sampleCount = new OnlyNumbersToolStripTextBox(); // // toolStrip2 // this.toolStrip.Dock = System.Windows.Forms.DockStyle.None; this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.sampleCountLabel, this.sampleCount }); this.toolStrip.Location = new System.Drawing.Point(3, 0); this.toolStrip.Name = "toolStrip2"; this.toolStrip.Size = new System.Drawing.Size(243, 25); this.toolStrip.TabIndex = 1; this.toolStrip.Text = "toolStrip2"; // // sampleCountLabel // this.sampleCountLabel.Size = new System.Drawing.Size(54, 22); this.sampleCountLabel.Text = "time(ms)"; // // sampleCountLabel // this.sampleCount.Size = new System.Drawing.Size(54, 22); this.sampleCount.Text = "100"; this.sampleCount.textReady += new EventHandler(sampleCount_textReady); //set values oscillo.SetMeasuringTime(int.Parse(sampleCount.Text)); }
public AnalogArduinoToolbar(AnalogArduino osc, GraphControl gc) { oscillo = osc; graphControl = gc; this.toolStrip = new System.Windows.Forms.ToolStrip(); this.triggerLabel = new System.Windows.Forms.ToolStripLabel(); this.trigger = new OnlyNumbersToolStripTextBox(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.sampleCountLabel = new System.Windows.Forms.ToolStripLabel(); this.sampleCount = new OnlyNumbersToolStripTextBox(); // // toolStrip2 // this.toolStrip.Dock = System.Windows.Forms.DockStyle.None; this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.triggerLabel, this.trigger, this.toolStripSeparator1, this.sampleCountLabel, this.sampleCount }); this.toolStrip.Location = new System.Drawing.Point(3, 0); this.toolStrip.Name = "toolStrip2"; this.toolStrip.Size = new System.Drawing.Size(243, 25); this.toolStrip.TabIndex = 1; this.toolStrip.Text = "toolStrip2"; // // triggerLabel // this.triggerLabel.Name = "triggerLabel"; this.triggerLabel.Size = new System.Drawing.Size(42, 22); this.triggerLabel.Text = "trigger"; // // trigger // this.trigger.Name = "trigger"; this.trigger.Size = new System.Drawing.Size(50, 25); this.trigger.Text = "0"; this.trigger.textReady += new EventHandler(trigger_textReady); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); // // sampleCountLabel // this.sampleCountLabel.Size = new System.Drawing.Size(54, 22); this.sampleCountLabel.Text = "time(ms)"; // // sampleCountLabel // this.sampleCount.Size = new System.Drawing.Size(54, 22); this.sampleCount.Text = "20"; this.sampleCount.textReady += new EventHandler(sampleCount_textReady); //set values oscillo.SetTriggerVoltage(byte.Parse(trigger.Text)); oscillo.SetMeasuringTime(int.Parse(sampleCount.Text)); }
public AnalogArduinoDueToolbar(AnalogArduinoDue osc, GraphControl gc) { oscillo = osc; graphControl = gc; this.toolStrip = new System.Windows.Forms.ToolStrip(); this.triggerLabel = new System.Windows.Forms.ToolStripLabel(); this.trigger = new OnlyNumbersToolStripTextBox(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.sampleCountLabel = new System.Windows.Forms.ToolStripLabel(); this.sampleCount = new OnlyNumbersToolStripTextBox(); // // toolStrip2 // this.toolStrip.Dock = System.Windows.Forms.DockStyle.None; this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.triggerLabel, this.trigger, this.toolStripSeparator1, this.sampleCountLabel, this.sampleCount }); this.toolStrip.Location = new System.Drawing.Point(3, 0); this.toolStrip.Name = "toolStrip2"; this.toolStrip.Size = new System.Drawing.Size(243, 25); this.toolStrip.TabIndex = 1; this.toolStrip.Text = "toolStrip2"; // // triggerLabel // this.triggerLabel.Name = "triggerLabel"; this.triggerLabel.Size = new System.Drawing.Size(42, 22); this.triggerLabel.Text = "trigger"; // // trigger // this.trigger.Name = "trigger"; this.trigger.Size = new System.Drawing.Size(50, 25); this.trigger.Text = "0"; this.trigger.textReady += new EventHandler(trigger_textReady); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); // // sampleCountLabel // this.sampleCountLabel.Size = new System.Drawing.Size(54, 22); this.sampleCountLabel.Text = "time(ms)"; // // sampleCountLabel // this.sampleCount.Size = new System.Drawing.Size(54, 22); this.sampleCount.Text = "20"; this.sampleCount.textReady += new EventHandler(sampleCount_textReady); //set values oscillo.SetTriggerVoltage(byte.Parse(trigger.Text)); oscillo.SetMeasuringTime(int.Parse(sampleCount.Text)); }
public GraphConsumer(GraphControl gc) { graphControl = gc; }
public CommonToolStrip(VizForm vf, Acquirer acq, GraphControl gc, Oscillo os) { vizForm = vf; m_acquirer = acq; graphControl = gc; m_Oscillo = os; this.timeLabel = new System.Windows.Forms.ToolStripLabel(); this.clone = new System.Windows.Forms.ToolStripButton(); this.play = new System.Windows.Forms.ToolStripButton(); this.time = new System.Windows.Forms.ToolStripComboBox(); this.toolStrip.Dock = System.Windows.Forms.DockStyle.None; this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.timeLabel, this.time, this.clone, this.play }); this.toolStrip.Location = new System.Drawing.Point(0, 0); this.toolStrip.Name = "toolStrip2"; this.toolStrip.Size = new System.Drawing.Size(497, 25); this.toolStrip.TabIndex = 1; this.toolStrip.Text = "toolStrip2"; // // time // this.time.Name = "time"; this.time.Size = new System.Drawing.Size(50, 25); this.time.SelectedIndexChanged += new System.EventHandler(this.time_SelectedIndexChanged); // // clone // this.clone.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.clone.Image = null;// ((System.Drawing.Image)(resources.GetObject("clone.Image"))); this.clone.ImageTransparentColor = System.Drawing.Color.Magenta; this.clone.Name = "clone"; this.clone.Size = new System.Drawing.Size(42, 22); this.clone.Text = "Clone"; this.clone.Click += new System.EventHandler(this.clone_Click); // // play // if (m_acquirer != null) { this.play.CheckOnClick = true; this.play.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.play.Image = global::XOscillo.Properties.Resources.play; this.play.ImageTransparentColor = System.Drawing.Color.Magenta; this.play.Margin = new System.Windows.Forms.Padding(1); this.play.Name = "play"; this.play.Size = new System.Drawing.Size(23, 23); this.play.Text = "toolStripButton2"; this.play.CheckedChanged += new System.EventHandler(this.play_CheckedChanged); this.play.Checked = true; } this.toolStrip.Items.Add(new System.Windows.Forms.ToolStripSeparator()); // // Channels // if (m_Oscillo != null) { for (int i = 0; i < m_Oscillo.GetNumberOfSupportedChannels(); i++) { CheckBox cb = new CheckBox(); cb.Text = "Ch" + i; cb.Tag = i; cb.Appearance = Appearance.Button; cb.CheckStateChanged += ((s, ex) => { m_Oscillo.SetChannel((int)cb.Tag, cb.CheckState == CheckState.Checked); SetAcquirerStatus(); // since the above doesnt fire a CheckStateChanged }); ToolStripControlHost host = new ToolStripControlHost(cb); if (i == 0) { cb.Checked = true; } this.toolStrip.Items.Add(host); } } }
public CommonToolStrip(VizForm vf, Acquirer acq, GraphControl gc, Oscillo os) { vizForm = vf; m_acquirer = acq; graphControl = gc; m_Oscillo = os; this.timeLabel = new System.Windows.Forms.ToolStripLabel(); this.clone = new System.Windows.Forms.ToolStripButton(); this.play = new System.Windows.Forms.ToolStripButton(); this.time = new System.Windows.Forms.ToolStripComboBox(); this.toolStrip.Dock = System.Windows.Forms.DockStyle.None; this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.timeLabel, this.time, this.clone, this.play}); this.toolStrip.Location = new System.Drawing.Point(0, 0); this.toolStrip.Name = "toolStrip2"; this.toolStrip.Size = new System.Drawing.Size(497, 25); this.toolStrip.TabIndex = 1; this.toolStrip.Text = "toolStrip2"; // // time // this.time.Name = "time"; this.time.Size = new System.Drawing.Size(50, 25); this.time.SelectedIndexChanged += new System.EventHandler(this.time_SelectedIndexChanged); // // clone // this.clone.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.clone.Image = null;// ((System.Drawing.Image)(resources.GetObject("clone.Image"))); this.clone.ImageTransparentColor = System.Drawing.Color.Magenta; this.clone.Name = "clone"; this.clone.Size = new System.Drawing.Size(42, 22); this.clone.Text = "Clone"; this.clone.Click += new System.EventHandler(this.clone_Click); // // play // if (m_acquirer != null) { this.play.CheckOnClick = true; this.play.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.play.Image = global::XOscillo.Properties.Resources.play; this.play.ImageTransparentColor = System.Drawing.Color.Magenta; this.play.Margin = new System.Windows.Forms.Padding(1); this.play.Name = "play"; this.play.Size = new System.Drawing.Size(23, 23); this.play.Text = "toolStripButton2"; this.play.CheckedChanged += new System.EventHandler(this.play_CheckedChanged); this.play.Checked = true; } this.toolStrip.Items.Add(new System.Windows.Forms.ToolStripSeparator()); // // Channels // if (m_Oscillo != null) { for (int i = 0; i < m_Oscillo.GetNumberOfSupportedChannels(); i++) { CheckBox cb = new CheckBox(); cb.Text = "Ch" + i; cb.Tag = i; cb.Appearance = Appearance.Button; cb.CheckStateChanged += ((s, ex) => { m_Oscillo.SetChannel((int)cb.Tag, cb.CheckState == CheckState.Checked); SetAcquirerStatus(); // since the above doesnt fire a CheckStateChanged }); ToolStripControlHost host = new ToolStripControlHost(cb); if (i == 0) { cb.Checked = true; } this.toolStrip.Items.Add(host); } } }