Ejemplo n.º 1
0
        public FilteringToolStrip(FilterConsumer fc)
        {
            this.filterConsumer = fc;
            fc.SetFilter(lowPass);

            this.toolStripLabel4 = new System.Windows.Forms.ToolStripLabel();
            this.cof             = new OnlyNumbersToolStripTextBox();
            this.enableFiltering = new CheckBox();
            this.enable          = new System.Windows.Forms.ToolStripControlHost(this.enableFiltering);

            //
            // toolStrip1
            //
            this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.enable,
                this.toolStripLabel4,
                this.cof
            });
            this.toolStrip.Location = new System.Drawing.Point(252, 0);
            this.toolStrip.Name     = "toolStrip1";
            this.toolStrip.Size     = new System.Drawing.Size(197, 25);
            this.toolStrip.TabIndex = 2;

            for (int i = 0; ; i++)
            {
                string name = lowPass.GetValueName(i);
                if (name == null)
                {
                    break;
                }

                //
                // toolStripLabel4
                //
                this.toolStripLabel4.Name = "toolStripLabel4";
                this.toolStripLabel4.Size = new System.Drawing.Size(52, 22);
                this.toolStripLabel4.Text = name;


                //this.enable.DisplayStyle = ToolStripItemDisplayStyle.
                this.enableFiltering.CheckedChanged += new System.EventHandler(this.enableFilteringChanged);
                this.enableFiltering.Checked         = false;

                // cof
                this.cof.Name       = name;
                this.cof.Size       = new System.Drawing.Size(50, 25);
                this.cof.Text       = "100";
                this.cof.Tag        = i;
                this.cof.Enabled    = this.enableFiltering.Checked;
                this.cof.textReady += new EventHandler(cof_textReady);
            }
        }
Ejemplo n.º 2
0
      public FilteringToolStrip(FilterConsumer fc)
      {
         this.filterConsumer = fc;
         fc.SetFilter(lowPass);

         this.toolStripLabel4 = new System.Windows.Forms.ToolStripLabel();
         this.cof = new OnlyNumbersToolStripTextBox();
         this.enableFiltering = new CheckBox();
         this.enable = new System.Windows.Forms.ToolStripControlHost(this.enableFiltering);

         // 
         // toolStrip1
         // 
         this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
         this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.enable,
            this.toolStripLabel4,
            this.cof});
         this.toolStrip.Location = new System.Drawing.Point(252, 0);
         this.toolStrip.Name = "toolStrip1";
         this.toolStrip.Size = new System.Drawing.Size(197, 25);
         this.toolStrip.TabIndex = 2;

         for (int i = 0; ; i++)
         {
            string name = lowPass.GetValueName(i);
            if (name == null)
            {
               break;
            }

            // 
            // toolStripLabel4
            // 
            this.toolStripLabel4.Name = "toolStripLabel4";
            this.toolStripLabel4.Size = new System.Drawing.Size(52, 22);
            this.toolStripLabel4.Text = name;

            
            //this.enable.DisplayStyle = ToolStripItemDisplayStyle.
            this.enableFiltering.CheckedChanged += new System.EventHandler(this.enableFilteringChanged);
            this.enableFiltering.Checked = false;

            // cof
            this.cof.Name = name;
            this.cof.Size = new System.Drawing.Size(50, 25);
            this.cof.Text = "100";
            this.cof.Tag = i;
            this.cof.Enabled = this.enableFiltering.Checked;
            this.cof.textReady += new EventHandler(cof_textReady);
         }
      }
Ejemplo n.º 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));
        }
Ejemplo n.º 4
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));
        }
Ejemplo n.º 5
0
        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));
        }
Ejemplo n.º 6
0
        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));
        }