⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmsetting.cs

📁 用C#写的USB数据采集程序
💻 CS
📖 第 1 页 / 共 3 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Xml;
using System.IO;
using System.IO.Ports;
using Custom;

namespace MCA
{
	/// <summary>
	/// 设置窗口
	/// </summary>
	public class FrmSetting : System.Windows.Forms.Form
    {
        #region "私有变量"
        private Microsoft.WindowsCE.Forms.InputPanel inputPanel;
        private System.Windows.Forms.MainMenu mainMenu;
        private StopType st;
        private Panel panel6;
        private Panel panel1;
        private Label label10;
        private TabPage tabPage3;
        private Label label11;
        private TabPage tabPage4;
        private Label label6;
        private NumericUpDown nUpDownChannels;
        private Label label4;
        private NumericUpDown nUpDownTimePoints;
        private Label label5;
        private TabPage tabPage2;
        private Label label8;
        private ComboBox cBoxSerialNum;
        private ComboBox cBoxBaudRate;
        private Label label7;
        private Label label12;
        private TabPage tabPage1;
        private RadioButton rbtbyCount;
        private NumericUpDown nUpDownCount;
        private Label label3;
        private NumericUpDown nUpDownTime;
        private Label label2;
        private RadioButton rbtbyHand;
        private RadioButton rbtbyTime;
        private Label label1;
        private TabControl tabControl;
        private Custom.ColorBox colorBox;
        private RadioButton rbtdatacolor;
        private Custom.PanelPro pndatacolor;
        private Custom.PanelPro pncoordinatecolor;
        private Custom.PanelPro pngridcolor;
        private Custom.PanelPro pnregioncolor;
        private Custom.PanelPro pnselectlinecolor;
        private Custom.PanelPro pnbackcolor;
        private RadioButton rbtcoordinatecolor;
        private RadioButton rbtgridcolor;
        private RadioButton rbtselectlinecolor;
        private RadioButton rbtbackcolor;
        private RadioButton rbtregioncolor;
        private RadioButton rbtpeekcolor;
        private Custom.PanelPro pnpeekcolor;
        private RadioButton rbtactivatepeekregion;
        private Custom.PanelPro pnactivatepeekregioncolor;
        internal FrmMain frmmain;
        #endregion

        #region "构造函数"
        public FrmSetting()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			//
			//
        }
        #endregion

