diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe index 8cda24b..39366fc 100644 --- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe +++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe Binary files differ diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe index 8cda24b..39366fc 100644 --- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe +++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe Binary files differ diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index 0026ae3..f01e221 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -30,21 +30,16 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); this.labelMedian = new System.Windows.Forms.Label(); - this.btn_add = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panelControl = new System.Windows.Forms.Panel(); - this.btnStart = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.text_signal = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); this.comboBox_detecModel = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); @@ -52,8 +47,6 @@ this.labelSource = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.btn_downCounterList = new System.Windows.Forms.Button(); - this.text_devName = new DevComponents.DotNetBar.Controls.TextBoxX(); this.comboBox_counters = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.All = new DevComponents.Editors.ComboItem(); this.tested = new DevComponents.Editors.ComboItem(); @@ -63,6 +56,9 @@ this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); + this.btn_add = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnStart = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); @@ -87,13 +83,13 @@ this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.White; - this.dataGridView_CounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.White; + this.dataGridView_CounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; this.dataGridView_CounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridView_CounterResult.BackgroundColor = System.Drawing.Color.White; this.dataGridView_CounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; @@ -106,13 +102,13 @@ this.dataGridView_CounterResult.Name = "dataGridView_CounterResult"; this.dataGridView_CounterResult.RowHeadersVisible = false; this.dataGridView_CounterResult.RowHeadersWidth = 50; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White; - this.dataGridView_CounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.White; + this.dataGridView_CounterResult.RowsDefaultCellStyle = dataGridViewCellStyle6; this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -146,54 +142,6 @@ this.labelMedian.Text = "结果编辑"; this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // btn_add - // - this.btn_add.EnterBackColor = System.Drawing.Color.Blue; - this.btn_add.EnterForeColor = System.Drawing.Color.White; - this.btn_add.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btn_add.FlatAppearance.BorderSize = 0; - this.btn_add.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btn_add.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btn_add.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btn_add.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.btn_add.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.btn_add.HoverForeColor = System.Drawing.Color.White; - this.btn_add.Location = new System.Drawing.Point(155, 65); - this.btn_add.Margin = new System.Windows.Forms.Padding(0); - this.btn_add.Name = "btn_add"; - this.btn_add.PressBackColor = System.Drawing.Color.DarkBlue; - this.btn_add.PressForeColor = System.Drawing.Color.White; - this.btn_add.Radius = 5; - this.btn_add.Size = new System.Drawing.Size(111, 26); - this.btn_add.TabIndex = 14; - this.btn_add.Text = "添加"; - this.btn_add.UseVisualStyleBackColor = true; - this.btn_add.Click += new System.EventHandler(this.btn_add_Click); - // - // benDelete - // - this.benDelete.EnterBackColor = System.Drawing.Color.Blue; - this.benDelete.EnterForeColor = System.Drawing.Color.White; - this.benDelete.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.benDelete.FlatAppearance.BorderSize = 0; - this.benDelete.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.benDelete.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.benDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.benDelete.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.benDelete.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(0)))), ((int)(((byte)(18))))); - this.benDelete.HoverForeColor = System.Drawing.Color.White; - this.benDelete.Location = new System.Drawing.Point(27, 65); - this.benDelete.Margin = new System.Windows.Forms.Padding(0); - this.benDelete.Name = "benDelete"; - this.benDelete.PressBackColor = System.Drawing.Color.DarkBlue; - this.benDelete.PressForeColor = System.Drawing.Color.White; - this.benDelete.Radius = 5; - this.benDelete.Size = new System.Drawing.Size(111, 26); - this.benDelete.TabIndex = 13; - this.benDelete.Text = "删除"; - this.benDelete.UseVisualStyleBackColor = true; - this.benDelete.Click += new System.EventHandler(this.benDelete_Click); - // // panelControl // this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); @@ -205,30 +153,6 @@ this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // - // btnStart - // - this.btnStart.EnterBackColor = System.Drawing.Color.Blue; - this.btnStart.EnterForeColor = System.Drawing.Color.White; - this.btnStart.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnStart.FlatAppearance.BorderSize = 0; - this.btnStart.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnStart.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnStart.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.btnStart.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.btnStart.HoverForeColor = System.Drawing.Color.White; - this.btnStart.Location = new System.Drawing.Point(88, 65); - this.btnStart.Margin = new System.Windows.Forms.Padding(0); - this.btnStart.Name = "btnStart"; - this.btnStart.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnStart.PressForeColor = System.Drawing.Color.White; - this.btnStart.Radius = 5; - this.btnStart.Size = new System.Drawing.Size(111, 26); - this.btnStart.TabIndex = 11; - this.btnStart.Text = "启动连续检定"; - this.btnStart.UseVisualStyleBackColor = true; - this.btnStart.Click += new System.EventHandler(this.btnStart_Click); - // // labelControl // this.labelControl.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -245,9 +169,7 @@ // this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.text_signal); - this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); this.panelSource.Controls.Add(this.labelSource); @@ -257,24 +179,6 @@ this.panelSource.Size = new System.Drawing.Size(288, 191); this.panelSource.TabIndex = 1; // - // btn_dropDetecModel - // - this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; - this.btn_dropDetecModel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btn_dropDetecModel.FlatAppearance.BorderSize = 0; - this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); - this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); - this.btn_dropDetecModel.Name = "btn_dropDetecModel"; - this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.btn_dropDetecModel.Size = new System.Drawing.Size(18, 23); - this.btn_dropDetecModel.TabIndex = 56; - this.btn_dropDetecModel.Text = "﹀"; - this.btn_dropDetecModel.UseVisualStyleBackColor = false; - this.btn_dropDetecModel.Click += new System.EventHandler(this.btn_dropDetecModel_Click); - // // text_signal // // @@ -285,7 +189,7 @@ this.text_signal.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_signal.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_signal.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.text_signal.Location = new System.Drawing.Point(101, 77); + this.text_signal.Location = new System.Drawing.Point(100, 77); this.text_signal.Margin = new System.Windows.Forms.Padding(0); this.text_signal.MaximumSize = new System.Drawing.Size(150, 26); this.text_signal.Name = "text_signal"; @@ -293,37 +197,21 @@ this.text_signal.Size = new System.Drawing.Size(150, 26); this.text_signal.TabIndex = 17; // - // textBox_detecModel - // - // - // - // - this.textBox_detecModel.Border.Class = "TextBoxBorder"; - this.textBox_detecModel.Border.CornerDiameter = 5; - this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); - this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); - this.textBox_detecModel.Name = "textBox_detecModel"; - this.textBox_detecModel.PreventEnterBeep = true; - this.textBox_detecModel.Size = new System.Drawing.Size(150, 27); - this.textBox_detecModel.TabIndex = 55; - this.textBox_detecModel.Text = "频率测量"; - // // comboBox_detecModel // this.comboBox_detecModel.DisplayMember = "Text"; this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_detecModel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.comboBox_detecModel.FormattingEnabled = true; this.comboBox_detecModel.ItemHeight = 20; this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); + this.comboBox_detecModel.Location = new System.Drawing.Point(100, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; - this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); + this.comboBox_detecModel.Size = new System.Drawing.Size(150, 26); this.comboBox_detecModel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.comboBox_detecModel.TabIndex = 16; this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); @@ -374,8 +262,6 @@ // this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.btn_downCounterList); - this.panelCounter.Controls.Add(this.text_devName); this.panelCounter.Controls.Add(this.comboBox_counters); this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); @@ -386,44 +272,11 @@ this.panelCounter.Size = new System.Drawing.Size(288, 202); this.panelCounter.TabIndex = 0; // - // btn_downCounterList - // - this.btn_downCounterList.BackColor = System.Drawing.Color.White; - this.btn_downCounterList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btn_downCounterList.FlatAppearance.BorderSize = 0; - this.btn_downCounterList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btn_downCounterList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_downCounterList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_downCounterList.Location = new System.Drawing.Point(232, 73); - this.btn_downCounterList.Margin = new System.Windows.Forms.Padding(0); - this.btn_downCounterList.Name = "btn_downCounterList"; - this.btn_downCounterList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.btn_downCounterList.Size = new System.Drawing.Size(18, 23); - this.btn_downCounterList.TabIndex = 54; - this.btn_downCounterList.Text = "﹀"; - this.btn_downCounterList.UseVisualStyleBackColor = false; - this.btn_downCounterList.Click += new System.EventHandler(this.btn_downCounterList_Click); - // - // text_devName - // - // - // - // - this.text_devName.Border.Class = "TextBoxBorder"; - this.text_devName.Border.CornerDiameter = 5; - this.text_devName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.text_devName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.text_devName.Location = new System.Drawing.Point(104, 71); - this.text_devName.Margin = new System.Windows.Forms.Padding(0); - this.text_devName.Name = "text_devName"; - this.text_devName.PreventEnterBeep = true; - this.text_devName.Size = new System.Drawing.Size(150, 27); - this.text_devName.TabIndex = 53; - // // comboBox_counters // this.comboBox_counters.DisplayMember = "Text"; this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_counters.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox_counters.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.comboBox_counters.FormattingEnabled = true; this.comboBox_counters.ItemHeight = 21; @@ -509,6 +362,78 @@ this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // + // btn_add + // + this.btn_add.EnterBackColor = System.Drawing.Color.Blue; + this.btn_add.EnterForeColor = System.Drawing.Color.White; + this.btn_add.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btn_add.FlatAppearance.BorderSize = 0; + this.btn_add.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btn_add.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btn_add.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_add.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.btn_add.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btn_add.HoverForeColor = System.Drawing.Color.White; + this.btn_add.Location = new System.Drawing.Point(155, 65); + this.btn_add.Margin = new System.Windows.Forms.Padding(0); + this.btn_add.Name = "btn_add"; + this.btn_add.PressBackColor = System.Drawing.Color.DarkBlue; + this.btn_add.PressForeColor = System.Drawing.Color.White; + this.btn_add.Radius = 5; + this.btn_add.Size = new System.Drawing.Size(111, 26); + this.btn_add.TabIndex = 14; + this.btn_add.Text = "添加"; + this.btn_add.UseVisualStyleBackColor = true; + this.btn_add.Click += new System.EventHandler(this.btn_add_Click); + // + // benDelete + // + this.benDelete.EnterBackColor = System.Drawing.Color.Blue; + this.benDelete.EnterForeColor = System.Drawing.Color.White; + this.benDelete.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.benDelete.FlatAppearance.BorderSize = 0; + this.benDelete.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.benDelete.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.benDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.benDelete.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.benDelete.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(0)))), ((int)(((byte)(18))))); + this.benDelete.HoverForeColor = System.Drawing.Color.White; + this.benDelete.Location = new System.Drawing.Point(27, 65); + this.benDelete.Margin = new System.Windows.Forms.Padding(0); + this.benDelete.Name = "benDelete"; + this.benDelete.PressBackColor = System.Drawing.Color.DarkBlue; + this.benDelete.PressForeColor = System.Drawing.Color.White; + this.benDelete.Radius = 5; + this.benDelete.Size = new System.Drawing.Size(111, 26); + this.benDelete.TabIndex = 13; + this.benDelete.Text = "删除"; + this.benDelete.UseVisualStyleBackColor = true; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); + // + // btnStart + // + this.btnStart.EnterBackColor = System.Drawing.Color.Blue; + this.btnStart.EnterForeColor = System.Drawing.Color.White; + this.btnStart.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnStart.FlatAppearance.BorderSize = 0; + this.btnStart.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnStart.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnStart.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.btnStart.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnStart.HoverForeColor = System.Drawing.Color.White; + this.btnStart.Location = new System.Drawing.Point(88, 65); + this.btnStart.Margin = new System.Windows.Forms.Padding(0); + this.btnStart.Name = "btnStart"; + this.btnStart.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnStart.PressForeColor = System.Drawing.Color.White; + this.btnStart.Radius = 5; + this.btnStart.Size = new System.Drawing.Size(111, 26); + this.btnStart.TabIndex = 11; + this.btnStart.Text = "启动连续检定"; + this.btnStart.UseVisualStyleBackColor = true; + this.btnStart.Click += new System.EventHandler(this.btnStart_Click); + // // CounterCtrlForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -560,9 +485,5 @@ private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; private DevComponents.DotNetBar.Controls.TextBoxX text_signal; - private System.Windows.Forms.Button btn_downCounterList; - public DevComponents.DotNetBar.Controls.TextBoxX text_devName; - private System.Windows.Forms.Button btn_dropDetecModel; - public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; } } diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe index 8cda24b..39366fc 100644 --- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe +++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe Binary files differ diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index 0026ae3..f01e221 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -30,21 +30,16 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CounterCtrlForm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); this.labelMedian = new System.Windows.Forms.Label(); - this.btn_add = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panelControl = new System.Windows.Forms.Panel(); - this.btnStart = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.btn_dropDetecModel = new System.Windows.Forms.Button(); this.text_signal = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.textBox_detecModel = new DevComponents.DotNetBar.Controls.TextBoxX(); this.comboBox_detecModel = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem1 = new DevComponents.Editors.ComboItem(); this.comboItem2 = new DevComponents.Editors.ComboItem(); @@ -52,8 +47,6 @@ this.labelSource = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.btn_downCounterList = new System.Windows.Forms.Button(); - this.text_devName = new DevComponents.DotNetBar.Controls.TextBoxX(); this.comboBox_counters = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.All = new DevComponents.Editors.ComboItem(); this.tested = new DevComponents.Editors.ComboItem(); @@ -63,6 +56,9 @@ this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); + this.btn_add = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnStart = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); @@ -87,13 +83,13 @@ this.dataGridView_CounterResult.AllowUserToDeleteRows = false; this.dataGridView_CounterResult.AllowUserToResizeColumns = false; this.dataGridView_CounterResult.AllowUserToResizeRows = false; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.White; - this.dataGridView_CounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.White; + this.dataGridView_CounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; this.dataGridView_CounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridView_CounterResult.BackgroundColor = System.Drawing.Color.White; this.dataGridView_CounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; @@ -106,13 +102,13 @@ this.dataGridView_CounterResult.Name = "dataGridView_CounterResult"; this.dataGridView_CounterResult.RowHeadersVisible = false; this.dataGridView_CounterResult.RowHeadersWidth = 50; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White; - this.dataGridView_CounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.White; + this.dataGridView_CounterResult.RowsDefaultCellStyle = dataGridViewCellStyle6; this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; this.dataGridView_CounterResult.RowTemplate.Height = 50; this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -146,54 +142,6 @@ this.labelMedian.Text = "结果编辑"; this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // btn_add - // - this.btn_add.EnterBackColor = System.Drawing.Color.Blue; - this.btn_add.EnterForeColor = System.Drawing.Color.White; - this.btn_add.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btn_add.FlatAppearance.BorderSize = 0; - this.btn_add.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btn_add.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btn_add.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btn_add.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.btn_add.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.btn_add.HoverForeColor = System.Drawing.Color.White; - this.btn_add.Location = new System.Drawing.Point(155, 65); - this.btn_add.Margin = new System.Windows.Forms.Padding(0); - this.btn_add.Name = "btn_add"; - this.btn_add.PressBackColor = System.Drawing.Color.DarkBlue; - this.btn_add.PressForeColor = System.Drawing.Color.White; - this.btn_add.Radius = 5; - this.btn_add.Size = new System.Drawing.Size(111, 26); - this.btn_add.TabIndex = 14; - this.btn_add.Text = "添加"; - this.btn_add.UseVisualStyleBackColor = true; - this.btn_add.Click += new System.EventHandler(this.btn_add_Click); - // - // benDelete - // - this.benDelete.EnterBackColor = System.Drawing.Color.Blue; - this.benDelete.EnterForeColor = System.Drawing.Color.White; - this.benDelete.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.benDelete.FlatAppearance.BorderSize = 0; - this.benDelete.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.benDelete.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.benDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.benDelete.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.benDelete.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(0)))), ((int)(((byte)(18))))); - this.benDelete.HoverForeColor = System.Drawing.Color.White; - this.benDelete.Location = new System.Drawing.Point(27, 65); - this.benDelete.Margin = new System.Windows.Forms.Padding(0); - this.benDelete.Name = "benDelete"; - this.benDelete.PressBackColor = System.Drawing.Color.DarkBlue; - this.benDelete.PressForeColor = System.Drawing.Color.White; - this.benDelete.Radius = 5; - this.benDelete.Size = new System.Drawing.Size(111, 26); - this.benDelete.TabIndex = 13; - this.benDelete.Text = "删除"; - this.benDelete.UseVisualStyleBackColor = true; - this.benDelete.Click += new System.EventHandler(this.benDelete_Click); - // // panelControl // this.panelControl.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelControl.BackgroundImage"))); @@ -205,30 +153,6 @@ this.panelControl.Size = new System.Drawing.Size(288, 136); this.panelControl.TabIndex = 3; // - // btnStart - // - this.btnStart.EnterBackColor = System.Drawing.Color.Blue; - this.btnStart.EnterForeColor = System.Drawing.Color.White; - this.btnStart.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnStart.FlatAppearance.BorderSize = 0; - this.btnStart.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnStart.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnStart.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.btnStart.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.btnStart.HoverForeColor = System.Drawing.Color.White; - this.btnStart.Location = new System.Drawing.Point(88, 65); - this.btnStart.Margin = new System.Windows.Forms.Padding(0); - this.btnStart.Name = "btnStart"; - this.btnStart.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnStart.PressForeColor = System.Drawing.Color.White; - this.btnStart.Radius = 5; - this.btnStart.Size = new System.Drawing.Size(111, 26); - this.btnStart.TabIndex = 11; - this.btnStart.Text = "启动连续检定"; - this.btnStart.UseVisualStyleBackColor = true; - this.btnStart.Click += new System.EventHandler(this.btnStart_Click); - // // labelControl // this.labelControl.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -245,9 +169,7 @@ // this.panelSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelSource.BackgroundImage"))); this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.btn_dropDetecModel); this.panelSource.Controls.Add(this.text_signal); - this.panelSource.Controls.Add(this.textBox_detecModel); this.panelSource.Controls.Add(this.comboBox_detecModel); this.panelSource.Controls.Add(this.label6); this.panelSource.Controls.Add(this.labelSource); @@ -257,24 +179,6 @@ this.panelSource.Size = new System.Drawing.Size(288, 191); this.panelSource.TabIndex = 1; // - // btn_dropDetecModel - // - this.btn_dropDetecModel.BackColor = System.Drawing.Color.White; - this.btn_dropDetecModel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btn_dropDetecModel.FlatAppearance.BorderSize = 0; - this.btn_dropDetecModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btn_dropDetecModel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_dropDetecModel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_dropDetecModel.Location = new System.Drawing.Point(228, 119); - this.btn_dropDetecModel.Margin = new System.Windows.Forms.Padding(0); - this.btn_dropDetecModel.Name = "btn_dropDetecModel"; - this.btn_dropDetecModel.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.btn_dropDetecModel.Size = new System.Drawing.Size(18, 23); - this.btn_dropDetecModel.TabIndex = 56; - this.btn_dropDetecModel.Text = "﹀"; - this.btn_dropDetecModel.UseVisualStyleBackColor = false; - this.btn_dropDetecModel.Click += new System.EventHandler(this.btn_dropDetecModel_Click); - // // text_signal // // @@ -285,7 +189,7 @@ this.text_signal.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.text_signal.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.text_signal.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.text_signal.Location = new System.Drawing.Point(101, 77); + this.text_signal.Location = new System.Drawing.Point(100, 77); this.text_signal.Margin = new System.Windows.Forms.Padding(0); this.text_signal.MaximumSize = new System.Drawing.Size(150, 26); this.text_signal.Name = "text_signal"; @@ -293,37 +197,21 @@ this.text_signal.Size = new System.Drawing.Size(150, 26); this.text_signal.TabIndex = 17; // - // textBox_detecModel - // - // - // - // - this.textBox_detecModel.Border.Class = "TextBoxBorder"; - this.textBox_detecModel.Border.CornerDiameter = 5; - this.textBox_detecModel.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.textBox_detecModel.Location = new System.Drawing.Point(101, 117); - this.textBox_detecModel.Margin = new System.Windows.Forms.Padding(0); - this.textBox_detecModel.Name = "textBox_detecModel"; - this.textBox_detecModel.PreventEnterBeep = true; - this.textBox_detecModel.Size = new System.Drawing.Size(150, 27); - this.textBox_detecModel.TabIndex = 55; - this.textBox_detecModel.Text = "频率测量"; - // // comboBox_detecModel // this.comboBox_detecModel.DisplayMember = "Text"; this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_detecModel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox_detecModel.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.comboBox_detecModel.FormattingEnabled = true; this.comboBox_detecModel.ItemHeight = 20; this.comboBox_detecModel.Items.AddRange(new object[] { this.comboItem1, this.comboItem2}); - this.comboBox_detecModel.Location = new System.Drawing.Point(104, 118); + this.comboBox_detecModel.Location = new System.Drawing.Point(100, 118); this.comboBox_detecModel.Margin = new System.Windows.Forms.Padding(0); this.comboBox_detecModel.Name = "comboBox_detecModel"; - this.comboBox_detecModel.Size = new System.Drawing.Size(141, 26); + this.comboBox_detecModel.Size = new System.Drawing.Size(150, 26); this.comboBox_detecModel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.comboBox_detecModel.TabIndex = 16; this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); @@ -374,8 +262,6 @@ // this.panelCounter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelCounter.BackgroundImage"))); this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.btn_downCounterList); - this.panelCounter.Controls.Add(this.text_devName); this.panelCounter.Controls.Add(this.comboBox_counters); this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); @@ -386,44 +272,11 @@ this.panelCounter.Size = new System.Drawing.Size(288, 202); this.panelCounter.TabIndex = 0; // - // btn_downCounterList - // - this.btn_downCounterList.BackColor = System.Drawing.Color.White; - this.btn_downCounterList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btn_downCounterList.FlatAppearance.BorderSize = 0; - this.btn_downCounterList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btn_downCounterList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_downCounterList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btn_downCounterList.Location = new System.Drawing.Point(232, 73); - this.btn_downCounterList.Margin = new System.Windows.Forms.Padding(0); - this.btn_downCounterList.Name = "btn_downCounterList"; - this.btn_downCounterList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); - this.btn_downCounterList.Size = new System.Drawing.Size(18, 23); - this.btn_downCounterList.TabIndex = 54; - this.btn_downCounterList.Text = "﹀"; - this.btn_downCounterList.UseVisualStyleBackColor = false; - this.btn_downCounterList.Click += new System.EventHandler(this.btn_downCounterList_Click); - // - // text_devName - // - // - // - // - this.text_devName.Border.Class = "TextBoxBorder"; - this.text_devName.Border.CornerDiameter = 5; - this.text_devName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.text_devName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.text_devName.Location = new System.Drawing.Point(104, 71); - this.text_devName.Margin = new System.Windows.Forms.Padding(0); - this.text_devName.Name = "text_devName"; - this.text_devName.PreventEnterBeep = true; - this.text_devName.Size = new System.Drawing.Size(150, 27); - this.text_devName.TabIndex = 53; - // // comboBox_counters // this.comboBox_counters.DisplayMember = "Text"; this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_counters.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox_counters.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.comboBox_counters.FormattingEnabled = true; this.comboBox_counters.ItemHeight = 21; @@ -509,6 +362,78 @@ this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // + // btn_add + // + this.btn_add.EnterBackColor = System.Drawing.Color.Blue; + this.btn_add.EnterForeColor = System.Drawing.Color.White; + this.btn_add.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btn_add.FlatAppearance.BorderSize = 0; + this.btn_add.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btn_add.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btn_add.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_add.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.btn_add.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btn_add.HoverForeColor = System.Drawing.Color.White; + this.btn_add.Location = new System.Drawing.Point(155, 65); + this.btn_add.Margin = new System.Windows.Forms.Padding(0); + this.btn_add.Name = "btn_add"; + this.btn_add.PressBackColor = System.Drawing.Color.DarkBlue; + this.btn_add.PressForeColor = System.Drawing.Color.White; + this.btn_add.Radius = 5; + this.btn_add.Size = new System.Drawing.Size(111, 26); + this.btn_add.TabIndex = 14; + this.btn_add.Text = "添加"; + this.btn_add.UseVisualStyleBackColor = true; + this.btn_add.Click += new System.EventHandler(this.btn_add_Click); + // + // benDelete + // + this.benDelete.EnterBackColor = System.Drawing.Color.Blue; + this.benDelete.EnterForeColor = System.Drawing.Color.White; + this.benDelete.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.benDelete.FlatAppearance.BorderSize = 0; + this.benDelete.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.benDelete.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.benDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.benDelete.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.benDelete.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(0)))), ((int)(((byte)(18))))); + this.benDelete.HoverForeColor = System.Drawing.Color.White; + this.benDelete.Location = new System.Drawing.Point(27, 65); + this.benDelete.Margin = new System.Windows.Forms.Padding(0); + this.benDelete.Name = "benDelete"; + this.benDelete.PressBackColor = System.Drawing.Color.DarkBlue; + this.benDelete.PressForeColor = System.Drawing.Color.White; + this.benDelete.Radius = 5; + this.benDelete.Size = new System.Drawing.Size(111, 26); + this.benDelete.TabIndex = 13; + this.benDelete.Text = "删除"; + this.benDelete.UseVisualStyleBackColor = true; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); + // + // btnStart + // + this.btnStart.EnterBackColor = System.Drawing.Color.Blue; + this.btnStart.EnterForeColor = System.Drawing.Color.White; + this.btnStart.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnStart.FlatAppearance.BorderSize = 0; + this.btnStart.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnStart.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnStart.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.btnStart.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnStart.HoverForeColor = System.Drawing.Color.White; + this.btnStart.Location = new System.Drawing.Point(88, 65); + this.btnStart.Margin = new System.Windows.Forms.Padding(0); + this.btnStart.Name = "btnStart"; + this.btnStart.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnStart.PressForeColor = System.Drawing.Color.White; + this.btnStart.Radius = 5; + this.btnStart.Size = new System.Drawing.Size(111, 26); + this.btnStart.TabIndex = 11; + this.btnStart.Text = "启动连续检定"; + this.btnStart.UseVisualStyleBackColor = true; + this.btnStart.Click += new System.EventHandler(this.btnStart_Click); + // // CounterCtrlForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -560,9 +485,5 @@ private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; private DevComponents.DotNetBar.Controls.TextBoxX text_signal; - private System.Windows.Forms.Button btn_downCounterList; - public DevComponents.DotNetBar.Controls.TextBoxX text_devName; - private System.Windows.Forms.Button btn_dropDetecModel; - public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index 357a90c..f21874a 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -65,6 +65,9 @@ comboBox_counters.DataSource = list; comboBox_counters.DisplayMember = "DevName"; comboBox_counters.ValueMember = "Id"; + + comboBox_detecModel.SelectedIndex = 0; + InitTableCounter(); LoadCounterDetecInitList(); @@ -233,16 +236,16 @@ table_counterDetecInit.Columns.Add("initId", Type.GetType("System.Int32")); table_counterDetecInit.Columns.Add("counterDataId", Type.GetType("System.Int64")); - if (text_devName.Text != "") + if (comboBox_counters.Text != "") { - List list = deviceService.search(text_devName.Text, "", "", "", "", ""); + List list = deviceService.search(comboBox_counters.Text, "", "", "", "", ""); if (null != list && list.Count > 0) { devType = list[0].DevTypeName; devCode = list[0].DevCode; } - string type = textBox_detecModel.Text.Equals("频率测量") ? "1" : "2"; + string type = comboBox_detecModel.Text.Equals("频率测量") ? "1" : "2"; //查询历史检测数据 List counterDataList = counterDataService.getHistory(deviceId, "", type); if (null != counterDataList && counterDataList.Count > 0) @@ -263,7 +266,7 @@ int index = 1; foreach (CounterDetecInit counterDetecInit in queryList) { - if (textBox_detecModel.Text.Equals("周期测量")) + if (comboBox_detecModel.Text.Equals("周期测量")) { table_counterDetecInit.Rows.Add(index, devType, devCode, devPort, counterDetecInit.Cycle, "", "", "", counterDetecInit.Id, -1); } @@ -310,7 +313,7 @@ private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) { - text_devName.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevName; + comboBox_counters.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevName; deviceId = ((DeviceDto)comboBox_counters.SelectedItem).Id; LoadCounterDetecInitList(); @@ -328,14 +331,14 @@ private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) { - textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); - if (textBox_detecModel.Text.Equals("频率测量")) + comboBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (comboBox_detecModel.Text.Equals("频率测量")) { colStdValue.Text = "输出频率"; colValue.Text = "测量频率"; } - else if (textBox_detecModel.Text.Equals("周期测量")) + else if (comboBox_detecModel.Text.Equals("周期测量")) { colStdValue.Text = "输出周期"; colValue.Text = "测量周期"; @@ -387,7 +390,7 @@ private void btn_add_Click(object sender, EventArgs e) { - if (text_devName.Text.Equals("")) + if (comboBox_counters.Text.Equals("")) { MessageBox.Show("请先选择待检测计数器"); return; @@ -534,7 +537,7 @@ dataGridView_CounterResult.ReadOnly = true; btn_add.Enabled = false; benDelete.Enabled = false; - btn_dropDetecModel.Enabled = false; + ///btn_dropDetecModel.Enabled = false; string[] arr = text_counterIp.Text.Split('.'); if (arr.Length != 4) @@ -564,14 +567,14 @@ } } - text_devName.ReadOnly = true; - btn_downCounterList.Enabled = false; + //text_devName.ReadOnly = true; + //btn_downCounterList.Enabled = false; btnStart.Enabled = false; - btn_dropDetecModel.Enabled = false; - textBox_detecModel.ReadOnly = true; + //btn_dropDetecModel.Enabled = false; + //textBox_detecModel.ReadOnly = true; //SetDevTestDlg.inDetecCounterId = deviceId; - string type = textBox_detecModel.Text.Equals("频率测量") ? "freq" : "period"; + string type = comboBox_detecModel.Text.Equals("频率测量") ? "freq" : "period"; string typeId = type.Equals("freq") ? "1" : "2"; new Thread(() => @@ -602,33 +605,43 @@ int index = 0; foreach (DataGridViewRow row in dataGridView_CounterResult.Rows) { - SensitivityContentParam sensitivityContentParam = new SensitivityContentParam(); - if (type.Equals("freq")) + if (row.Index == -1) + break; + try { - sensitivityContentParam.Freq = row.Cells[4].Value.ToString(); - sensitivityContentParam.CheckModel = "0"; - } - else - { - sensitivityContentParam.Period = row.Cells[4].Value.ToString(); - sensitivityContentParam.CheckModel = "1"; - } + SensitivityContentParam sensitivityContentParam = new SensitivityContentParam(); + if (type.Equals("freq")) + { + sensitivityContentParam.Freq = row.Cells[4].Value.ToString(); + sensitivityContentParam.CheckModel = "0"; + } + else + { + sensitivityContentParam.Period = row.Cells[4].Value.ToString(); + sensitivityContentParam.CheckModel = "1"; + } - int re = sensitivityService.beginTest(type, gPIBService, tcpService, counterCheckParam, ref sensitivityContentParam);//0:成功;-1:失败 - string value = ""; - if (re == 0) - { - value = type.Equals("freq") ? sensitivityContentParam.ReFreq : sensitivityContentParam.RePeriod; - } - long dataId = counterDataService.add(deviceId, row.Cells[4].Value.ToString(), value, sensitivityContentParam.VolTage, sensitivityContentParam.CheckTime.ToString("yyyy-MM-dd HH:mm:ss"), typeId); - table_counterDetecInit.Rows[index][8] = dataId; - row.Cells[5].Value = value; - row.Cells[6].Value = sensitivityContentParam.VolTage; - row.Cells[7].Value = sensitivityContentParam.CheckTime.ToString("yyyy-MM-dd HH:mm:ss"); + int re = sensitivityService.beginTest(type, gPIBService, tcpService, counterCheckParam, ref sensitivityContentParam);//0:成功;-1:失败 + string value = ""; + if (re == 0) + { + value = type.Equals("freq") ? sensitivityContentParam.ReFreq : sensitivityContentParam.RePeriod; + } - //dataGridView_CounterResult.Refresh(); - index++; + long dataId = counterDataService.add(deviceId, row.Cells[4].Value.ToString(), value, sensitivityContentParam.VolTage, sensitivityContentParam.CheckTime.ToString("yyyy-MM-dd HH:mm:ss"), typeId); + table_counterDetecInit.Rows[index][8] = dataId; + row.Cells[5].Value = value; + row.Cells[6].Value = sensitivityContentParam.VolTage; + row.Cells[7].Value = sensitivityContentParam.CheckTime.ToString("yyyy-MM-dd HH:mm:ss"); + + //dataGridView_CounterResult.Refresh(); + index++; + } + catch(Exception ex) + { + string str = ex.Message; + } } changeBox(); @@ -645,11 +658,11 @@ Invoke(new MethodInvoker(delegate () { SetDevTestDlg.inDetecCounterId = -1; - text_devName.ReadOnly = false; - btn_downCounterList.Enabled = true; + //text_devName.ReadOnly = false; + //btn_downCounterList.Enabled = true; btnStart.Enabled = true; - btn_dropDetecModel.Enabled = true; - textBox_detecModel.ReadOnly = false; + //btn_dropDetecModel.Enabled = true; + //textBox_detecModel.ReadOnly = false; })); dataGridView_CounterResult.ReadOnly = false; @@ -669,7 +682,7 @@ { if (String.IsNullOrEmpty(value)) { - MessageBox.Show("输出" + textBox_detecModel.Text.Substring(0, 2) + "不能为空,操作失败!"); + MessageBox.Show("输出" + comboBox_detecModel.Text.Substring(0, 2) + "不能为空,操作失败!"); if (isAdd) table_counterDetecInit.Rows.RemoveAt(table_counterDetecInit.Rows.Count - 1); else { @@ -680,7 +693,7 @@ } else { - if (textBox_detecModel.Text.Equals("频率测量")) + if (comboBox_detecModel.Text.Equals("频率测量")) { if (!checkFreq(value) || freAndCycle(value) == null) { @@ -715,7 +728,7 @@ string freq = ""; string cycle = ""; - if (textBox_detecModel.Text.Equals("频率测量")) + if (comboBox_detecModel.Text.Equals("频率测量")) { freq = value; cycle = freAndCycle(freq); @@ -832,7 +845,7 @@ private void updateDatabase() { - string type = textBox_detecModel.Text.Equals("频率测量") ? "1" : "2"; + string type = comboBox_detecModel.Text.Equals("频率测量") ? "1" : "2"; foreach (DataGridViewRow row in dataGridView_CounterResult.Rows) { if (!String.IsNullOrEmpty(row.Cells[5].Value.ToString()) || !String.IsNullOrEmpty(row.Cells[6].Value.ToString())) @@ -844,11 +857,11 @@ private void detecModelConf() { - if (textBox_detecModel.Text == "频率测量") + if (comboBox_detecModel.Text == "频率测量") { GPIB_TCPIP_OPERATIO.setFreqModel(tcpService); } - else if (textBox_detecModel.Text == "周期测量") + else if (comboBox_detecModel.Text == "周期测量") { GPIB_TCPIP_OPERATIO.setPerModel(tcpService); }