Пример #1
0
        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);
        }
Пример #2
0
        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));
        }
Пример #3
0
        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));
        }