        #region "清理资源"
        /// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			base.Dispose( disposing );
		}
        #endregion

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
            this.inputPanel = new Microsoft.WindowsCE.Forms.InputPanel();
            this.mainMenu = new System.Windows.Forms.MainMenu();
            this.panel6 = new System.Windows.Forms.Panel();
            this.panel1 = new System.Windows.Forms.Panel();
            this.label10 = new System.Windows.Forms.Label();
            this.tabPage3 = new System.Windows.Forms.TabPage();
            this.pnactivatepeekregioncolor = new Custom.PanelPro();
            this.rbtactivatepeekregion = new System.Windows.Forms.RadioButton();
            this.rbtpeekcolor = new System.Windows.Forms.RadioButton();
            this.pnpeekcolor = new Custom.PanelPro();
            this.rbtgridcolor = new System.Windows.Forms.RadioButton();
            this.rbtselectlinecolor = new System.Windows.Forms.RadioButton();
            this.rbtbackcolor = new System.Windows.Forms.RadioButton();
            this.rbtcoordinatecolor = new System.Windows.Forms.RadioButton();
            this.pngridcolor = new Custom.PanelPro();
            this.pnregioncolor = new Custom.PanelPro();
            this.pnselectlinecolor = new Custom.PanelPro();
            this.pnbackcolor = new Custom.PanelPro();
            this.pncoordinatecolor = new Custom.PanelPro();
            this.pndatacolor = new Custom.PanelPro();
            this.rbtdatacolor = new System.Windows.Forms.RadioButton();
            this.colorBox = new Custom.ColorBox();
            this.label11 = new System.Windows.Forms.Label();
            this.rbtregioncolor = new System.Windows.Forms.RadioButton();
            this.tabPage4 = new System.Windows.Forms.TabPage();
            this.label6 = new System.Windows.Forms.Label();
            this.nUpDownChannels = new System.Windows.Forms.NumericUpDown();
            this.label4 = new System.Windows.Forms.Label();
            this.nUpDownTimePoints = new System.Windows.Forms.NumericUpDown();
            this.label5 = new System.Windows.Forms.Label();
            this.tabPage2 = new System.Windows.Forms.TabPage();
            this.label8 = new System.Windows.Forms.Label();
            this.cBoxSerialNum = new System.Windows.Forms.ComboBox();
            this.cBoxBaudRate = new System.Windows.Forms.ComboBox();
            this.label7 = new System.Windows.Forms.Label();
            this.label12 = new System.Windows.Forms.Label();
            this.tabPage1 = new System.Windows.Forms.TabPage();
            this.rbtbyCount = new System.Windows.Forms.RadioButton();
            this.nUpDownCount = new System.Windows.Forms.NumericUpDown();
            this.label3 = new System.Windows.Forms.Label();
            this.nUpDownTime = new System.Windows.Forms.NumericUpDown();
            this.label2 = new System.Windows.Forms.Label();
            this.rbtbyHand = new System.Windows.Forms.RadioButton();
            this.rbtbyTime = new System.Windows.Forms.RadioButton();
            this.label1 = new System.Windows.Forms.Label();
            this.tabControl = new System.Windows.Forms.TabControl();
            this.panel6.SuspendLayout();
            this.tabPage3.SuspendLayout();
            this.tabPage4.SuspendLayout();
            this.tabPage2.SuspendLayout();
            this.tabPage1.SuspendLayout();
            this.tabControl.SuspendLayout();
            this.SuspendLayout();
            // 
            // inputPanel
            // 
            this.inputPanel.EnabledChanged += new System.EventHandler(this.inputPanel_EnabledChanged);
            // 
            // panel6
            // 
            this.panel6.Controls.Add(this.panel1);
            this.panel6.Controls.Add(this.label10);
            this.panel6.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel6.Location = new System.Drawing.Point(0, 0);
            this.panel6.Name = "panel6";
            this.panel6.Size = new System.Drawing.Size(240, 24);
            // 
            // panel1
            // 
            this.panel1.BackColor = System.Drawing.Color.Black;
            this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panel1.Location = new System.Drawing.Point(0, 23);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(240, 1);
            // 
            // label10
            // 
            this.label10.ForeColor = System.Drawing.SystemColors.Highlight;
            this.label10.Location = new System.Drawing.Point(7, 3);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(50, 17);
            this.label10.Text = "设置";
            // 
            // tabPage3
            // 
            this.tabPage3.AutoScroll = true;
            this.tabPage3.Controls.Add(this.pnactivatepeekregioncolor);
            this.tabPage3.Controls.Add(this.rbtactivatepeekregion);
            this.tabPage3.Controls.Add(this.rbtpeekcolor);
            this.tabPage3.Controls.Add(this.pnpeekcolor);
            this.tabPage3.Controls.Add(this.rbtgridcolor);
            this.tabPage3.Controls.Add(this.rbtselectlinecolor);
            this.tabPage3.Controls.Add(this.rbtbackcolor);
            this.tabPage3.Controls.Add(this.rbtcoordinatecolor);
            this.tabPage3.Controls.Add(this.pngridcolor);
            this.tabPage3.Controls.Add(this.pnregioncolor);
            this.tabPage3.Controls.Add(this.pnselectlinecolor);
            this.tabPage3.Controls.Add(this.pnbackcolor);
            this.tabPage3.Controls.Add(this.pncoordinatecolor);
            this.tabPage3.Controls.Add(this.pndatacolor);
            this.tabPage3.Controls.Add(this.rbtdatacolor);
            this.tabPage3.Controls.Add(this.colorBox);
            this.tabPage3.Controls.Add(this.label11);
            this.tabPage3.Controls.Add(this.rbtregioncolor);
            this.tabPage3.Location = new System.Drawing.Point(0, 0);
            this.tabPage3.Name = "tabPage3";
            this.tabPage3.Size = new System.Drawing.Size(240, 217);
            this.tabPage3.Text = "颜色";
            // 
            // pnactivatepeekregioncolor
            // 
            this.pnactivatepeekregioncolor.BackColor = System.Drawing.Color.Yellow;
            this.pnactivatepeekregioncolor.Caption = "";
            this.pnactivatepeekregioncolor.Image = null;
            this.pnactivatepeekregioncolor.Location = new System.Drawing.Point(80, 124);
            this.pnactivatepeekregioncolor.Name = "pnactivatepeekregioncolor";
            this.pnactivatepeekregioncolor.Size = new System.Drawing.Size(24, 13);
            this.pnactivatepeekregioncolor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Normal;
            this.pnactivatepeekregioncolor.TextAlign = System.Drawing.ContentAlignment.TopLeft;
            this.pnactivatepeekregioncolor.TextColor = System.Drawing.Color.Black;
            this.pnactivatepeekregioncolor.TextFont = new System.Drawing.Font("Times New Roman", 9F, System.Drawing.FontStyle.Regular);
            // 
            // rbtactivatepeekregion
            // 
            this.rbtactivatepeekregion.Location = new System.Drawing.Point(9, 123);
            this.rbtactivatepeekregion.Name = "rbtactivatepeekregion";
            this.rbtactivatepeekregion.Size = new System.Drawing.Size(75, 15);
            this.rbtactivatepeekregion.TabIndex = 119;
            this.rbtactivatepeekregion.Text = "选定的峰";
            this.rbtactivatepeekregion.Click += new System.EventHandler(this.rbtactivatepeekregion_Click);
            // 
            // rbtpeekcolor
            // 
            this.rbtpeekcolor.Location = new System.Drawing.Point(9, 108);
            this.rbtpeekcolor.Name = "rbtpeekcolor";
            this.rbtpeekcolor.Size = new System.Drawing.Size(62, 15);
            this.rbtpeekcolor.TabIndex = 109;
            this.rbtpeekcolor.Text = "峰区域";
            this.rbtpeekcolor.Click += new System.EventHandler(this.rbtpeekcolor_Click);
            // 
            // pnpeekcolor
            // 
            this.pnpeekcolor.BackColor = System.Drawing.Color.Red;
            this.pnpeekcolor.Caption = "";
            this.pnpeekcolor.Image = null;
            this.pnpeekcolor.Location = new System.Drawing.Point(80, 109);
            this.pnpeekcolor.Name = "pnpeekcolor";
            this.pnpeekcolor.Size = new System.Drawing.Size(24, 13);
            this.pnpeekcolor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Normal;
            this.pnpeekcolor.TextAlign = System.Drawing.ContentAlignment.TopLeft;
            this.pnpeekcolor.TextColor = System.Drawing.Color.Black;
            this.pnpeekcolor.TextFont = new System.Drawing.Font("Times New Roman", 9F, System.Drawing.FontStyle.Regular);
            // 
            // rbtgridcolor
            // 
            this.rbtgridcolor.Location = new System.Drawing.Point(9, 93);
            this.rbtgridcolor.Name = "rbtgridcolor";
            this.rbtgridcolor.Size = new System.Drawing.Size(62, 15);
            this.rbtgridcolor.TabIndex = 107;
            this.rbtgridcolor.Text = "网格";
            this.rbtgridcolor.Click += new System.EventHandler(this.btgridcolor_Click);
            // 
            // rbtselectlinecolor
            // 
            this.rbtselectlinecolor.Location = new System.Drawing.Point(9, 63);
            this.rbtselectlinecolor.Name = "rbtselectlinecolor";
            this.rbtselectlinecolor.Size = new System.Drawing.Size(62, 15);
            this.rbtselectlinecolor.TabIndex = 105;
            this.rbtselectlinecolor.Text = "选择线";
            this.rbtselectlinecolor.Click += new System.EventHandler(this.btselectlinecolor_Click);
            // 
            // rbtbackcolor
            // 
            this.rbtbackcolor.Location = new System.Drawing.Point(9, 48);
            this.rbtbackcolor.Name = "rbtbackcolor";
            this.rbtbackcolor.Size = new System.Drawing.Size(62, 15);
            this.rbtbackcolor.TabIndex = 104;
            this.rbtbackcolor.Text = "背景";
            this.rbtbackcolor.Click += new System.EventHandler(this.btbackcolorset_Click);
            // 
            // rbtcoordinatecolor
            // 
            this.rbtcoordinatecolor.Location = new System.Drawing.Point(9, 33);
            this.rbtcoordinatecolor.Name = "rbtcoordinatecolor";
            this.rbtcoordinatecolor.Size = new System.Drawing.Size(62, 15);
            this.rbtcoordinatecolor.TabIndex = 103;
            this.rbtcoordinatecolor.Text = "坐标";
            this.rbtcoordinatecolor.Click += new System.EventHandler(this.btforecolorset_Click);
            // 
            // pngridcolor
            // 
            this.pngridcolor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            this.pngridcolor.Caption = "";
            this.pngridcolor.Image = null;
            this.pngridcolor.Location = new System.Drawing.Point(80, 94);
            this.pngridcolor.Name = "pngridcolor";
            this.pngridcolor.Size = new System.Drawing.Size(24, 13);
            this.pngridcolor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Normal;
            this.pngridcolor.TextAlign = System.Drawing.ContentAlignment.TopLeft;
            this.pngridcolor.TextColor = System.Drawing.Color.Black;
            this.pngridcolor.TextFont = new System.Drawing.Font("Times New Roman", 9F, System.Drawing.FontStyle.Regular);
            // 
            // pnregioncolor
            // 
            this.pnregioncolor.BackColor = System.Drawing.Color.LimeGreen;
            this.pnregioncolor.Caption = "";
            this.pnregioncolor.Image = null;
            this.pnregioncolor.Location = new System.Drawing.Point(80, 79);
            this.pnregioncolor.Name = "pnregioncolor";
            this.pnregioncolor.Size = new System.Drawing.Size(24, 13);
            this.pnregioncolor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Normal;
            this.pnregioncolor.TextAlign = System.Drawing.ContentAlignment.TopLeft;
            this.pnregioncolor.TextColor = System.Drawing.Color.Black;
            this.pnregioncolor.TextFont = new System.Drawing.Font("Times New Roman", 9F, System.Drawing.FontStyle.Regular);
            // 
            // pnselectlinecolor
            // 
            this.pnselectlinecolor.BackColor = System.Drawing.Color.LimeGreen;
            this.pnselectlinecolor.Caption = "";
            this.pnselectlinecolor.Image = null;
            this.pnselectlinecolor.Location = new System.Drawing.Point(80, 64);
            this.pnselectlinecolor.Name = "pnselectlinecolor";
            this.pnselectlinecolor.Size = new System.Drawing.Size(24, 13);
            this.pnselectlinecolor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Normal;
            this.pnselectlinecolor.TextAlign = System.Drawing.ContentAlignment.TopLeft;
            this.pnselectlinecolor.TextColor = System.Drawing.Color.Black;
            this.pnselectlinecolor.TextFont = new System.Drawing.Font("Times New Roman", 9F, System.Drawing.FontStyle.Regular);
            // 
            // pnbackcolor
            // 
            this.pnbackcolor.BackColor = System.Drawing.Color.Black;
            this.pnbackcolor.Caption = "";
            this.pnbackcolor.Image = null;
            this.pnbackcolor.Location = new System.Drawing.Point(80, 49);
            this.pnbackcolor.Name = "pnbackcolor";
            this.pnbackcolor.Size = new System.Drawing.Size(24, 13);
            this.pnbackcolor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Normal;
            this.pnbackcolor.TextAlign = System.Drawing.ContentAlignment.TopLeft;
            this.pnbackcolor.TextColor = System.Drawing.Color.Black;
            this.pnbackcolor.TextFont = new System.Drawing.Font("Times New Roman", 9F, System.Drawing.FontStyle.Regular);
            // 
            // pncoordinatecolor
            // 
            this.pncoordinatecolor.BackColor = System.Drawing.Color.Lime;
            this.pncoordinatecolor.Caption = "";
            this.pncoordinatecolor.Image = null;
            this.pncoordinatecolor.Location = new System.Drawing.Point(80, 34);
            this.pncoordinatecolor.Name = "pncoordinatecolor";
            this.pncoordinatecolor.Size = new System.Drawing.Size(24, 13);
            this.pncoordinatecolor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Normal;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -