diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/info/ageRate.cs b/RbFreqStandMeasure/info/ageRate.cs index 486f4a6..7529830 100644 --- a/RbFreqStandMeasure/info/ageRate.cs +++ b/RbFreqStandMeasure/info/ageRate.cs @@ -4,235 +4,28 @@ using System.Windows.Forms; using System.Drawing.Drawing2D; using Casic.Birmm.RbFreqStandMeasure.Properties; +using System.Data; +using System.Windows.Forms.DataVisualization.Charting; namespace Casic.Birmm.RbFreqStandMeasure { public partial class ageRate : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - - public ageRate() + + public ageRate(DataTable originData) { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - InitialCanvas(); + chart1.Series["Series1"].XValueMember = "时间"; + chart1.Series["Series1"].YValueMembers = "相对频率偏差"; + + //chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle; //线条上的数据点标志类型 + //chart1.Series["Series1"].MarkerSize = 3; //标志大小 + Series Series1 = new Series(); + chart1.Series.Add(Series1);//加入你的chart1 + chart1.DataSource = originData; + } - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/info/ageRate.cs b/RbFreqStandMeasure/info/ageRate.cs index 486f4a6..7529830 100644 --- a/RbFreqStandMeasure/info/ageRate.cs +++ b/RbFreqStandMeasure/info/ageRate.cs @@ -4,235 +4,28 @@ using System.Windows.Forms; using System.Drawing.Drawing2D; using Casic.Birmm.RbFreqStandMeasure.Properties; +using System.Data; +using System.Windows.Forms.DataVisualization.Charting; namespace Casic.Birmm.RbFreqStandMeasure { public partial class ageRate : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - - public ageRate() + + public ageRate(DataTable originData) { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - InitialCanvas(); + chart1.Series["Series1"].XValueMember = "时间"; + chart1.Series["Series1"].YValueMembers = "相对频率偏差"; + + //chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle; //线条上的数据点标志类型 + //chart1.Series["Series1"].MarkerSize = 3; //标志大小 + Series Series1 = new Series(); + chart1.Series.Add(Series1);//加入你的chart1 + chart1.DataSource = originData; + } - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 9c376de..3a62610 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -34,26 +34,31 @@ this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label_customerName = new System.Windows.Forms.Label(); - this.label_devModel = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label_devModel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(13, 81); + this.chart1.Location = new System.Drawing.Point(3, 67); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 238); + this.chart1.Size = new System.Drawing.Size(402, 176); this.chart1.TabIndex = 117; this.chart1.Text = "chart1"; // @@ -62,7 +67,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(380, 10); + this.label1.Location = new System.Drawing.Point(316, 8); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -74,7 +79,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(261, 10); + this.label4.Location = new System.Drawing.Point(197, 8); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(119, 27); @@ -87,32 +92,19 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(146, 42); + this.label_customerName.Location = new System.Drawing.Point(100, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); + this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label_devModel - // - this.label_devModel.BackColor = System.Drawing.Color.Transparent; - this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(146, 10); - this.label_devModel.Margin = new System.Windows.Forms.Padding(0); - this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; - this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(59, 42); + this.label2.Location = new System.Drawing.Point(13, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -120,24 +112,12 @@ this.label2.Text = "测量结果:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label9 - // - this.label9.BackColor = System.Drawing.Color.Transparent; - this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(10, 10); - this.label9.Margin = new System.Windows.Forms.Padding(0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 111; - this.label9.Text = "预热天数:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label3.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label3.Location = new System.Drawing.Point(380, 42); + this.label3.Location = new System.Drawing.Point(316, 35); this.label3.Margin = new System.Windows.Forms.Padding(0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); @@ -149,7 +129,7 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(293, 42); + this.label5.Location = new System.Drawing.Point(229, 35); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(87, 27); @@ -157,10 +137,34 @@ this.label5.Text = "标准偏差:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // label9 + // + this.label9.BackColor = System.Drawing.Color.Transparent; + this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(17, 8); + this.label9.Margin = new System.Windows.Forms.Padding(0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(83, 27); + this.label9.TabIndex = 111; + this.label9.Text = "预热天数:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label_devModel + // + this.label_devModel.BackColor = System.Drawing.Color.Transparent; + this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; + this.label_devModel.Location = new System.Drawing.Point(100, 8); + this.label_devModel.Margin = new System.Windows.Forms.Padding(0); + this.label_devModel.Name = "label_devModel"; + this.label_devModel.Size = new System.Drawing.Size(67, 27); + this.label_devModel.TabIndex = 113; + this.label_devModel.Text = "仪:"; + this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // ageRate // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.label3); this.Controls.Add(this.label5); @@ -172,10 +176,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "ageRate"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); @@ -187,10 +188,10 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label_customerName; - private System.Windows.Forms.Label label_devModel; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label_devModel; } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/info/ageRate.cs b/RbFreqStandMeasure/info/ageRate.cs index 486f4a6..7529830 100644 --- a/RbFreqStandMeasure/info/ageRate.cs +++ b/RbFreqStandMeasure/info/ageRate.cs @@ -4,235 +4,28 @@ using System.Windows.Forms; using System.Drawing.Drawing2D; using Casic.Birmm.RbFreqStandMeasure.Properties; +using System.Data; +using System.Windows.Forms.DataVisualization.Charting; namespace Casic.Birmm.RbFreqStandMeasure { public partial class ageRate : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - - public ageRate() + + public ageRate(DataTable originData) { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - InitialCanvas(); + chart1.Series["Series1"].XValueMember = "时间"; + chart1.Series["Series1"].YValueMembers = "相对频率偏差"; + + //chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle; //线条上的数据点标志类型 + //chart1.Series["Series1"].MarkerSize = 3; //标志大小 + Series Series1 = new Series(); + chart1.Series.Add(Series1);//加入你的chart1 + chart1.DataSource = originData; + } - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 9c376de..3a62610 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -34,26 +34,31 @@ this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label_customerName = new System.Windows.Forms.Label(); - this.label_devModel = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label_devModel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(13, 81); + this.chart1.Location = new System.Drawing.Point(3, 67); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 238); + this.chart1.Size = new System.Drawing.Size(402, 176); this.chart1.TabIndex = 117; this.chart1.Text = "chart1"; // @@ -62,7 +67,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(380, 10); + this.label1.Location = new System.Drawing.Point(316, 8); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -74,7 +79,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(261, 10); + this.label4.Location = new System.Drawing.Point(197, 8); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(119, 27); @@ -87,32 +92,19 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(146, 42); + this.label_customerName.Location = new System.Drawing.Point(100, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); + this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label_devModel - // - this.label_devModel.BackColor = System.Drawing.Color.Transparent; - this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(146, 10); - this.label_devModel.Margin = new System.Windows.Forms.Padding(0); - this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; - this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(59, 42); + this.label2.Location = new System.Drawing.Point(13, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -120,24 +112,12 @@ this.label2.Text = "测量结果:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label9 - // - this.label9.BackColor = System.Drawing.Color.Transparent; - this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(10, 10); - this.label9.Margin = new System.Windows.Forms.Padding(0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 111; - this.label9.Text = "预热天数:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label3.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label3.Location = new System.Drawing.Point(380, 42); + this.label3.Location = new System.Drawing.Point(316, 35); this.label3.Margin = new System.Windows.Forms.Padding(0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); @@ -149,7 +129,7 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(293, 42); + this.label5.Location = new System.Drawing.Point(229, 35); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(87, 27); @@ -157,10 +137,34 @@ this.label5.Text = "标准偏差:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // label9 + // + this.label9.BackColor = System.Drawing.Color.Transparent; + this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(17, 8); + this.label9.Margin = new System.Windows.Forms.Padding(0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(83, 27); + this.label9.TabIndex = 111; + this.label9.Text = "预热天数:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label_devModel + // + this.label_devModel.BackColor = System.Drawing.Color.Transparent; + this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; + this.label_devModel.Location = new System.Drawing.Point(100, 8); + this.label_devModel.Margin = new System.Windows.Forms.Padding(0); + this.label_devModel.Name = "label_devModel"; + this.label_devModel.Size = new System.Drawing.Size(67, 27); + this.label_devModel.TabIndex = 113; + this.label_devModel.Text = "仪:"; + this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // ageRate // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.label3); this.Controls.Add(this.label5); @@ -172,10 +176,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "ageRate"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); @@ -187,10 +188,10 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label_customerName; - private System.Windows.Forms.Label label_devModel; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label_devModel; } } diff --git a/RbFreqStandMeasure/info/bootFeature.cs b/RbFreqStandMeasure/info/bootFeature.cs index 4063048..2cec888 100644 --- a/RbFreqStandMeasure/info/bootFeature.cs +++ b/RbFreqStandMeasure/info/bootFeature.cs @@ -9,230 +9,15 @@ { public partial class bootFeature : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } public bootFeature() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - + //设置背景颜色为透明 + this.BackColor = Color.Transparent; } + - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/info/ageRate.cs b/RbFreqStandMeasure/info/ageRate.cs index 486f4a6..7529830 100644 --- a/RbFreqStandMeasure/info/ageRate.cs +++ b/RbFreqStandMeasure/info/ageRate.cs @@ -4,235 +4,28 @@ using System.Windows.Forms; using System.Drawing.Drawing2D; using Casic.Birmm.RbFreqStandMeasure.Properties; +using System.Data; +using System.Windows.Forms.DataVisualization.Charting; namespace Casic.Birmm.RbFreqStandMeasure { public partial class ageRate : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - - public ageRate() + + public ageRate(DataTable originData) { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - InitialCanvas(); + chart1.Series["Series1"].XValueMember = "时间"; + chart1.Series["Series1"].YValueMembers = "相对频率偏差"; + + //chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle; //线条上的数据点标志类型 + //chart1.Series["Series1"].MarkerSize = 3; //标志大小 + Series Series1 = new Series(); + chart1.Series.Add(Series1);//加入你的chart1 + chart1.DataSource = originData; + } - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 9c376de..3a62610 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -34,26 +34,31 @@ this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label_customerName = new System.Windows.Forms.Label(); - this.label_devModel = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label_devModel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(13, 81); + this.chart1.Location = new System.Drawing.Point(3, 67); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 238); + this.chart1.Size = new System.Drawing.Size(402, 176); this.chart1.TabIndex = 117; this.chart1.Text = "chart1"; // @@ -62,7 +67,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(380, 10); + this.label1.Location = new System.Drawing.Point(316, 8); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -74,7 +79,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(261, 10); + this.label4.Location = new System.Drawing.Point(197, 8); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(119, 27); @@ -87,32 +92,19 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(146, 42); + this.label_customerName.Location = new System.Drawing.Point(100, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); + this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label_devModel - // - this.label_devModel.BackColor = System.Drawing.Color.Transparent; - this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(146, 10); - this.label_devModel.Margin = new System.Windows.Forms.Padding(0); - this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; - this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(59, 42); + this.label2.Location = new System.Drawing.Point(13, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -120,24 +112,12 @@ this.label2.Text = "测量结果:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label9 - // - this.label9.BackColor = System.Drawing.Color.Transparent; - this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(10, 10); - this.label9.Margin = new System.Windows.Forms.Padding(0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 111; - this.label9.Text = "预热天数:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label3.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label3.Location = new System.Drawing.Point(380, 42); + this.label3.Location = new System.Drawing.Point(316, 35); this.label3.Margin = new System.Windows.Forms.Padding(0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); @@ -149,7 +129,7 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(293, 42); + this.label5.Location = new System.Drawing.Point(229, 35); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(87, 27); @@ -157,10 +137,34 @@ this.label5.Text = "标准偏差:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // label9 + // + this.label9.BackColor = System.Drawing.Color.Transparent; + this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(17, 8); + this.label9.Margin = new System.Windows.Forms.Padding(0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(83, 27); + this.label9.TabIndex = 111; + this.label9.Text = "预热天数:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label_devModel + // + this.label_devModel.BackColor = System.Drawing.Color.Transparent; + this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; + this.label_devModel.Location = new System.Drawing.Point(100, 8); + this.label_devModel.Margin = new System.Windows.Forms.Padding(0); + this.label_devModel.Name = "label_devModel"; + this.label_devModel.Size = new System.Drawing.Size(67, 27); + this.label_devModel.TabIndex = 113; + this.label_devModel.Text = "仪:"; + this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // ageRate // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.label3); this.Controls.Add(this.label5); @@ -172,10 +176,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "ageRate"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); @@ -187,10 +188,10 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label_customerName; - private System.Windows.Forms.Label label_devModel; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label_devModel; } } diff --git a/RbFreqStandMeasure/info/bootFeature.cs b/RbFreqStandMeasure/info/bootFeature.cs index 4063048..2cec888 100644 --- a/RbFreqStandMeasure/info/bootFeature.cs +++ b/RbFreqStandMeasure/info/bootFeature.cs @@ -9,230 +9,15 @@ { public partial class bootFeature : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } public bootFeature() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - + //设置背景颜色为透明 + this.BackColor = Color.Transparent; } + - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index a1fa758..133d6b5 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -42,16 +42,22 @@ // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 50); + this.chart1.Location = new System.Drawing.Point(3, 65); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; + series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.DateTime; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 265); + this.chart1.Size = new System.Drawing.Size(399, 178); this.chart1.TabIndex = 110; this.chart1.Text = "chart1"; // @@ -60,7 +66,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 6); + this.label1.Location = new System.Drawing.Point(294, 6); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -72,7 +78,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 6); + this.label4.Location = new System.Drawing.Point(207, 6); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -85,7 +91,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(455, 6); + this.label_customerName.Location = new System.Drawing.Point(106, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -98,7 +104,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 6); + this.label_devModel.Location = new System.Drawing.Point(106, 6); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -110,7 +116,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(368, 6); + this.label2.Location = new System.Drawing.Point(19, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -122,18 +128,17 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 6); + this.label9.Location = new System.Drawing.Point(22, 6); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); + this.label9.Size = new System.Drawing.Size(84, 27); this.label9.TabIndex = 100; this.label9.Text = "y(t)-Min:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // bootFeature // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.chart1); this.Controls.Add(this.label1); @@ -143,10 +148,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "bootFeature"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/info/ageRate.cs b/RbFreqStandMeasure/info/ageRate.cs index 486f4a6..7529830 100644 --- a/RbFreqStandMeasure/info/ageRate.cs +++ b/RbFreqStandMeasure/info/ageRate.cs @@ -4,235 +4,28 @@ using System.Windows.Forms; using System.Drawing.Drawing2D; using Casic.Birmm.RbFreqStandMeasure.Properties; +using System.Data; +using System.Windows.Forms.DataVisualization.Charting; namespace Casic.Birmm.RbFreqStandMeasure { public partial class ageRate : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - - public ageRate() + + public ageRate(DataTable originData) { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - InitialCanvas(); + chart1.Series["Series1"].XValueMember = "时间"; + chart1.Series["Series1"].YValueMembers = "相对频率偏差"; + + //chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle; //线条上的数据点标志类型 + //chart1.Series["Series1"].MarkerSize = 3; //标志大小 + Series Series1 = new Series(); + chart1.Series.Add(Series1);//加入你的chart1 + chart1.DataSource = originData; + } - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 9c376de..3a62610 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -34,26 +34,31 @@ this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label_customerName = new System.Windows.Forms.Label(); - this.label_devModel = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label_devModel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(13, 81); + this.chart1.Location = new System.Drawing.Point(3, 67); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 238); + this.chart1.Size = new System.Drawing.Size(402, 176); this.chart1.TabIndex = 117; this.chart1.Text = "chart1"; // @@ -62,7 +67,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(380, 10); + this.label1.Location = new System.Drawing.Point(316, 8); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -74,7 +79,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(261, 10); + this.label4.Location = new System.Drawing.Point(197, 8); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(119, 27); @@ -87,32 +92,19 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(146, 42); + this.label_customerName.Location = new System.Drawing.Point(100, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); + this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label_devModel - // - this.label_devModel.BackColor = System.Drawing.Color.Transparent; - this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(146, 10); - this.label_devModel.Margin = new System.Windows.Forms.Padding(0); - this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; - this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(59, 42); + this.label2.Location = new System.Drawing.Point(13, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -120,24 +112,12 @@ this.label2.Text = "测量结果:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label9 - // - this.label9.BackColor = System.Drawing.Color.Transparent; - this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(10, 10); - this.label9.Margin = new System.Windows.Forms.Padding(0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 111; - this.label9.Text = "预热天数:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label3.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label3.Location = new System.Drawing.Point(380, 42); + this.label3.Location = new System.Drawing.Point(316, 35); this.label3.Margin = new System.Windows.Forms.Padding(0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); @@ -149,7 +129,7 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(293, 42); + this.label5.Location = new System.Drawing.Point(229, 35); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(87, 27); @@ -157,10 +137,34 @@ this.label5.Text = "标准偏差:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // label9 + // + this.label9.BackColor = System.Drawing.Color.Transparent; + this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(17, 8); + this.label9.Margin = new System.Windows.Forms.Padding(0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(83, 27); + this.label9.TabIndex = 111; + this.label9.Text = "预热天数:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label_devModel + // + this.label_devModel.BackColor = System.Drawing.Color.Transparent; + this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; + this.label_devModel.Location = new System.Drawing.Point(100, 8); + this.label_devModel.Margin = new System.Windows.Forms.Padding(0); + this.label_devModel.Name = "label_devModel"; + this.label_devModel.Size = new System.Drawing.Size(67, 27); + this.label_devModel.TabIndex = 113; + this.label_devModel.Text = "仪:"; + this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // ageRate // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.label3); this.Controls.Add(this.label5); @@ -172,10 +176,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "ageRate"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); @@ -187,10 +188,10 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label_customerName; - private System.Windows.Forms.Label label_devModel; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label_devModel; } } diff --git a/RbFreqStandMeasure/info/bootFeature.cs b/RbFreqStandMeasure/info/bootFeature.cs index 4063048..2cec888 100644 --- a/RbFreqStandMeasure/info/bootFeature.cs +++ b/RbFreqStandMeasure/info/bootFeature.cs @@ -9,230 +9,15 @@ { public partial class bootFeature : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } public bootFeature() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - + //设置背景颜色为透明 + this.BackColor = Color.Transparent; } + - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index a1fa758..133d6b5 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -42,16 +42,22 @@ // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 50); + this.chart1.Location = new System.Drawing.Point(3, 65); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; + series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.DateTime; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 265); + this.chart1.Size = new System.Drawing.Size(399, 178); this.chart1.TabIndex = 110; this.chart1.Text = "chart1"; // @@ -60,7 +66,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 6); + this.label1.Location = new System.Drawing.Point(294, 6); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -72,7 +78,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 6); + this.label4.Location = new System.Drawing.Point(207, 6); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -85,7 +91,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(455, 6); + this.label_customerName.Location = new System.Drawing.Point(106, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -98,7 +104,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 6); + this.label_devModel.Location = new System.Drawing.Point(106, 6); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -110,7 +116,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(368, 6); + this.label2.Location = new System.Drawing.Point(19, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -122,18 +128,17 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 6); + this.label9.Location = new System.Drawing.Point(22, 6); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); + this.label9.Size = new System.Drawing.Size(84, 27); this.label9.TabIndex = 100; this.label9.Text = "y(t)-Min:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // bootFeature // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.chart1); this.Controls.Add(this.label1); @@ -143,10 +148,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "bootFeature"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); diff --git a/RbFreqStandMeasure/info/stability.cs b/RbFreqStandMeasure/info/stability.cs index e42c91f..22e26df 100644 --- a/RbFreqStandMeasure/info/stability.cs +++ b/RbFreqStandMeasure/info/stability.cs @@ -12,227 +12,15 @@ private int x = 0; private int y = 0; - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - + public stability() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); + //设置背景颜色为透明 this.BackColor = Color.Transparent; - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } + } + } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/info/ageRate.cs b/RbFreqStandMeasure/info/ageRate.cs index 486f4a6..7529830 100644 --- a/RbFreqStandMeasure/info/ageRate.cs +++ b/RbFreqStandMeasure/info/ageRate.cs @@ -4,235 +4,28 @@ using System.Windows.Forms; using System.Drawing.Drawing2D; using Casic.Birmm.RbFreqStandMeasure.Properties; +using System.Data; +using System.Windows.Forms.DataVisualization.Charting; namespace Casic.Birmm.RbFreqStandMeasure { public partial class ageRate : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - - public ageRate() + + public ageRate(DataTable originData) { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - InitialCanvas(); + chart1.Series["Series1"].XValueMember = "时间"; + chart1.Series["Series1"].YValueMembers = "相对频率偏差"; + + //chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle; //线条上的数据点标志类型 + //chart1.Series["Series1"].MarkerSize = 3; //标志大小 + Series Series1 = new Series(); + chart1.Series.Add(Series1);//加入你的chart1 + chart1.DataSource = originData; + } - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 9c376de..3a62610 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -34,26 +34,31 @@ this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label_customerName = new System.Windows.Forms.Label(); - this.label_devModel = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label_devModel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(13, 81); + this.chart1.Location = new System.Drawing.Point(3, 67); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 238); + this.chart1.Size = new System.Drawing.Size(402, 176); this.chart1.TabIndex = 117; this.chart1.Text = "chart1"; // @@ -62,7 +67,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(380, 10); + this.label1.Location = new System.Drawing.Point(316, 8); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -74,7 +79,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(261, 10); + this.label4.Location = new System.Drawing.Point(197, 8); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(119, 27); @@ -87,32 +92,19 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(146, 42); + this.label_customerName.Location = new System.Drawing.Point(100, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); + this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label_devModel - // - this.label_devModel.BackColor = System.Drawing.Color.Transparent; - this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(146, 10); - this.label_devModel.Margin = new System.Windows.Forms.Padding(0); - this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; - this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(59, 42); + this.label2.Location = new System.Drawing.Point(13, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -120,24 +112,12 @@ this.label2.Text = "测量结果:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label9 - // - this.label9.BackColor = System.Drawing.Color.Transparent; - this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(10, 10); - this.label9.Margin = new System.Windows.Forms.Padding(0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 111; - this.label9.Text = "预热天数:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label3.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label3.Location = new System.Drawing.Point(380, 42); + this.label3.Location = new System.Drawing.Point(316, 35); this.label3.Margin = new System.Windows.Forms.Padding(0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); @@ -149,7 +129,7 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(293, 42); + this.label5.Location = new System.Drawing.Point(229, 35); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(87, 27); @@ -157,10 +137,34 @@ this.label5.Text = "标准偏差:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // label9 + // + this.label9.BackColor = System.Drawing.Color.Transparent; + this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(17, 8); + this.label9.Margin = new System.Windows.Forms.Padding(0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(83, 27); + this.label9.TabIndex = 111; + this.label9.Text = "预热天数:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label_devModel + // + this.label_devModel.BackColor = System.Drawing.Color.Transparent; + this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; + this.label_devModel.Location = new System.Drawing.Point(100, 8); + this.label_devModel.Margin = new System.Windows.Forms.Padding(0); + this.label_devModel.Name = "label_devModel"; + this.label_devModel.Size = new System.Drawing.Size(67, 27); + this.label_devModel.TabIndex = 113; + this.label_devModel.Text = "仪:"; + this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // ageRate // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.label3); this.Controls.Add(this.label5); @@ -172,10 +176,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "ageRate"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); @@ -187,10 +188,10 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label_customerName; - private System.Windows.Forms.Label label_devModel; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label_devModel; } } diff --git a/RbFreqStandMeasure/info/bootFeature.cs b/RbFreqStandMeasure/info/bootFeature.cs index 4063048..2cec888 100644 --- a/RbFreqStandMeasure/info/bootFeature.cs +++ b/RbFreqStandMeasure/info/bootFeature.cs @@ -9,230 +9,15 @@ { public partial class bootFeature : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } public bootFeature() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - + //设置背景颜色为透明 + this.BackColor = Color.Transparent; } + - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index a1fa758..133d6b5 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -42,16 +42,22 @@ // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 50); + this.chart1.Location = new System.Drawing.Point(3, 65); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; + series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.DateTime; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 265); + this.chart1.Size = new System.Drawing.Size(399, 178); this.chart1.TabIndex = 110; this.chart1.Text = "chart1"; // @@ -60,7 +66,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 6); + this.label1.Location = new System.Drawing.Point(294, 6); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -72,7 +78,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 6); + this.label4.Location = new System.Drawing.Point(207, 6); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -85,7 +91,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(455, 6); + this.label_customerName.Location = new System.Drawing.Point(106, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -98,7 +104,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 6); + this.label_devModel.Location = new System.Drawing.Point(106, 6); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -110,7 +116,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(368, 6); + this.label2.Location = new System.Drawing.Point(19, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -122,18 +128,17 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 6); + this.label9.Location = new System.Drawing.Point(22, 6); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); + this.label9.Size = new System.Drawing.Size(84, 27); this.label9.TabIndex = 100; this.label9.Text = "y(t)-Min:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // bootFeature // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.chart1); this.Controls.Add(this.label1); @@ -143,10 +148,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "bootFeature"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); diff --git a/RbFreqStandMeasure/info/stability.cs b/RbFreqStandMeasure/info/stability.cs index e42c91f..22e26df 100644 --- a/RbFreqStandMeasure/info/stability.cs +++ b/RbFreqStandMeasure/info/stability.cs @@ -12,227 +12,15 @@ private int x = 0; private int y = 0; - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - + public stability() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); + //设置背景颜色为透明 this.BackColor = Color.Transparent; - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } + } + } } diff --git a/RbFreqStandMeasure/info/stability.designer.cs b/RbFreqStandMeasure/info/stability.designer.cs index c8db121..0a6b17e 100644 --- a/RbFreqStandMeasure/info/stability.designer.cs +++ b/RbFreqStandMeasure/info/stability.designer.cs @@ -34,8 +34,6 @@ this.label9 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); // // label_customerName @@ -43,7 +41,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(452, 11); + this.label_customerName.Location = new System.Drawing.Point(197, 126); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -56,7 +54,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(122, 11); + this.label_devModel.Location = new System.Drawing.Point(197, 38); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -68,7 +66,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(365, 11); + this.label2.Location = new System.Drawing.Point(110, 126); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -80,10 +78,10 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(5, 11); + this.label9.Location = new System.Drawing.Point(114, 38); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(117, 27); + this.label9.Size = new System.Drawing.Size(83, 27); this.label9.TabIndex = 79; this.label9.Text = "测量结果:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -93,7 +91,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(282, 11); + this.label1.Location = new System.Drawing.Point(197, 82); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -105,7 +103,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(195, 11); + this.label4.Location = new System.Drawing.Point(110, 82); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -113,21 +111,10 @@ this.label4.Text = "标准偏差:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // dataGridView1 - // - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(16, 51); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(517, 261); - this.dataGridView1.TabIndex = 89; - // // stability // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.dataGridView1); this.Controls.Add(this.label1); this.Controls.Add(this.label4); this.Controls.Add(this.label_customerName); @@ -135,11 +122,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "stability"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } @@ -151,6 +134,5 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.DataGridView dataGridView1; } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/info/ageRate.cs b/RbFreqStandMeasure/info/ageRate.cs index 486f4a6..7529830 100644 --- a/RbFreqStandMeasure/info/ageRate.cs +++ b/RbFreqStandMeasure/info/ageRate.cs @@ -4,235 +4,28 @@ using System.Windows.Forms; using System.Drawing.Drawing2D; using Casic.Birmm.RbFreqStandMeasure.Properties; +using System.Data; +using System.Windows.Forms.DataVisualization.Charting; namespace Casic.Birmm.RbFreqStandMeasure { public partial class ageRate : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - - public ageRate() + + public ageRate(DataTable originData) { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - InitialCanvas(); + chart1.Series["Series1"].XValueMember = "时间"; + chart1.Series["Series1"].YValueMembers = "相对频率偏差"; + + //chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle; //线条上的数据点标志类型 + //chart1.Series["Series1"].MarkerSize = 3; //标志大小 + Series Series1 = new Series(); + chart1.Series.Add(Series1);//加入你的chart1 + chart1.DataSource = originData; + } - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 9c376de..3a62610 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -34,26 +34,31 @@ this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label_customerName = new System.Windows.Forms.Label(); - this.label_devModel = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label_devModel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(13, 81); + this.chart1.Location = new System.Drawing.Point(3, 67); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 238); + this.chart1.Size = new System.Drawing.Size(402, 176); this.chart1.TabIndex = 117; this.chart1.Text = "chart1"; // @@ -62,7 +67,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(380, 10); + this.label1.Location = new System.Drawing.Point(316, 8); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -74,7 +79,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(261, 10); + this.label4.Location = new System.Drawing.Point(197, 8); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(119, 27); @@ -87,32 +92,19 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(146, 42); + this.label_customerName.Location = new System.Drawing.Point(100, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); + this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label_devModel - // - this.label_devModel.BackColor = System.Drawing.Color.Transparent; - this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(146, 10); - this.label_devModel.Margin = new System.Windows.Forms.Padding(0); - this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; - this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(59, 42); + this.label2.Location = new System.Drawing.Point(13, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -120,24 +112,12 @@ this.label2.Text = "测量结果:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label9 - // - this.label9.BackColor = System.Drawing.Color.Transparent; - this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(10, 10); - this.label9.Margin = new System.Windows.Forms.Padding(0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 111; - this.label9.Text = "预热天数:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label3.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label3.Location = new System.Drawing.Point(380, 42); + this.label3.Location = new System.Drawing.Point(316, 35); this.label3.Margin = new System.Windows.Forms.Padding(0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); @@ -149,7 +129,7 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(293, 42); + this.label5.Location = new System.Drawing.Point(229, 35); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(87, 27); @@ -157,10 +137,34 @@ this.label5.Text = "标准偏差:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // label9 + // + this.label9.BackColor = System.Drawing.Color.Transparent; + this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(17, 8); + this.label9.Margin = new System.Windows.Forms.Padding(0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(83, 27); + this.label9.TabIndex = 111; + this.label9.Text = "预热天数:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label_devModel + // + this.label_devModel.BackColor = System.Drawing.Color.Transparent; + this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; + this.label_devModel.Location = new System.Drawing.Point(100, 8); + this.label_devModel.Margin = new System.Windows.Forms.Padding(0); + this.label_devModel.Name = "label_devModel"; + this.label_devModel.Size = new System.Drawing.Size(67, 27); + this.label_devModel.TabIndex = 113; + this.label_devModel.Text = "仪:"; + this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // ageRate // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.label3); this.Controls.Add(this.label5); @@ -172,10 +176,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "ageRate"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); @@ -187,10 +188,10 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label_customerName; - private System.Windows.Forms.Label label_devModel; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label_devModel; } } diff --git a/RbFreqStandMeasure/info/bootFeature.cs b/RbFreqStandMeasure/info/bootFeature.cs index 4063048..2cec888 100644 --- a/RbFreqStandMeasure/info/bootFeature.cs +++ b/RbFreqStandMeasure/info/bootFeature.cs @@ -9,230 +9,15 @@ { public partial class bootFeature : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } public bootFeature() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - + //设置背景颜色为透明 + this.BackColor = Color.Transparent; } + - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index a1fa758..133d6b5 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -42,16 +42,22 @@ // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 50); + this.chart1.Location = new System.Drawing.Point(3, 65); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; + series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.DateTime; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 265); + this.chart1.Size = new System.Drawing.Size(399, 178); this.chart1.TabIndex = 110; this.chart1.Text = "chart1"; // @@ -60,7 +66,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 6); + this.label1.Location = new System.Drawing.Point(294, 6); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -72,7 +78,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 6); + this.label4.Location = new System.Drawing.Point(207, 6); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -85,7 +91,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(455, 6); + this.label_customerName.Location = new System.Drawing.Point(106, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -98,7 +104,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 6); + this.label_devModel.Location = new System.Drawing.Point(106, 6); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -110,7 +116,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(368, 6); + this.label2.Location = new System.Drawing.Point(19, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -122,18 +128,17 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 6); + this.label9.Location = new System.Drawing.Point(22, 6); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); + this.label9.Size = new System.Drawing.Size(84, 27); this.label9.TabIndex = 100; this.label9.Text = "y(t)-Min:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // bootFeature // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.chart1); this.Controls.Add(this.label1); @@ -143,10 +148,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "bootFeature"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); diff --git a/RbFreqStandMeasure/info/stability.cs b/RbFreqStandMeasure/info/stability.cs index e42c91f..22e26df 100644 --- a/RbFreqStandMeasure/info/stability.cs +++ b/RbFreqStandMeasure/info/stability.cs @@ -12,227 +12,15 @@ private int x = 0; private int y = 0; - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - + public stability() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); + //设置背景颜色为透明 this.BackColor = Color.Transparent; - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } + } + } } diff --git a/RbFreqStandMeasure/info/stability.designer.cs b/RbFreqStandMeasure/info/stability.designer.cs index c8db121..0a6b17e 100644 --- a/RbFreqStandMeasure/info/stability.designer.cs +++ b/RbFreqStandMeasure/info/stability.designer.cs @@ -34,8 +34,6 @@ this.label9 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); // // label_customerName @@ -43,7 +41,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(452, 11); + this.label_customerName.Location = new System.Drawing.Point(197, 126); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -56,7 +54,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(122, 11); + this.label_devModel.Location = new System.Drawing.Point(197, 38); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -68,7 +66,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(365, 11); + this.label2.Location = new System.Drawing.Point(110, 126); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -80,10 +78,10 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(5, 11); + this.label9.Location = new System.Drawing.Point(114, 38); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(117, 27); + this.label9.Size = new System.Drawing.Size(83, 27); this.label9.TabIndex = 79; this.label9.Text = "测量结果:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -93,7 +91,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(282, 11); + this.label1.Location = new System.Drawing.Point(197, 82); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -105,7 +103,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(195, 11); + this.label4.Location = new System.Drawing.Point(110, 82); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -113,21 +111,10 @@ this.label4.Text = "标准偏差:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // dataGridView1 - // - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(16, 51); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(517, 261); - this.dataGridView1.TabIndex = 89; - // // stability // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.dataGridView1); this.Controls.Add(this.label1); this.Controls.Add(this.label4); this.Controls.Add(this.label_customerName); @@ -135,11 +122,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "stability"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } @@ -151,6 +134,5 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.DataGridView dataGridView1; } } diff --git a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs index cb453d7..d67b5a2 100644 --- a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs @@ -30,50 +30,50 @@ private void InitializeComponent() { this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.textBoxX3 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_generatorIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label4 = new System.Windows.Forms.Label(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_exportPath = new DevComponents.DotNetBar.Controls.TextBoxX(); this.button1 = new System.Windows.Forms.Button(); - this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.label12 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); - this.textBoxX8 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label20 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); - this.textBoxX12 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label22 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); - this.textBoxX13 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label13 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); - this.textBoxX9 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label16 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); - this.textBoxX10 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label18 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); - this.textBoxX11 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label11 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.textBoxX7 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleAlarm = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label8 = new System.Windows.Forms.Label(); - this.textBoxX6 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleFrequency = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label5 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soOutDelay = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -86,79 +86,53 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(247, 177); + this.label2.Location = new System.Drawing.Point(244, 243); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(150, 30); this.label2.TabIndex = 4; - this.label2.Text = "频率发生器IP:"; + this.label2.Text = "计数器IP:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(247, 237); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(150, 30); - this.label3.TabIndex = 4; - this.label3.Text = "频率信号源IP:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // textBoxX2 + // text_generatorIp // // // // - this.textBoxX2.Border.Class = "TextBoxBorder"; - this.textBoxX2.Border.CornerDiameter = 5; - this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX2.Location = new System.Drawing.Point(437, 177); - this.textBoxX2.Name = "textBoxX2"; - this.textBoxX2.PreventEnterBeep = true; - this.textBoxX2.Size = new System.Drawing.Size(250, 29); - this.textBoxX2.TabIndex = 5; - // - // textBoxX3 - // - // - // - // - this.textBoxX3.Border.Class = "TextBoxBorder"; - this.textBoxX3.Border.CornerDiameter = 5; - this.textBoxX3.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX3.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX3.Location = new System.Drawing.Point(437, 237); - this.textBoxX3.Name = "textBoxX3"; - this.textBoxX3.PreventEnterBeep = true; - this.textBoxX3.Size = new System.Drawing.Size(250, 29); - this.textBoxX3.TabIndex = 6; + this.text_generatorIp.Border.Class = "TextBoxBorder"; + this.text_generatorIp.Border.CornerDiameter = 5; + this.text_generatorIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_generatorIp.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_generatorIp.Location = new System.Drawing.Point(400, 243); + this.text_generatorIp.Name = "text_generatorIp"; + this.text_generatorIp.PreventEnterBeep = true; + this.text_generatorIp.Size = new System.Drawing.Size(326, 29); + this.text_generatorIp.TabIndex = 5; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(221, 121); + this.label4.Location = new System.Drawing.Point(218, 153); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(176, 30); this.label4.TabIndex = 4; - this.label4.Text = "数据默认存放路径:"; + this.label4.Text = "数据默认导出路径:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX4 + // text_exportPath // // // // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(437, 121); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(250, 29); - this.textBoxX4.TabIndex = 2; + this.text_exportPath.Border.Class = "TextBoxBorder"; + this.text_exportPath.Border.CornerDiameter = 5; + this.text_exportPath.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_exportPath.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_exportPath.Location = new System.Drawing.Point(400, 153); + this.text_exportPath.Name = "text_exportPath"; + this.text_exportPath.PreventEnterBeep = true; + this.text_exportPath.Size = new System.Drawing.Size(326, 29); + this.text_exportPath.TabIndex = 2; // // button1 // @@ -166,56 +140,12 @@ this.button1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.path; this.button1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Location = new System.Drawing.Point(691, 121); + this.button1.Location = new System.Drawing.Point(739, 153); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(35, 28); this.button1.TabIndex = 7; this.button1.UseVisualStyleBackColor = false; // - // btnSave - // - this.btnSave.EnterBackColor = System.Drawing.Color.Blue; - this.btnSave.EnterForeColor = System.Drawing.Color.White; - this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnSave.FlatAppearance.BorderSize = 0; - this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); - this.btnSave.HoverForeColor = System.Drawing.Color.White; - this.btnSave.Location = new System.Drawing.Point(504, 377); - this.btnSave.Name = "btnSave"; - this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnSave.PressForeColor = System.Drawing.Color.White; - this.btnSave.Radius = 5; - this.btnSave.Size = new System.Drawing.Size(150, 30); - this.btnSave.TabIndex = 0; - this.btnSave.Text = "保存设置"; - this.btnSave.UseVisualStyleBackColor = true; - // - // btnCancel - // - this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; - this.btnCancel.EnterForeColor = System.Drawing.Color.White; - this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnCancel.FlatAppearance.BorderSize = 0; - this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.btnCancel.HoverForeColor = System.Drawing.Color.White; - this.btnCancel.Location = new System.Drawing.Point(314, 377); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnCancel.PressForeColor = System.Drawing.Color.White; - this.btnCancel.Radius = 5; - this.btnCancel.Size = new System.Drawing.Size(150, 30); - this.btnCancel.TabIndex = 0; - this.btnCancel.Text = "放弃修改"; - this.btnCancel.UseVisualStyleBackColor = true; - // // tabControl1 // this.tabControl1.Controls.Add(this.tabPage1); @@ -232,11 +162,9 @@ this.tabPage1.Controls.Add(this.label4); this.tabPage1.Controls.Add(this.button1); this.tabPage1.Controls.Add(this.btnCancel); - this.tabPage1.Controls.Add(this.textBoxX3); this.tabPage1.Controls.Add(this.btnSave); - this.tabPage1.Controls.Add(this.textBoxX2); - this.tabPage1.Controls.Add(this.textBoxX4); - this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.text_generatorIp); + this.tabPage1.Controls.Add(this.text_exportPath); this.tabPage1.Controls.Add(this.label2); this.tabPage1.Location = new System.Drawing.Point(4, 29); this.tabPage1.Name = "tabPage1"; @@ -248,6 +176,8 @@ // // tabPage2 // + this.tabPage2.Controls.Add(this.roundButton1); + this.tabPage2.Controls.Add(this.roundButton2); this.tabPage2.Controls.Add(this.groupBox3); this.tabPage2.Controls.Add(this.groupBox2); this.tabPage2.Controls.Add(this.groupBox1); @@ -263,16 +193,16 @@ // this.groupBox3.Controls.Add(this.label12); this.groupBox3.Controls.Add(this.label14); - this.groupBox3.Controls.Add(this.textBoxX8); + this.groupBox3.Controls.Add(this.text_cycEleAddValue); this.groupBox3.Controls.Add(this.label20); this.groupBox3.Controls.Add(this.label21); - this.groupBox3.Controls.Add(this.textBoxX12); + this.groupBox3.Controls.Add(this.text_cycThreshold2); this.groupBox3.Controls.Add(this.label22); this.groupBox3.Controls.Add(this.label23); - this.groupBox3.Controls.Add(this.textBoxX13); - this.groupBox3.Location = new System.Drawing.Point(31, 373); + this.groupBox3.Controls.Add(this.text_cycThreshold1); + this.groupBox3.Location = new System.Drawing.Point(31, 336); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(904, 162); + this.groupBox3.Size = new System.Drawing.Size(904, 140); this.groupBox3.TabIndex = 18; this.groupBox3.TabStop = false; this.groupBox3.Text = "周期灵敏度"; @@ -281,7 +211,7 @@ // this.label12.BackColor = System.Drawing.Color.Transparent; this.label12.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(372, 97); + this.label12.Location = new System.Drawing.Point(372, 91); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(45, 30); this.label12.TabIndex = 15; @@ -292,33 +222,33 @@ // this.label14.BackColor = System.Drawing.Color.Transparent; this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label14.Location = new System.Drawing.Point(30, 97); + this.label14.Location = new System.Drawing.Point(30, 91); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(159, 30); this.label14.TabIndex = 12; this.label14.Text = "测量误差电平增加值:"; this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX8 + // text_cycEleAddValue // // // // - this.textBoxX8.Border.Class = "TextBoxBorder"; - this.textBoxX8.Border.CornerDiameter = 5; - this.textBoxX8.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX8.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX8.Location = new System.Drawing.Point(195, 97); - this.textBoxX8.Name = "textBoxX8"; - this.textBoxX8.PreventEnterBeep = true; - this.textBoxX8.Size = new System.Drawing.Size(168, 29); - this.textBoxX8.TabIndex = 11; + this.text_cycEleAddValue.Border.Class = "TextBoxBorder"; + this.text_cycEleAddValue.Border.CornerDiameter = 5; + this.text_cycEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycEleAddValue.Location = new System.Drawing.Point(195, 91); + this.text_cycEleAddValue.Name = "text_cycEleAddValue"; + this.text_cycEleAddValue.PreventEnterBeep = true; + this.text_cycEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_cycEleAddValue.TabIndex = 11; // // label20 // this.label20.BackColor = System.Drawing.Color.Transparent; this.label20.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label20.Location = new System.Drawing.Point(786, 39); + this.label20.Location = new System.Drawing.Point(803, 39); this.label20.Name = "label20"; this.label20.Size = new System.Drawing.Size(45, 30); this.label20.TabIndex = 10; @@ -329,27 +259,27 @@ // this.label21.BackColor = System.Drawing.Color.Transparent; this.label21.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label21.Location = new System.Drawing.Point(444, 41); + this.label21.Location = new System.Drawing.Point(461, 41); this.label21.Name = "label21"; this.label21.Size = new System.Drawing.Size(159, 30); this.label21.TabIndex = 9; this.label21.Text = "周期差值>80MHz:"; this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX12 + // text_cycThreshold2 // // // // - this.textBoxX12.Border.Class = "TextBoxBorder"; - this.textBoxX12.Border.CornerDiameter = 5; - this.textBoxX12.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX12.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX12.Location = new System.Drawing.Point(609, 41); - this.textBoxX12.Name = "textBoxX12"; - this.textBoxX12.PreventEnterBeep = true; - this.textBoxX12.Size = new System.Drawing.Size(168, 29); - this.textBoxX12.TabIndex = 8; + this.text_cycThreshold2.Border.Class = "TextBoxBorder"; + this.text_cycThreshold2.Border.CornerDiameter = 5; + this.text_cycThreshold2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycThreshold2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycThreshold2.Location = new System.Drawing.Point(626, 41); + this.text_cycThreshold2.Name = "text_cycThreshold2"; + this.text_cycThreshold2.PreventEnterBeep = true; + this.text_cycThreshold2.Size = new System.Drawing.Size(168, 29); + this.text_cycThreshold2.TabIndex = 8; // // label22 // @@ -373,35 +303,35 @@ this.label23.Text = "周期差值<=80MHz:"; this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX13 + // text_cycThreshold1 // // // // - this.textBoxX13.Border.Class = "TextBoxBorder"; - this.textBoxX13.Border.CornerDiameter = 5; - this.textBoxX13.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX13.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX13.Location = new System.Drawing.Point(195, 45); - this.textBoxX13.Name = "textBoxX13"; - this.textBoxX13.PreventEnterBeep = true; - this.textBoxX13.Size = new System.Drawing.Size(168, 29); - this.textBoxX13.TabIndex = 5; + this.text_cycThreshold1.Border.Class = "TextBoxBorder"; + this.text_cycThreshold1.Border.CornerDiameter = 5; + this.text_cycThreshold1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycThreshold1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycThreshold1.Location = new System.Drawing.Point(195, 45); + this.text_cycThreshold1.Name = "text_cycThreshold1"; + this.text_cycThreshold1.PreventEnterBeep = true; + this.text_cycThreshold1.Size = new System.Drawing.Size(168, 29); + this.text_cycThreshold1.TabIndex = 5; // // groupBox2 // this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); - this.groupBox2.Controls.Add(this.textBoxX9); + this.groupBox2.Controls.Add(this.text_freEleAddValue); this.groupBox2.Controls.Add(this.label16); this.groupBox2.Controls.Add(this.label17); - this.groupBox2.Controls.Add(this.textBoxX10); + this.groupBox2.Controls.Add(this.text_freThreshold2); this.groupBox2.Controls.Add(this.label18); this.groupBox2.Controls.Add(this.label19); - this.groupBox2.Controls.Add(this.textBoxX11); - this.groupBox2.Location = new System.Drawing.Point(31, 194); + this.groupBox2.Controls.Add(this.text_freThreshold1); + this.groupBox2.Location = new System.Drawing.Point(31, 177); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(904, 162); + this.groupBox2.Size = new System.Drawing.Size(904, 147); this.groupBox2.TabIndex = 17; this.groupBox2.TabStop = false; this.groupBox2.Text = "频率灵敏度"; @@ -410,7 +340,7 @@ // this.label13.BackColor = System.Drawing.Color.Transparent; this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label13.Location = new System.Drawing.Point(372, 97); + this.label13.Location = new System.Drawing.Point(372, 91); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(45, 30); this.label13.TabIndex = 15; @@ -421,33 +351,33 @@ // this.label15.BackColor = System.Drawing.Color.Transparent; this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label15.Location = new System.Drawing.Point(30, 97); + this.label15.Location = new System.Drawing.Point(30, 91); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(159, 30); this.label15.TabIndex = 12; this.label15.Text = "测量误差电平增加值:"; this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX9 + // text_freEleAddValue // // // // - this.textBoxX9.Border.Class = "TextBoxBorder"; - this.textBoxX9.Border.CornerDiameter = 5; - this.textBoxX9.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX9.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX9.Location = new System.Drawing.Point(195, 97); - this.textBoxX9.Name = "textBoxX9"; - this.textBoxX9.PreventEnterBeep = true; - this.textBoxX9.Size = new System.Drawing.Size(168, 29); - this.textBoxX9.TabIndex = 11; + this.text_freEleAddValue.Border.Class = "TextBoxBorder"; + this.text_freEleAddValue.Border.CornerDiameter = 5; + this.text_freEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freEleAddValue.Location = new System.Drawing.Point(195, 91); + this.text_freEleAddValue.Name = "text_freEleAddValue"; + this.text_freEleAddValue.PreventEnterBeep = true; + this.text_freEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_freEleAddValue.TabIndex = 11; // // label16 // this.label16.BackColor = System.Drawing.Color.Transparent; this.label16.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label16.Location = new System.Drawing.Point(786, 39); + this.label16.Location = new System.Drawing.Point(801, 39); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(45, 30); this.label16.TabIndex = 10; @@ -458,27 +388,27 @@ // this.label17.BackColor = System.Drawing.Color.Transparent; this.label17.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label17.Location = new System.Drawing.Point(444, 41); + this.label17.Location = new System.Drawing.Point(459, 41); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(159, 30); this.label17.TabIndex = 9; this.label17.Text = "频率差值>80MHz:"; this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX10 + // text_freThreshold2 // // // // - this.textBoxX10.Border.Class = "TextBoxBorder"; - this.textBoxX10.Border.CornerDiameter = 5; - this.textBoxX10.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX10.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX10.Location = new System.Drawing.Point(609, 41); - this.textBoxX10.Name = "textBoxX10"; - this.textBoxX10.PreventEnterBeep = true; - this.textBoxX10.Size = new System.Drawing.Size(168, 29); - this.textBoxX10.TabIndex = 8; + this.text_freThreshold2.Border.Class = "TextBoxBorder"; + this.text_freThreshold2.Border.CornerDiameter = 5; + this.text_freThreshold2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freThreshold2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freThreshold2.Location = new System.Drawing.Point(624, 41); + this.text_freThreshold2.Name = "text_freThreshold2"; + this.text_freThreshold2.PreventEnterBeep = true; + this.text_freThreshold2.Size = new System.Drawing.Size(168, 29); + this.text_freThreshold2.TabIndex = 8; // // label18 // @@ -502,38 +432,38 @@ this.label19.Text = "频率差值<=80MHz:"; this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX11 + // text_freThreshold1 // // // // - this.textBoxX11.Border.Class = "TextBoxBorder"; - this.textBoxX11.Border.CornerDiameter = 5; - this.textBoxX11.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX11.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX11.Location = new System.Drawing.Point(195, 45); - this.textBoxX11.Name = "textBoxX11"; - this.textBoxX11.PreventEnterBeep = true; - this.textBoxX11.Size = new System.Drawing.Size(168, 29); - this.textBoxX11.TabIndex = 5; + this.text_freThreshold1.Border.Class = "TextBoxBorder"; + this.text_freThreshold1.Border.CornerDiameter = 5; + this.text_freThreshold1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freThreshold1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freThreshold1.Location = new System.Drawing.Point(195, 45); + this.text_freThreshold1.Name = "text_freThreshold1"; + this.text_freThreshold1.PreventEnterBeep = true; + this.text_freThreshold1.Size = new System.Drawing.Size(168, 29); + this.text_freThreshold1.TabIndex = 5; // // groupBox1 // this.groupBox1.Controls.Add(this.label11); this.groupBox1.Controls.Add(this.label10); this.groupBox1.Controls.Add(this.label9); - this.groupBox1.Controls.Add(this.textBoxX7); + this.groupBox1.Controls.Add(this.text_soEleAlarm); this.groupBox1.Controls.Add(this.label8); - this.groupBox1.Controls.Add(this.textBoxX6); + this.groupBox1.Controls.Add(this.text_soEleAddValue); this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label7); - this.groupBox1.Controls.Add(this.textBoxX5); + this.groupBox1.Controls.Add(this.text_soEleFrequency); this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Controls.Add(this.textBoxX1); + this.groupBox1.Controls.Add(this.text_soOutDelay); this.groupBox1.Location = new System.Drawing.Point(31, 18); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(904, 162); + this.groupBox1.Size = new System.Drawing.Size(904, 145); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "电平参数"; @@ -542,7 +472,7 @@ // this.label11.BackColor = System.Drawing.Color.Transparent; this.label11.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label11.Location = new System.Drawing.Point(786, 97); + this.label11.Location = new System.Drawing.Point(801, 89); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(45, 30); this.label11.TabIndex = 16; @@ -553,7 +483,7 @@ // this.label10.BackColor = System.Drawing.Color.Transparent; this.label10.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label10.Location = new System.Drawing.Point(372, 97); + this.label10.Location = new System.Drawing.Point(372, 89); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(45, 30); this.label10.TabIndex = 15; @@ -564,59 +494,59 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(444, 97); + this.label9.Location = new System.Drawing.Point(459, 89); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(159, 30); this.label9.TabIndex = 14; this.label9.Text = "输出电平警告值:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX7 + // text_soEleAlarm // // // // - this.textBoxX7.Border.Class = "TextBoxBorder"; - this.textBoxX7.Border.CornerDiameter = 5; - this.textBoxX7.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX7.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX7.Location = new System.Drawing.Point(609, 97); - this.textBoxX7.Name = "textBoxX7"; - this.textBoxX7.PreventEnterBeep = true; - this.textBoxX7.Size = new System.Drawing.Size(168, 29); - this.textBoxX7.TabIndex = 13; + this.text_soEleAlarm.Border.Class = "TextBoxBorder"; + this.text_soEleAlarm.Border.CornerDiameter = 5; + this.text_soEleAlarm.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleAlarm.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleAlarm.Location = new System.Drawing.Point(624, 89); + this.text_soEleAlarm.Name = "text_soEleAlarm"; + this.text_soEleAlarm.PreventEnterBeep = true; + this.text_soEleAlarm.Size = new System.Drawing.Size(168, 29); + this.text_soEleAlarm.TabIndex = 13; // // label8 // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(30, 97); + this.label8.Location = new System.Drawing.Point(30, 89); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(159, 30); this.label8.TabIndex = 12; this.label8.Text = "信号源电平增加值:"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX6 + // text_soEleAddValue // // // // - this.textBoxX6.Border.Class = "TextBoxBorder"; - this.textBoxX6.Border.CornerDiameter = 5; - this.textBoxX6.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX6.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX6.Location = new System.Drawing.Point(195, 97); - this.textBoxX6.Name = "textBoxX6"; - this.textBoxX6.PreventEnterBeep = true; - this.textBoxX6.Size = new System.Drawing.Size(168, 29); - this.textBoxX6.TabIndex = 11; + this.text_soEleAddValue.Border.Class = "TextBoxBorder"; + this.text_soEleAddValue.Border.CornerDiameter = 5; + this.text_soEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleAddValue.Location = new System.Drawing.Point(195, 89); + this.text_soEleAddValue.Name = "text_soEleAddValue"; + this.text_soEleAddValue.PreventEnterBeep = true; + this.text_soEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_soEleAddValue.TabIndex = 11; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(786, 39); + this.label6.Location = new System.Drawing.Point(801, 39); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(45, 30); this.label6.TabIndex = 10; @@ -627,27 +557,27 @@ // this.label7.BackColor = System.Drawing.Color.Transparent; this.label7.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(444, 41); + this.label7.Location = new System.Drawing.Point(459, 41); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(159, 30); this.label7.TabIndex = 9; this.label7.Text = "信号源初始电平:"; this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX5 + // text_soEleFrequency // // // // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(609, 41); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(168, 29); - this.textBoxX5.TabIndex = 8; + this.text_soEleFrequency.Border.Class = "TextBoxBorder"; + this.text_soEleFrequency.Border.CornerDiameter = 5; + this.text_soEleFrequency.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleFrequency.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleFrequency.Location = new System.Drawing.Point(624, 41); + this.text_soEleFrequency.Name = "text_soEleFrequency"; + this.text_soEleFrequency.PreventEnterBeep = true; + this.text_soEleFrequency.Size = new System.Drawing.Size(168, 29); + this.text_soEleFrequency.TabIndex = 8; // // label5 // @@ -671,20 +601,112 @@ this.label1.Text = "信号源输出延时:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX1 + // text_soOutDelay // // // // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX1.Location = new System.Drawing.Point(195, 45); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(168, 29); - this.textBoxX1.TabIndex = 5; + this.text_soOutDelay.Border.Class = "TextBoxBorder"; + this.text_soOutDelay.Border.CornerDiameter = 5; + this.text_soOutDelay.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soOutDelay.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soOutDelay.Location = new System.Drawing.Point(195, 45); + this.text_soOutDelay.Name = "text_soOutDelay"; + this.text_soOutDelay.PreventEnterBeep = true; + this.text_soOutDelay.Size = new System.Drawing.Size(168, 29); + this.text_soOutDelay.TabIndex = 5; + // + // btnCancel + // + this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancel.EnterForeColor = System.Drawing.Color.White; + this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancel.FlatAppearance.BorderSize = 0; + this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancel.HoverForeColor = System.Drawing.Color.White; + this.btnCancel.Location = new System.Drawing.Point(314, 396); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancel.PressForeColor = System.Drawing.Color.White; + this.btnCancel.Radius = 5; + this.btnCancel.Size = new System.Drawing.Size(150, 30); + this.btnCancel.TabIndex = 0; + this.btnCancel.Text = "放弃修改"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(504, 396); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(150, 30); + this.btnSave.TabIndex = 0; + this.btnSave.Text = "保存设置"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // roundButton1 + // + this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton1.EnterForeColor = System.Drawing.Color.White; + this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton1.FlatAppearance.BorderSize = 0; + this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.roundButton1.HoverForeColor = System.Drawing.Color.White; + this.roundButton1.Location = new System.Drawing.Point(337, 510); + this.roundButton1.Name = "roundButton1"; + this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton1.PressForeColor = System.Drawing.Color.White; + this.roundButton1.Radius = 5; + this.roundButton1.Size = new System.Drawing.Size(150, 30); + this.roundButton1.TabIndex = 19; + this.roundButton1.Text = "放弃修改"; + this.roundButton1.UseVisualStyleBackColor = true; + this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click); + // + // roundButton2 + // + this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton2.EnterForeColor = System.Drawing.Color.White; + this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton2.FlatAppearance.BorderSize = 0; + this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.roundButton2.HoverForeColor = System.Drawing.Color.White; + this.roundButton2.Location = new System.Drawing.Point(527, 510); + this.roundButton2.Name = "roundButton2"; + this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton2.PressForeColor = System.Drawing.Color.White; + this.roundButton2.Radius = 5; + this.roundButton2.Size = new System.Drawing.Size(150, 30); + this.roundButton2.TabIndex = 20; + this.roundButton2.Text = "保存设置"; + this.roundButton2.UseVisualStyleBackColor = true; + this.roundButton2.Click += new System.EventHandler(this.roundButton2_Click); // // SettingCtrlForm // @@ -713,11 +735,9 @@ private RoundButton btnCancel; private RoundButton btnSave; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX3; + private DevComponents.DotNetBar.Controls.TextBoxX text_generatorIp; private System.Windows.Forms.Label label4; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private DevComponents.DotNetBar.Controls.TextBoxX text_exportPath; private System.Windows.Forms.Button button1; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; @@ -725,35 +745,37 @@ private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label14; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX8; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycEleAddValue; private System.Windows.Forms.Label label20; private System.Windows.Forms.Label label21; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX12; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold2; private System.Windows.Forms.Label label22; private System.Windows.Forms.Label label23; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX13; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold1; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label15; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX9; + private DevComponents.DotNetBar.Controls.TextBoxX text_freEleAddValue; private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label17; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX10; + private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold2; private System.Windows.Forms.Label label18; private System.Windows.Forms.Label label19; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX11; + private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold1; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label9; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX7; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleAlarm; private System.Windows.Forms.Label label8; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX6; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleAddValue; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label7; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleFrequency; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label1; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; + private DevComponents.DotNetBar.Controls.TextBoxX text_soOutDelay; + private RoundButton roundButton1; + private RoundButton roundButton2; } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/info/ageRate.cs b/RbFreqStandMeasure/info/ageRate.cs index 486f4a6..7529830 100644 --- a/RbFreqStandMeasure/info/ageRate.cs +++ b/RbFreqStandMeasure/info/ageRate.cs @@ -4,235 +4,28 @@ using System.Windows.Forms; using System.Drawing.Drawing2D; using Casic.Birmm.RbFreqStandMeasure.Properties; +using System.Data; +using System.Windows.Forms.DataVisualization.Charting; namespace Casic.Birmm.RbFreqStandMeasure { public partial class ageRate : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - - public ageRate() + + public ageRate(DataTable originData) { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - InitialCanvas(); + chart1.Series["Series1"].XValueMember = "时间"; + chart1.Series["Series1"].YValueMembers = "相对频率偏差"; + + //chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle; //线条上的数据点标志类型 + //chart1.Series["Series1"].MarkerSize = 3; //标志大小 + Series Series1 = new Series(); + chart1.Series.Add(Series1);//加入你的chart1 + chart1.DataSource = originData; + } - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 9c376de..3a62610 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -34,26 +34,31 @@ this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label_customerName = new System.Windows.Forms.Label(); - this.label_devModel = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label_devModel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(13, 81); + this.chart1.Location = new System.Drawing.Point(3, 67); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 238); + this.chart1.Size = new System.Drawing.Size(402, 176); this.chart1.TabIndex = 117; this.chart1.Text = "chart1"; // @@ -62,7 +67,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(380, 10); + this.label1.Location = new System.Drawing.Point(316, 8); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -74,7 +79,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(261, 10); + this.label4.Location = new System.Drawing.Point(197, 8); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(119, 27); @@ -87,32 +92,19 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(146, 42); + this.label_customerName.Location = new System.Drawing.Point(100, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); + this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label_devModel - // - this.label_devModel.BackColor = System.Drawing.Color.Transparent; - this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(146, 10); - this.label_devModel.Margin = new System.Windows.Forms.Padding(0); - this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; - this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(59, 42); + this.label2.Location = new System.Drawing.Point(13, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -120,24 +112,12 @@ this.label2.Text = "测量结果:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label9 - // - this.label9.BackColor = System.Drawing.Color.Transparent; - this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(10, 10); - this.label9.Margin = new System.Windows.Forms.Padding(0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 111; - this.label9.Text = "预热天数:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label3.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label3.Location = new System.Drawing.Point(380, 42); + this.label3.Location = new System.Drawing.Point(316, 35); this.label3.Margin = new System.Windows.Forms.Padding(0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); @@ -149,7 +129,7 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(293, 42); + this.label5.Location = new System.Drawing.Point(229, 35); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(87, 27); @@ -157,10 +137,34 @@ this.label5.Text = "标准偏差:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // label9 + // + this.label9.BackColor = System.Drawing.Color.Transparent; + this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(17, 8); + this.label9.Margin = new System.Windows.Forms.Padding(0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(83, 27); + this.label9.TabIndex = 111; + this.label9.Text = "预热天数:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label_devModel + // + this.label_devModel.BackColor = System.Drawing.Color.Transparent; + this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; + this.label_devModel.Location = new System.Drawing.Point(100, 8); + this.label_devModel.Margin = new System.Windows.Forms.Padding(0); + this.label_devModel.Name = "label_devModel"; + this.label_devModel.Size = new System.Drawing.Size(67, 27); + this.label_devModel.TabIndex = 113; + this.label_devModel.Text = "仪:"; + this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // ageRate // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.label3); this.Controls.Add(this.label5); @@ -172,10 +176,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "ageRate"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); @@ -187,10 +188,10 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label_customerName; - private System.Windows.Forms.Label label_devModel; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label_devModel; } } diff --git a/RbFreqStandMeasure/info/bootFeature.cs b/RbFreqStandMeasure/info/bootFeature.cs index 4063048..2cec888 100644 --- a/RbFreqStandMeasure/info/bootFeature.cs +++ b/RbFreqStandMeasure/info/bootFeature.cs @@ -9,230 +9,15 @@ { public partial class bootFeature : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } public bootFeature() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - + //设置背景颜色为透明 + this.BackColor = Color.Transparent; } + - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index a1fa758..133d6b5 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -42,16 +42,22 @@ // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 50); + this.chart1.Location = new System.Drawing.Point(3, 65); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; + series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.DateTime; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 265); + this.chart1.Size = new System.Drawing.Size(399, 178); this.chart1.TabIndex = 110; this.chart1.Text = "chart1"; // @@ -60,7 +66,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 6); + this.label1.Location = new System.Drawing.Point(294, 6); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -72,7 +78,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 6); + this.label4.Location = new System.Drawing.Point(207, 6); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -85,7 +91,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(455, 6); + this.label_customerName.Location = new System.Drawing.Point(106, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -98,7 +104,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 6); + this.label_devModel.Location = new System.Drawing.Point(106, 6); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -110,7 +116,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(368, 6); + this.label2.Location = new System.Drawing.Point(19, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -122,18 +128,17 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 6); + this.label9.Location = new System.Drawing.Point(22, 6); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); + this.label9.Size = new System.Drawing.Size(84, 27); this.label9.TabIndex = 100; this.label9.Text = "y(t)-Min:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // bootFeature // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.chart1); this.Controls.Add(this.label1); @@ -143,10 +148,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "bootFeature"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); diff --git a/RbFreqStandMeasure/info/stability.cs b/RbFreqStandMeasure/info/stability.cs index e42c91f..22e26df 100644 --- a/RbFreqStandMeasure/info/stability.cs +++ b/RbFreqStandMeasure/info/stability.cs @@ -12,227 +12,15 @@ private int x = 0; private int y = 0; - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - + public stability() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); + //设置背景颜色为透明 this.BackColor = Color.Transparent; - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } + } + } } diff --git a/RbFreqStandMeasure/info/stability.designer.cs b/RbFreqStandMeasure/info/stability.designer.cs index c8db121..0a6b17e 100644 --- a/RbFreqStandMeasure/info/stability.designer.cs +++ b/RbFreqStandMeasure/info/stability.designer.cs @@ -34,8 +34,6 @@ this.label9 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); // // label_customerName @@ -43,7 +41,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(452, 11); + this.label_customerName.Location = new System.Drawing.Point(197, 126); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -56,7 +54,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(122, 11); + this.label_devModel.Location = new System.Drawing.Point(197, 38); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -68,7 +66,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(365, 11); + this.label2.Location = new System.Drawing.Point(110, 126); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -80,10 +78,10 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(5, 11); + this.label9.Location = new System.Drawing.Point(114, 38); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(117, 27); + this.label9.Size = new System.Drawing.Size(83, 27); this.label9.TabIndex = 79; this.label9.Text = "测量结果:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -93,7 +91,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(282, 11); + this.label1.Location = new System.Drawing.Point(197, 82); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -105,7 +103,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(195, 11); + this.label4.Location = new System.Drawing.Point(110, 82); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -113,21 +111,10 @@ this.label4.Text = "标准偏差:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // dataGridView1 - // - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(16, 51); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(517, 261); - this.dataGridView1.TabIndex = 89; - // // stability // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.dataGridView1); this.Controls.Add(this.label1); this.Controls.Add(this.label4); this.Controls.Add(this.label_customerName); @@ -135,11 +122,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "stability"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } @@ -151,6 +134,5 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.DataGridView dataGridView1; } } diff --git a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs index cb453d7..d67b5a2 100644 --- a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs @@ -30,50 +30,50 @@ private void InitializeComponent() { this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.textBoxX3 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_generatorIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label4 = new System.Windows.Forms.Label(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_exportPath = new DevComponents.DotNetBar.Controls.TextBoxX(); this.button1 = new System.Windows.Forms.Button(); - this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.label12 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); - this.textBoxX8 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label20 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); - this.textBoxX12 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label22 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); - this.textBoxX13 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label13 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); - this.textBoxX9 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label16 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); - this.textBoxX10 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label18 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); - this.textBoxX11 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label11 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.textBoxX7 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleAlarm = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label8 = new System.Windows.Forms.Label(); - this.textBoxX6 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleFrequency = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label5 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soOutDelay = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -86,79 +86,53 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(247, 177); + this.label2.Location = new System.Drawing.Point(244, 243); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(150, 30); this.label2.TabIndex = 4; - this.label2.Text = "频率发生器IP:"; + this.label2.Text = "计数器IP:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(247, 237); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(150, 30); - this.label3.TabIndex = 4; - this.label3.Text = "频率信号源IP:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // textBoxX2 + // text_generatorIp // // // // - this.textBoxX2.Border.Class = "TextBoxBorder"; - this.textBoxX2.Border.CornerDiameter = 5; - this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX2.Location = new System.Drawing.Point(437, 177); - this.textBoxX2.Name = "textBoxX2"; - this.textBoxX2.PreventEnterBeep = true; - this.textBoxX2.Size = new System.Drawing.Size(250, 29); - this.textBoxX2.TabIndex = 5; - // - // textBoxX3 - // - // - // - // - this.textBoxX3.Border.Class = "TextBoxBorder"; - this.textBoxX3.Border.CornerDiameter = 5; - this.textBoxX3.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX3.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX3.Location = new System.Drawing.Point(437, 237); - this.textBoxX3.Name = "textBoxX3"; - this.textBoxX3.PreventEnterBeep = true; - this.textBoxX3.Size = new System.Drawing.Size(250, 29); - this.textBoxX3.TabIndex = 6; + this.text_generatorIp.Border.Class = "TextBoxBorder"; + this.text_generatorIp.Border.CornerDiameter = 5; + this.text_generatorIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_generatorIp.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_generatorIp.Location = new System.Drawing.Point(400, 243); + this.text_generatorIp.Name = "text_generatorIp"; + this.text_generatorIp.PreventEnterBeep = true; + this.text_generatorIp.Size = new System.Drawing.Size(326, 29); + this.text_generatorIp.TabIndex = 5; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(221, 121); + this.label4.Location = new System.Drawing.Point(218, 153); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(176, 30); this.label4.TabIndex = 4; - this.label4.Text = "数据默认存放路径:"; + this.label4.Text = "数据默认导出路径:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX4 + // text_exportPath // // // // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(437, 121); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(250, 29); - this.textBoxX4.TabIndex = 2; + this.text_exportPath.Border.Class = "TextBoxBorder"; + this.text_exportPath.Border.CornerDiameter = 5; + this.text_exportPath.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_exportPath.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_exportPath.Location = new System.Drawing.Point(400, 153); + this.text_exportPath.Name = "text_exportPath"; + this.text_exportPath.PreventEnterBeep = true; + this.text_exportPath.Size = new System.Drawing.Size(326, 29); + this.text_exportPath.TabIndex = 2; // // button1 // @@ -166,56 +140,12 @@ this.button1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.path; this.button1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Location = new System.Drawing.Point(691, 121); + this.button1.Location = new System.Drawing.Point(739, 153); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(35, 28); this.button1.TabIndex = 7; this.button1.UseVisualStyleBackColor = false; // - // btnSave - // - this.btnSave.EnterBackColor = System.Drawing.Color.Blue; - this.btnSave.EnterForeColor = System.Drawing.Color.White; - this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnSave.FlatAppearance.BorderSize = 0; - this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); - this.btnSave.HoverForeColor = System.Drawing.Color.White; - this.btnSave.Location = new System.Drawing.Point(504, 377); - this.btnSave.Name = "btnSave"; - this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnSave.PressForeColor = System.Drawing.Color.White; - this.btnSave.Radius = 5; - this.btnSave.Size = new System.Drawing.Size(150, 30); - this.btnSave.TabIndex = 0; - this.btnSave.Text = "保存设置"; - this.btnSave.UseVisualStyleBackColor = true; - // - // btnCancel - // - this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; - this.btnCancel.EnterForeColor = System.Drawing.Color.White; - this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnCancel.FlatAppearance.BorderSize = 0; - this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.btnCancel.HoverForeColor = System.Drawing.Color.White; - this.btnCancel.Location = new System.Drawing.Point(314, 377); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnCancel.PressForeColor = System.Drawing.Color.White; - this.btnCancel.Radius = 5; - this.btnCancel.Size = new System.Drawing.Size(150, 30); - this.btnCancel.TabIndex = 0; - this.btnCancel.Text = "放弃修改"; - this.btnCancel.UseVisualStyleBackColor = true; - // // tabControl1 // this.tabControl1.Controls.Add(this.tabPage1); @@ -232,11 +162,9 @@ this.tabPage1.Controls.Add(this.label4); this.tabPage1.Controls.Add(this.button1); this.tabPage1.Controls.Add(this.btnCancel); - this.tabPage1.Controls.Add(this.textBoxX3); this.tabPage1.Controls.Add(this.btnSave); - this.tabPage1.Controls.Add(this.textBoxX2); - this.tabPage1.Controls.Add(this.textBoxX4); - this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.text_generatorIp); + this.tabPage1.Controls.Add(this.text_exportPath); this.tabPage1.Controls.Add(this.label2); this.tabPage1.Location = new System.Drawing.Point(4, 29); this.tabPage1.Name = "tabPage1"; @@ -248,6 +176,8 @@ // // tabPage2 // + this.tabPage2.Controls.Add(this.roundButton1); + this.tabPage2.Controls.Add(this.roundButton2); this.tabPage2.Controls.Add(this.groupBox3); this.tabPage2.Controls.Add(this.groupBox2); this.tabPage2.Controls.Add(this.groupBox1); @@ -263,16 +193,16 @@ // this.groupBox3.Controls.Add(this.label12); this.groupBox3.Controls.Add(this.label14); - this.groupBox3.Controls.Add(this.textBoxX8); + this.groupBox3.Controls.Add(this.text_cycEleAddValue); this.groupBox3.Controls.Add(this.label20); this.groupBox3.Controls.Add(this.label21); - this.groupBox3.Controls.Add(this.textBoxX12); + this.groupBox3.Controls.Add(this.text_cycThreshold2); this.groupBox3.Controls.Add(this.label22); this.groupBox3.Controls.Add(this.label23); - this.groupBox3.Controls.Add(this.textBoxX13); - this.groupBox3.Location = new System.Drawing.Point(31, 373); + this.groupBox3.Controls.Add(this.text_cycThreshold1); + this.groupBox3.Location = new System.Drawing.Point(31, 336); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(904, 162); + this.groupBox3.Size = new System.Drawing.Size(904, 140); this.groupBox3.TabIndex = 18; this.groupBox3.TabStop = false; this.groupBox3.Text = "周期灵敏度"; @@ -281,7 +211,7 @@ // this.label12.BackColor = System.Drawing.Color.Transparent; this.label12.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(372, 97); + this.label12.Location = new System.Drawing.Point(372, 91); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(45, 30); this.label12.TabIndex = 15; @@ -292,33 +222,33 @@ // this.label14.BackColor = System.Drawing.Color.Transparent; this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label14.Location = new System.Drawing.Point(30, 97); + this.label14.Location = new System.Drawing.Point(30, 91); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(159, 30); this.label14.TabIndex = 12; this.label14.Text = "测量误差电平增加值:"; this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX8 + // text_cycEleAddValue // // // // - this.textBoxX8.Border.Class = "TextBoxBorder"; - this.textBoxX8.Border.CornerDiameter = 5; - this.textBoxX8.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX8.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX8.Location = new System.Drawing.Point(195, 97); - this.textBoxX8.Name = "textBoxX8"; - this.textBoxX8.PreventEnterBeep = true; - this.textBoxX8.Size = new System.Drawing.Size(168, 29); - this.textBoxX8.TabIndex = 11; + this.text_cycEleAddValue.Border.Class = "TextBoxBorder"; + this.text_cycEleAddValue.Border.CornerDiameter = 5; + this.text_cycEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycEleAddValue.Location = new System.Drawing.Point(195, 91); + this.text_cycEleAddValue.Name = "text_cycEleAddValue"; + this.text_cycEleAddValue.PreventEnterBeep = true; + this.text_cycEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_cycEleAddValue.TabIndex = 11; // // label20 // this.label20.BackColor = System.Drawing.Color.Transparent; this.label20.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label20.Location = new System.Drawing.Point(786, 39); + this.label20.Location = new System.Drawing.Point(803, 39); this.label20.Name = "label20"; this.label20.Size = new System.Drawing.Size(45, 30); this.label20.TabIndex = 10; @@ -329,27 +259,27 @@ // this.label21.BackColor = System.Drawing.Color.Transparent; this.label21.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label21.Location = new System.Drawing.Point(444, 41); + this.label21.Location = new System.Drawing.Point(461, 41); this.label21.Name = "label21"; this.label21.Size = new System.Drawing.Size(159, 30); this.label21.TabIndex = 9; this.label21.Text = "周期差值>80MHz:"; this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX12 + // text_cycThreshold2 // // // // - this.textBoxX12.Border.Class = "TextBoxBorder"; - this.textBoxX12.Border.CornerDiameter = 5; - this.textBoxX12.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX12.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX12.Location = new System.Drawing.Point(609, 41); - this.textBoxX12.Name = "textBoxX12"; - this.textBoxX12.PreventEnterBeep = true; - this.textBoxX12.Size = new System.Drawing.Size(168, 29); - this.textBoxX12.TabIndex = 8; + this.text_cycThreshold2.Border.Class = "TextBoxBorder"; + this.text_cycThreshold2.Border.CornerDiameter = 5; + this.text_cycThreshold2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycThreshold2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycThreshold2.Location = new System.Drawing.Point(626, 41); + this.text_cycThreshold2.Name = "text_cycThreshold2"; + this.text_cycThreshold2.PreventEnterBeep = true; + this.text_cycThreshold2.Size = new System.Drawing.Size(168, 29); + this.text_cycThreshold2.TabIndex = 8; // // label22 // @@ -373,35 +303,35 @@ this.label23.Text = "周期差值<=80MHz:"; this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX13 + // text_cycThreshold1 // // // // - this.textBoxX13.Border.Class = "TextBoxBorder"; - this.textBoxX13.Border.CornerDiameter = 5; - this.textBoxX13.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX13.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX13.Location = new System.Drawing.Point(195, 45); - this.textBoxX13.Name = "textBoxX13"; - this.textBoxX13.PreventEnterBeep = true; - this.textBoxX13.Size = new System.Drawing.Size(168, 29); - this.textBoxX13.TabIndex = 5; + this.text_cycThreshold1.Border.Class = "TextBoxBorder"; + this.text_cycThreshold1.Border.CornerDiameter = 5; + this.text_cycThreshold1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycThreshold1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycThreshold1.Location = new System.Drawing.Point(195, 45); + this.text_cycThreshold1.Name = "text_cycThreshold1"; + this.text_cycThreshold1.PreventEnterBeep = true; + this.text_cycThreshold1.Size = new System.Drawing.Size(168, 29); + this.text_cycThreshold1.TabIndex = 5; // // groupBox2 // this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); - this.groupBox2.Controls.Add(this.textBoxX9); + this.groupBox2.Controls.Add(this.text_freEleAddValue); this.groupBox2.Controls.Add(this.label16); this.groupBox2.Controls.Add(this.label17); - this.groupBox2.Controls.Add(this.textBoxX10); + this.groupBox2.Controls.Add(this.text_freThreshold2); this.groupBox2.Controls.Add(this.label18); this.groupBox2.Controls.Add(this.label19); - this.groupBox2.Controls.Add(this.textBoxX11); - this.groupBox2.Location = new System.Drawing.Point(31, 194); + this.groupBox2.Controls.Add(this.text_freThreshold1); + this.groupBox2.Location = new System.Drawing.Point(31, 177); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(904, 162); + this.groupBox2.Size = new System.Drawing.Size(904, 147); this.groupBox2.TabIndex = 17; this.groupBox2.TabStop = false; this.groupBox2.Text = "频率灵敏度"; @@ -410,7 +340,7 @@ // this.label13.BackColor = System.Drawing.Color.Transparent; this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label13.Location = new System.Drawing.Point(372, 97); + this.label13.Location = new System.Drawing.Point(372, 91); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(45, 30); this.label13.TabIndex = 15; @@ -421,33 +351,33 @@ // this.label15.BackColor = System.Drawing.Color.Transparent; this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label15.Location = new System.Drawing.Point(30, 97); + this.label15.Location = new System.Drawing.Point(30, 91); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(159, 30); this.label15.TabIndex = 12; this.label15.Text = "测量误差电平增加值:"; this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX9 + // text_freEleAddValue // // // // - this.textBoxX9.Border.Class = "TextBoxBorder"; - this.textBoxX9.Border.CornerDiameter = 5; - this.textBoxX9.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX9.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX9.Location = new System.Drawing.Point(195, 97); - this.textBoxX9.Name = "textBoxX9"; - this.textBoxX9.PreventEnterBeep = true; - this.textBoxX9.Size = new System.Drawing.Size(168, 29); - this.textBoxX9.TabIndex = 11; + this.text_freEleAddValue.Border.Class = "TextBoxBorder"; + this.text_freEleAddValue.Border.CornerDiameter = 5; + this.text_freEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freEleAddValue.Location = new System.Drawing.Point(195, 91); + this.text_freEleAddValue.Name = "text_freEleAddValue"; + this.text_freEleAddValue.PreventEnterBeep = true; + this.text_freEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_freEleAddValue.TabIndex = 11; // // label16 // this.label16.BackColor = System.Drawing.Color.Transparent; this.label16.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label16.Location = new System.Drawing.Point(786, 39); + this.label16.Location = new System.Drawing.Point(801, 39); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(45, 30); this.label16.TabIndex = 10; @@ -458,27 +388,27 @@ // this.label17.BackColor = System.Drawing.Color.Transparent; this.label17.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label17.Location = new System.Drawing.Point(444, 41); + this.label17.Location = new System.Drawing.Point(459, 41); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(159, 30); this.label17.TabIndex = 9; this.label17.Text = "频率差值>80MHz:"; this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX10 + // text_freThreshold2 // // // // - this.textBoxX10.Border.Class = "TextBoxBorder"; - this.textBoxX10.Border.CornerDiameter = 5; - this.textBoxX10.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX10.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX10.Location = new System.Drawing.Point(609, 41); - this.textBoxX10.Name = "textBoxX10"; - this.textBoxX10.PreventEnterBeep = true; - this.textBoxX10.Size = new System.Drawing.Size(168, 29); - this.textBoxX10.TabIndex = 8; + this.text_freThreshold2.Border.Class = "TextBoxBorder"; + this.text_freThreshold2.Border.CornerDiameter = 5; + this.text_freThreshold2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freThreshold2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freThreshold2.Location = new System.Drawing.Point(624, 41); + this.text_freThreshold2.Name = "text_freThreshold2"; + this.text_freThreshold2.PreventEnterBeep = true; + this.text_freThreshold2.Size = new System.Drawing.Size(168, 29); + this.text_freThreshold2.TabIndex = 8; // // label18 // @@ -502,38 +432,38 @@ this.label19.Text = "频率差值<=80MHz:"; this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX11 + // text_freThreshold1 // // // // - this.textBoxX11.Border.Class = "TextBoxBorder"; - this.textBoxX11.Border.CornerDiameter = 5; - this.textBoxX11.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX11.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX11.Location = new System.Drawing.Point(195, 45); - this.textBoxX11.Name = "textBoxX11"; - this.textBoxX11.PreventEnterBeep = true; - this.textBoxX11.Size = new System.Drawing.Size(168, 29); - this.textBoxX11.TabIndex = 5; + this.text_freThreshold1.Border.Class = "TextBoxBorder"; + this.text_freThreshold1.Border.CornerDiameter = 5; + this.text_freThreshold1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freThreshold1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freThreshold1.Location = new System.Drawing.Point(195, 45); + this.text_freThreshold1.Name = "text_freThreshold1"; + this.text_freThreshold1.PreventEnterBeep = true; + this.text_freThreshold1.Size = new System.Drawing.Size(168, 29); + this.text_freThreshold1.TabIndex = 5; // // groupBox1 // this.groupBox1.Controls.Add(this.label11); this.groupBox1.Controls.Add(this.label10); this.groupBox1.Controls.Add(this.label9); - this.groupBox1.Controls.Add(this.textBoxX7); + this.groupBox1.Controls.Add(this.text_soEleAlarm); this.groupBox1.Controls.Add(this.label8); - this.groupBox1.Controls.Add(this.textBoxX6); + this.groupBox1.Controls.Add(this.text_soEleAddValue); this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label7); - this.groupBox1.Controls.Add(this.textBoxX5); + this.groupBox1.Controls.Add(this.text_soEleFrequency); this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Controls.Add(this.textBoxX1); + this.groupBox1.Controls.Add(this.text_soOutDelay); this.groupBox1.Location = new System.Drawing.Point(31, 18); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(904, 162); + this.groupBox1.Size = new System.Drawing.Size(904, 145); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "电平参数"; @@ -542,7 +472,7 @@ // this.label11.BackColor = System.Drawing.Color.Transparent; this.label11.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label11.Location = new System.Drawing.Point(786, 97); + this.label11.Location = new System.Drawing.Point(801, 89); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(45, 30); this.label11.TabIndex = 16; @@ -553,7 +483,7 @@ // this.label10.BackColor = System.Drawing.Color.Transparent; this.label10.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label10.Location = new System.Drawing.Point(372, 97); + this.label10.Location = new System.Drawing.Point(372, 89); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(45, 30); this.label10.TabIndex = 15; @@ -564,59 +494,59 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(444, 97); + this.label9.Location = new System.Drawing.Point(459, 89); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(159, 30); this.label9.TabIndex = 14; this.label9.Text = "输出电平警告值:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX7 + // text_soEleAlarm // // // // - this.textBoxX7.Border.Class = "TextBoxBorder"; - this.textBoxX7.Border.CornerDiameter = 5; - this.textBoxX7.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX7.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX7.Location = new System.Drawing.Point(609, 97); - this.textBoxX7.Name = "textBoxX7"; - this.textBoxX7.PreventEnterBeep = true; - this.textBoxX7.Size = new System.Drawing.Size(168, 29); - this.textBoxX7.TabIndex = 13; + this.text_soEleAlarm.Border.Class = "TextBoxBorder"; + this.text_soEleAlarm.Border.CornerDiameter = 5; + this.text_soEleAlarm.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleAlarm.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleAlarm.Location = new System.Drawing.Point(624, 89); + this.text_soEleAlarm.Name = "text_soEleAlarm"; + this.text_soEleAlarm.PreventEnterBeep = true; + this.text_soEleAlarm.Size = new System.Drawing.Size(168, 29); + this.text_soEleAlarm.TabIndex = 13; // // label8 // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(30, 97); + this.label8.Location = new System.Drawing.Point(30, 89); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(159, 30); this.label8.TabIndex = 12; this.label8.Text = "信号源电平增加值:"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX6 + // text_soEleAddValue // // // // - this.textBoxX6.Border.Class = "TextBoxBorder"; - this.textBoxX6.Border.CornerDiameter = 5; - this.textBoxX6.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX6.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX6.Location = new System.Drawing.Point(195, 97); - this.textBoxX6.Name = "textBoxX6"; - this.textBoxX6.PreventEnterBeep = true; - this.textBoxX6.Size = new System.Drawing.Size(168, 29); - this.textBoxX6.TabIndex = 11; + this.text_soEleAddValue.Border.Class = "TextBoxBorder"; + this.text_soEleAddValue.Border.CornerDiameter = 5; + this.text_soEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleAddValue.Location = new System.Drawing.Point(195, 89); + this.text_soEleAddValue.Name = "text_soEleAddValue"; + this.text_soEleAddValue.PreventEnterBeep = true; + this.text_soEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_soEleAddValue.TabIndex = 11; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(786, 39); + this.label6.Location = new System.Drawing.Point(801, 39); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(45, 30); this.label6.TabIndex = 10; @@ -627,27 +557,27 @@ // this.label7.BackColor = System.Drawing.Color.Transparent; this.label7.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(444, 41); + this.label7.Location = new System.Drawing.Point(459, 41); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(159, 30); this.label7.TabIndex = 9; this.label7.Text = "信号源初始电平:"; this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX5 + // text_soEleFrequency // // // // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(609, 41); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(168, 29); - this.textBoxX5.TabIndex = 8; + this.text_soEleFrequency.Border.Class = "TextBoxBorder"; + this.text_soEleFrequency.Border.CornerDiameter = 5; + this.text_soEleFrequency.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleFrequency.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleFrequency.Location = new System.Drawing.Point(624, 41); + this.text_soEleFrequency.Name = "text_soEleFrequency"; + this.text_soEleFrequency.PreventEnterBeep = true; + this.text_soEleFrequency.Size = new System.Drawing.Size(168, 29); + this.text_soEleFrequency.TabIndex = 8; // // label5 // @@ -671,20 +601,112 @@ this.label1.Text = "信号源输出延时:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX1 + // text_soOutDelay // // // // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX1.Location = new System.Drawing.Point(195, 45); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(168, 29); - this.textBoxX1.TabIndex = 5; + this.text_soOutDelay.Border.Class = "TextBoxBorder"; + this.text_soOutDelay.Border.CornerDiameter = 5; + this.text_soOutDelay.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soOutDelay.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soOutDelay.Location = new System.Drawing.Point(195, 45); + this.text_soOutDelay.Name = "text_soOutDelay"; + this.text_soOutDelay.PreventEnterBeep = true; + this.text_soOutDelay.Size = new System.Drawing.Size(168, 29); + this.text_soOutDelay.TabIndex = 5; + // + // btnCancel + // + this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancel.EnterForeColor = System.Drawing.Color.White; + this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancel.FlatAppearance.BorderSize = 0; + this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancel.HoverForeColor = System.Drawing.Color.White; + this.btnCancel.Location = new System.Drawing.Point(314, 396); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancel.PressForeColor = System.Drawing.Color.White; + this.btnCancel.Radius = 5; + this.btnCancel.Size = new System.Drawing.Size(150, 30); + this.btnCancel.TabIndex = 0; + this.btnCancel.Text = "放弃修改"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(504, 396); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(150, 30); + this.btnSave.TabIndex = 0; + this.btnSave.Text = "保存设置"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // roundButton1 + // + this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton1.EnterForeColor = System.Drawing.Color.White; + this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton1.FlatAppearance.BorderSize = 0; + this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.roundButton1.HoverForeColor = System.Drawing.Color.White; + this.roundButton1.Location = new System.Drawing.Point(337, 510); + this.roundButton1.Name = "roundButton1"; + this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton1.PressForeColor = System.Drawing.Color.White; + this.roundButton1.Radius = 5; + this.roundButton1.Size = new System.Drawing.Size(150, 30); + this.roundButton1.TabIndex = 19; + this.roundButton1.Text = "放弃修改"; + this.roundButton1.UseVisualStyleBackColor = true; + this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click); + // + // roundButton2 + // + this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton2.EnterForeColor = System.Drawing.Color.White; + this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton2.FlatAppearance.BorderSize = 0; + this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.roundButton2.HoverForeColor = System.Drawing.Color.White; + this.roundButton2.Location = new System.Drawing.Point(527, 510); + this.roundButton2.Name = "roundButton2"; + this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton2.PressForeColor = System.Drawing.Color.White; + this.roundButton2.Radius = 5; + this.roundButton2.Size = new System.Drawing.Size(150, 30); + this.roundButton2.TabIndex = 20; + this.roundButton2.Text = "保存设置"; + this.roundButton2.UseVisualStyleBackColor = true; + this.roundButton2.Click += new System.EventHandler(this.roundButton2_Click); // // SettingCtrlForm // @@ -713,11 +735,9 @@ private RoundButton btnCancel; private RoundButton btnSave; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX3; + private DevComponents.DotNetBar.Controls.TextBoxX text_generatorIp; private System.Windows.Forms.Label label4; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private DevComponents.DotNetBar.Controls.TextBoxX text_exportPath; private System.Windows.Forms.Button button1; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; @@ -725,35 +745,37 @@ private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label14; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX8; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycEleAddValue; private System.Windows.Forms.Label label20; private System.Windows.Forms.Label label21; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX12; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold2; private System.Windows.Forms.Label label22; private System.Windows.Forms.Label label23; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX13; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold1; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label15; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX9; + private DevComponents.DotNetBar.Controls.TextBoxX text_freEleAddValue; private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label17; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX10; + private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold2; private System.Windows.Forms.Label label18; private System.Windows.Forms.Label label19; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX11; + private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold1; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label9; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX7; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleAlarm; private System.Windows.Forms.Label label8; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX6; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleAddValue; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label7; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleFrequency; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label1; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; + private DevComponents.DotNetBar.Controls.TextBoxX text_soOutDelay; + private RoundButton roundButton1; + private RoundButton roundButton2; } } diff --git a/RbFreqStandMeasure/setting/SettingCtrlForm.cs b/RbFreqStandMeasure/setting/SettingCtrlForm.cs index 11b3bba..220e58e 100644 --- a/RbFreqStandMeasure/setting/SettingCtrlForm.cs +++ b/RbFreqStandMeasure/setting/SettingCtrlForm.cs @@ -1,9 +1,14 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; +using System.Reflection; using System.Text; using System.Windows.Forms; @@ -11,9 +16,92 @@ { public partial class SettingCtrlForm : UserControl { + DictService dictService = new DictServiceImpl(); + //CounterParam + public SettingCtrlForm() { InitializeComponent(); + + CounterParam counterParam = dictService.getCounterParam(); + text_generatorIp.Text = counterParam.GeneratorIp; + text_exportPath.Text = ConfigHelper.GetAppConfig("exportPath").ToString().Trim() ; + initCheckParam(); + } + + private void initCheckParam() + { + CounterCheckParam counterCheckParam = dictService.getCounterCheckParam(); + text_soOutDelay.Text = counterCheckParam.SoOutDelay; + text_soEleFrequency.Text = counterCheckParam.SoEleFrequency; + text_soEleAlarm.Text = counterCheckParam.SoEleAlarm; + text_soEleAddValue.Text = counterCheckParam.SoEleAddValue; + + text_freThreshold1.Text = counterCheckParam.FreThreshold1; + text_freThreshold2.Text = counterCheckParam.FreThreshold2; + text_freEleAddValue.Text = counterCheckParam.FreEleAddValue; + + text_cycThreshold1.Text = counterCheckParam.CycThreshold1; + text_cycThreshold2.Text = counterCheckParam.CycThreshold2; + text_cycEleAddValue.Text = counterCheckParam.CycEleAddValue; + + } + + private void btnSave_Click(object sender, EventArgs e) + { + try + { + if (text_generatorIp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入计数器IP"); + return; + } + if (text_exportPath.Text.Trim().Equals("")) + { + MessageBox.Show("请输入数据导出默认路径"); + return; + } + ConfigHelper.UpdateAppConfig("exportPath", text_exportPath.Text.Trim()); + dictService.updateCounterIp(text_generatorIp.Text.Trim()); + + MessageBox.Show("保存成功!"); + } + catch(Exception ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "保存失败:"+ ex.Message); + MessageBox.Show("保存失败!"); + } + } + + private void btnCancel_Click(object sender, EventArgs e) + { + CounterParam counterParam = dictService.getCounterParam(); + text_generatorIp.Text = counterParam.GeneratorIp; + text_exportPath.Text = ConfigHelper.GetAppConfig("exportPath").ToString().Trim(); + } + + private void roundButton1_Click(object sender, EventArgs e) + { + initCheckParam(); + } + + private void roundButton2_Click(object sender, EventArgs e) + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + counterCheckParam.SoOutDelay = text_soOutDelay.Text; + counterCheckParam.SoEleFrequency = text_soEleFrequency.Text; + counterCheckParam.SoEleAlarm = text_soEleAlarm.Text ; + counterCheckParam.SoEleAddValue = text_soEleAddValue.Text ; + + counterCheckParam.FreThreshold1= text_freThreshold1.Text ; + counterCheckParam.FreThreshold2= text_freThreshold2.Text ; + counterCheckParam.FreEleAddValue= text_freEleAddValue.Text ; + + counterCheckParam.CycThreshold1= text_cycThreshold1.Text ; + counterCheckParam.CycThreshold2= text_cycThreshold2.Text ; + counterCheckParam.CycEleAddValue= text_cycEleAddValue.Text ; + + dictService.updateCheckParam(counterCheckParam); } } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/info/ageRate.cs b/RbFreqStandMeasure/info/ageRate.cs index 486f4a6..7529830 100644 --- a/RbFreqStandMeasure/info/ageRate.cs +++ b/RbFreqStandMeasure/info/ageRate.cs @@ -4,235 +4,28 @@ using System.Windows.Forms; using System.Drawing.Drawing2D; using Casic.Birmm.RbFreqStandMeasure.Properties; +using System.Data; +using System.Windows.Forms.DataVisualization.Charting; namespace Casic.Birmm.RbFreqStandMeasure { public partial class ageRate : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - - public ageRate() + + public ageRate(DataTable originData) { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - InitialCanvas(); + chart1.Series["Series1"].XValueMember = "时间"; + chart1.Series["Series1"].YValueMembers = "相对频率偏差"; + + //chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle; //线条上的数据点标志类型 + //chart1.Series["Series1"].MarkerSize = 3; //标志大小 + Series Series1 = new Series(); + chart1.Series.Add(Series1);//加入你的chart1 + chart1.DataSource = originData; + } - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 9c376de..3a62610 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -34,26 +34,31 @@ this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label_customerName = new System.Windows.Forms.Label(); - this.label_devModel = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label_devModel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(13, 81); + this.chart1.Location = new System.Drawing.Point(3, 67); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 238); + this.chart1.Size = new System.Drawing.Size(402, 176); this.chart1.TabIndex = 117; this.chart1.Text = "chart1"; // @@ -62,7 +67,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(380, 10); + this.label1.Location = new System.Drawing.Point(316, 8); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -74,7 +79,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(261, 10); + this.label4.Location = new System.Drawing.Point(197, 8); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(119, 27); @@ -87,32 +92,19 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(146, 42); + this.label_customerName.Location = new System.Drawing.Point(100, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); + this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label_devModel - // - this.label_devModel.BackColor = System.Drawing.Color.Transparent; - this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(146, 10); - this.label_devModel.Margin = new System.Windows.Forms.Padding(0); - this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; - this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(59, 42); + this.label2.Location = new System.Drawing.Point(13, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -120,24 +112,12 @@ this.label2.Text = "测量结果:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label9 - // - this.label9.BackColor = System.Drawing.Color.Transparent; - this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(10, 10); - this.label9.Margin = new System.Windows.Forms.Padding(0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 111; - this.label9.Text = "预热天数:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label3.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label3.Location = new System.Drawing.Point(380, 42); + this.label3.Location = new System.Drawing.Point(316, 35); this.label3.Margin = new System.Windows.Forms.Padding(0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); @@ -149,7 +129,7 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(293, 42); + this.label5.Location = new System.Drawing.Point(229, 35); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(87, 27); @@ -157,10 +137,34 @@ this.label5.Text = "标准偏差:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // label9 + // + this.label9.BackColor = System.Drawing.Color.Transparent; + this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(17, 8); + this.label9.Margin = new System.Windows.Forms.Padding(0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(83, 27); + this.label9.TabIndex = 111; + this.label9.Text = "预热天数:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label_devModel + // + this.label_devModel.BackColor = System.Drawing.Color.Transparent; + this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; + this.label_devModel.Location = new System.Drawing.Point(100, 8); + this.label_devModel.Margin = new System.Windows.Forms.Padding(0); + this.label_devModel.Name = "label_devModel"; + this.label_devModel.Size = new System.Drawing.Size(67, 27); + this.label_devModel.TabIndex = 113; + this.label_devModel.Text = "仪:"; + this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // ageRate // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.label3); this.Controls.Add(this.label5); @@ -172,10 +176,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "ageRate"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); @@ -187,10 +188,10 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label_customerName; - private System.Windows.Forms.Label label_devModel; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label_devModel; } } diff --git a/RbFreqStandMeasure/info/bootFeature.cs b/RbFreqStandMeasure/info/bootFeature.cs index 4063048..2cec888 100644 --- a/RbFreqStandMeasure/info/bootFeature.cs +++ b/RbFreqStandMeasure/info/bootFeature.cs @@ -9,230 +9,15 @@ { public partial class bootFeature : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } public bootFeature() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - + //设置背景颜色为透明 + this.BackColor = Color.Transparent; } + - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index a1fa758..133d6b5 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -42,16 +42,22 @@ // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 50); + this.chart1.Location = new System.Drawing.Point(3, 65); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; + series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.DateTime; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 265); + this.chart1.Size = new System.Drawing.Size(399, 178); this.chart1.TabIndex = 110; this.chart1.Text = "chart1"; // @@ -60,7 +66,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 6); + this.label1.Location = new System.Drawing.Point(294, 6); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -72,7 +78,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 6); + this.label4.Location = new System.Drawing.Point(207, 6); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -85,7 +91,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(455, 6); + this.label_customerName.Location = new System.Drawing.Point(106, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -98,7 +104,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 6); + this.label_devModel.Location = new System.Drawing.Point(106, 6); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -110,7 +116,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(368, 6); + this.label2.Location = new System.Drawing.Point(19, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -122,18 +128,17 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 6); + this.label9.Location = new System.Drawing.Point(22, 6); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); + this.label9.Size = new System.Drawing.Size(84, 27); this.label9.TabIndex = 100; this.label9.Text = "y(t)-Min:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // bootFeature // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.chart1); this.Controls.Add(this.label1); @@ -143,10 +148,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "bootFeature"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); diff --git a/RbFreqStandMeasure/info/stability.cs b/RbFreqStandMeasure/info/stability.cs index e42c91f..22e26df 100644 --- a/RbFreqStandMeasure/info/stability.cs +++ b/RbFreqStandMeasure/info/stability.cs @@ -12,227 +12,15 @@ private int x = 0; private int y = 0; - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - + public stability() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); + //设置背景颜色为透明 this.BackColor = Color.Transparent; - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } + } + } } diff --git a/RbFreqStandMeasure/info/stability.designer.cs b/RbFreqStandMeasure/info/stability.designer.cs index c8db121..0a6b17e 100644 --- a/RbFreqStandMeasure/info/stability.designer.cs +++ b/RbFreqStandMeasure/info/stability.designer.cs @@ -34,8 +34,6 @@ this.label9 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); // // label_customerName @@ -43,7 +41,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(452, 11); + this.label_customerName.Location = new System.Drawing.Point(197, 126); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -56,7 +54,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(122, 11); + this.label_devModel.Location = new System.Drawing.Point(197, 38); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -68,7 +66,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(365, 11); + this.label2.Location = new System.Drawing.Point(110, 126); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -80,10 +78,10 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(5, 11); + this.label9.Location = new System.Drawing.Point(114, 38); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(117, 27); + this.label9.Size = new System.Drawing.Size(83, 27); this.label9.TabIndex = 79; this.label9.Text = "测量结果:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -93,7 +91,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(282, 11); + this.label1.Location = new System.Drawing.Point(197, 82); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -105,7 +103,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(195, 11); + this.label4.Location = new System.Drawing.Point(110, 82); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -113,21 +111,10 @@ this.label4.Text = "标准偏差:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // dataGridView1 - // - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(16, 51); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(517, 261); - this.dataGridView1.TabIndex = 89; - // // stability // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.dataGridView1); this.Controls.Add(this.label1); this.Controls.Add(this.label4); this.Controls.Add(this.label_customerName); @@ -135,11 +122,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "stability"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } @@ -151,6 +134,5 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.DataGridView dataGridView1; } } diff --git a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs index cb453d7..d67b5a2 100644 --- a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs @@ -30,50 +30,50 @@ private void InitializeComponent() { this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.textBoxX3 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_generatorIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label4 = new System.Windows.Forms.Label(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_exportPath = new DevComponents.DotNetBar.Controls.TextBoxX(); this.button1 = new System.Windows.Forms.Button(); - this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.label12 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); - this.textBoxX8 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label20 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); - this.textBoxX12 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label22 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); - this.textBoxX13 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label13 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); - this.textBoxX9 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label16 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); - this.textBoxX10 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label18 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); - this.textBoxX11 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label11 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.textBoxX7 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleAlarm = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label8 = new System.Windows.Forms.Label(); - this.textBoxX6 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleFrequency = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label5 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soOutDelay = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -86,79 +86,53 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(247, 177); + this.label2.Location = new System.Drawing.Point(244, 243); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(150, 30); this.label2.TabIndex = 4; - this.label2.Text = "频率发生器IP:"; + this.label2.Text = "计数器IP:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(247, 237); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(150, 30); - this.label3.TabIndex = 4; - this.label3.Text = "频率信号源IP:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // textBoxX2 + // text_generatorIp // // // // - this.textBoxX2.Border.Class = "TextBoxBorder"; - this.textBoxX2.Border.CornerDiameter = 5; - this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX2.Location = new System.Drawing.Point(437, 177); - this.textBoxX2.Name = "textBoxX2"; - this.textBoxX2.PreventEnterBeep = true; - this.textBoxX2.Size = new System.Drawing.Size(250, 29); - this.textBoxX2.TabIndex = 5; - // - // textBoxX3 - // - // - // - // - this.textBoxX3.Border.Class = "TextBoxBorder"; - this.textBoxX3.Border.CornerDiameter = 5; - this.textBoxX3.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX3.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX3.Location = new System.Drawing.Point(437, 237); - this.textBoxX3.Name = "textBoxX3"; - this.textBoxX3.PreventEnterBeep = true; - this.textBoxX3.Size = new System.Drawing.Size(250, 29); - this.textBoxX3.TabIndex = 6; + this.text_generatorIp.Border.Class = "TextBoxBorder"; + this.text_generatorIp.Border.CornerDiameter = 5; + this.text_generatorIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_generatorIp.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_generatorIp.Location = new System.Drawing.Point(400, 243); + this.text_generatorIp.Name = "text_generatorIp"; + this.text_generatorIp.PreventEnterBeep = true; + this.text_generatorIp.Size = new System.Drawing.Size(326, 29); + this.text_generatorIp.TabIndex = 5; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(221, 121); + this.label4.Location = new System.Drawing.Point(218, 153); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(176, 30); this.label4.TabIndex = 4; - this.label4.Text = "数据默认存放路径:"; + this.label4.Text = "数据默认导出路径:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX4 + // text_exportPath // // // // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(437, 121); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(250, 29); - this.textBoxX4.TabIndex = 2; + this.text_exportPath.Border.Class = "TextBoxBorder"; + this.text_exportPath.Border.CornerDiameter = 5; + this.text_exportPath.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_exportPath.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_exportPath.Location = new System.Drawing.Point(400, 153); + this.text_exportPath.Name = "text_exportPath"; + this.text_exportPath.PreventEnterBeep = true; + this.text_exportPath.Size = new System.Drawing.Size(326, 29); + this.text_exportPath.TabIndex = 2; // // button1 // @@ -166,56 +140,12 @@ this.button1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.path; this.button1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Location = new System.Drawing.Point(691, 121); + this.button1.Location = new System.Drawing.Point(739, 153); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(35, 28); this.button1.TabIndex = 7; this.button1.UseVisualStyleBackColor = false; // - // btnSave - // - this.btnSave.EnterBackColor = System.Drawing.Color.Blue; - this.btnSave.EnterForeColor = System.Drawing.Color.White; - this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnSave.FlatAppearance.BorderSize = 0; - this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); - this.btnSave.HoverForeColor = System.Drawing.Color.White; - this.btnSave.Location = new System.Drawing.Point(504, 377); - this.btnSave.Name = "btnSave"; - this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnSave.PressForeColor = System.Drawing.Color.White; - this.btnSave.Radius = 5; - this.btnSave.Size = new System.Drawing.Size(150, 30); - this.btnSave.TabIndex = 0; - this.btnSave.Text = "保存设置"; - this.btnSave.UseVisualStyleBackColor = true; - // - // btnCancel - // - this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; - this.btnCancel.EnterForeColor = System.Drawing.Color.White; - this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnCancel.FlatAppearance.BorderSize = 0; - this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.btnCancel.HoverForeColor = System.Drawing.Color.White; - this.btnCancel.Location = new System.Drawing.Point(314, 377); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnCancel.PressForeColor = System.Drawing.Color.White; - this.btnCancel.Radius = 5; - this.btnCancel.Size = new System.Drawing.Size(150, 30); - this.btnCancel.TabIndex = 0; - this.btnCancel.Text = "放弃修改"; - this.btnCancel.UseVisualStyleBackColor = true; - // // tabControl1 // this.tabControl1.Controls.Add(this.tabPage1); @@ -232,11 +162,9 @@ this.tabPage1.Controls.Add(this.label4); this.tabPage1.Controls.Add(this.button1); this.tabPage1.Controls.Add(this.btnCancel); - this.tabPage1.Controls.Add(this.textBoxX3); this.tabPage1.Controls.Add(this.btnSave); - this.tabPage1.Controls.Add(this.textBoxX2); - this.tabPage1.Controls.Add(this.textBoxX4); - this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.text_generatorIp); + this.tabPage1.Controls.Add(this.text_exportPath); this.tabPage1.Controls.Add(this.label2); this.tabPage1.Location = new System.Drawing.Point(4, 29); this.tabPage1.Name = "tabPage1"; @@ -248,6 +176,8 @@ // // tabPage2 // + this.tabPage2.Controls.Add(this.roundButton1); + this.tabPage2.Controls.Add(this.roundButton2); this.tabPage2.Controls.Add(this.groupBox3); this.tabPage2.Controls.Add(this.groupBox2); this.tabPage2.Controls.Add(this.groupBox1); @@ -263,16 +193,16 @@ // this.groupBox3.Controls.Add(this.label12); this.groupBox3.Controls.Add(this.label14); - this.groupBox3.Controls.Add(this.textBoxX8); + this.groupBox3.Controls.Add(this.text_cycEleAddValue); this.groupBox3.Controls.Add(this.label20); this.groupBox3.Controls.Add(this.label21); - this.groupBox3.Controls.Add(this.textBoxX12); + this.groupBox3.Controls.Add(this.text_cycThreshold2); this.groupBox3.Controls.Add(this.label22); this.groupBox3.Controls.Add(this.label23); - this.groupBox3.Controls.Add(this.textBoxX13); - this.groupBox3.Location = new System.Drawing.Point(31, 373); + this.groupBox3.Controls.Add(this.text_cycThreshold1); + this.groupBox3.Location = new System.Drawing.Point(31, 336); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(904, 162); + this.groupBox3.Size = new System.Drawing.Size(904, 140); this.groupBox3.TabIndex = 18; this.groupBox3.TabStop = false; this.groupBox3.Text = "周期灵敏度"; @@ -281,7 +211,7 @@ // this.label12.BackColor = System.Drawing.Color.Transparent; this.label12.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(372, 97); + this.label12.Location = new System.Drawing.Point(372, 91); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(45, 30); this.label12.TabIndex = 15; @@ -292,33 +222,33 @@ // this.label14.BackColor = System.Drawing.Color.Transparent; this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label14.Location = new System.Drawing.Point(30, 97); + this.label14.Location = new System.Drawing.Point(30, 91); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(159, 30); this.label14.TabIndex = 12; this.label14.Text = "测量误差电平增加值:"; this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX8 + // text_cycEleAddValue // // // // - this.textBoxX8.Border.Class = "TextBoxBorder"; - this.textBoxX8.Border.CornerDiameter = 5; - this.textBoxX8.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX8.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX8.Location = new System.Drawing.Point(195, 97); - this.textBoxX8.Name = "textBoxX8"; - this.textBoxX8.PreventEnterBeep = true; - this.textBoxX8.Size = new System.Drawing.Size(168, 29); - this.textBoxX8.TabIndex = 11; + this.text_cycEleAddValue.Border.Class = "TextBoxBorder"; + this.text_cycEleAddValue.Border.CornerDiameter = 5; + this.text_cycEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycEleAddValue.Location = new System.Drawing.Point(195, 91); + this.text_cycEleAddValue.Name = "text_cycEleAddValue"; + this.text_cycEleAddValue.PreventEnterBeep = true; + this.text_cycEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_cycEleAddValue.TabIndex = 11; // // label20 // this.label20.BackColor = System.Drawing.Color.Transparent; this.label20.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label20.Location = new System.Drawing.Point(786, 39); + this.label20.Location = new System.Drawing.Point(803, 39); this.label20.Name = "label20"; this.label20.Size = new System.Drawing.Size(45, 30); this.label20.TabIndex = 10; @@ -329,27 +259,27 @@ // this.label21.BackColor = System.Drawing.Color.Transparent; this.label21.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label21.Location = new System.Drawing.Point(444, 41); + this.label21.Location = new System.Drawing.Point(461, 41); this.label21.Name = "label21"; this.label21.Size = new System.Drawing.Size(159, 30); this.label21.TabIndex = 9; this.label21.Text = "周期差值>80MHz:"; this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX12 + // text_cycThreshold2 // // // // - this.textBoxX12.Border.Class = "TextBoxBorder"; - this.textBoxX12.Border.CornerDiameter = 5; - this.textBoxX12.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX12.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX12.Location = new System.Drawing.Point(609, 41); - this.textBoxX12.Name = "textBoxX12"; - this.textBoxX12.PreventEnterBeep = true; - this.textBoxX12.Size = new System.Drawing.Size(168, 29); - this.textBoxX12.TabIndex = 8; + this.text_cycThreshold2.Border.Class = "TextBoxBorder"; + this.text_cycThreshold2.Border.CornerDiameter = 5; + this.text_cycThreshold2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycThreshold2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycThreshold2.Location = new System.Drawing.Point(626, 41); + this.text_cycThreshold2.Name = "text_cycThreshold2"; + this.text_cycThreshold2.PreventEnterBeep = true; + this.text_cycThreshold2.Size = new System.Drawing.Size(168, 29); + this.text_cycThreshold2.TabIndex = 8; // // label22 // @@ -373,35 +303,35 @@ this.label23.Text = "周期差值<=80MHz:"; this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX13 + // text_cycThreshold1 // // // // - this.textBoxX13.Border.Class = "TextBoxBorder"; - this.textBoxX13.Border.CornerDiameter = 5; - this.textBoxX13.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX13.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX13.Location = new System.Drawing.Point(195, 45); - this.textBoxX13.Name = "textBoxX13"; - this.textBoxX13.PreventEnterBeep = true; - this.textBoxX13.Size = new System.Drawing.Size(168, 29); - this.textBoxX13.TabIndex = 5; + this.text_cycThreshold1.Border.Class = "TextBoxBorder"; + this.text_cycThreshold1.Border.CornerDiameter = 5; + this.text_cycThreshold1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycThreshold1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycThreshold1.Location = new System.Drawing.Point(195, 45); + this.text_cycThreshold1.Name = "text_cycThreshold1"; + this.text_cycThreshold1.PreventEnterBeep = true; + this.text_cycThreshold1.Size = new System.Drawing.Size(168, 29); + this.text_cycThreshold1.TabIndex = 5; // // groupBox2 // this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); - this.groupBox2.Controls.Add(this.textBoxX9); + this.groupBox2.Controls.Add(this.text_freEleAddValue); this.groupBox2.Controls.Add(this.label16); this.groupBox2.Controls.Add(this.label17); - this.groupBox2.Controls.Add(this.textBoxX10); + this.groupBox2.Controls.Add(this.text_freThreshold2); this.groupBox2.Controls.Add(this.label18); this.groupBox2.Controls.Add(this.label19); - this.groupBox2.Controls.Add(this.textBoxX11); - this.groupBox2.Location = new System.Drawing.Point(31, 194); + this.groupBox2.Controls.Add(this.text_freThreshold1); + this.groupBox2.Location = new System.Drawing.Point(31, 177); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(904, 162); + this.groupBox2.Size = new System.Drawing.Size(904, 147); this.groupBox2.TabIndex = 17; this.groupBox2.TabStop = false; this.groupBox2.Text = "频率灵敏度"; @@ -410,7 +340,7 @@ // this.label13.BackColor = System.Drawing.Color.Transparent; this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label13.Location = new System.Drawing.Point(372, 97); + this.label13.Location = new System.Drawing.Point(372, 91); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(45, 30); this.label13.TabIndex = 15; @@ -421,33 +351,33 @@ // this.label15.BackColor = System.Drawing.Color.Transparent; this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label15.Location = new System.Drawing.Point(30, 97); + this.label15.Location = new System.Drawing.Point(30, 91); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(159, 30); this.label15.TabIndex = 12; this.label15.Text = "测量误差电平增加值:"; this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX9 + // text_freEleAddValue // // // // - this.textBoxX9.Border.Class = "TextBoxBorder"; - this.textBoxX9.Border.CornerDiameter = 5; - this.textBoxX9.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX9.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX9.Location = new System.Drawing.Point(195, 97); - this.textBoxX9.Name = "textBoxX9"; - this.textBoxX9.PreventEnterBeep = true; - this.textBoxX9.Size = new System.Drawing.Size(168, 29); - this.textBoxX9.TabIndex = 11; + this.text_freEleAddValue.Border.Class = "TextBoxBorder"; + this.text_freEleAddValue.Border.CornerDiameter = 5; + this.text_freEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freEleAddValue.Location = new System.Drawing.Point(195, 91); + this.text_freEleAddValue.Name = "text_freEleAddValue"; + this.text_freEleAddValue.PreventEnterBeep = true; + this.text_freEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_freEleAddValue.TabIndex = 11; // // label16 // this.label16.BackColor = System.Drawing.Color.Transparent; this.label16.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label16.Location = new System.Drawing.Point(786, 39); + this.label16.Location = new System.Drawing.Point(801, 39); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(45, 30); this.label16.TabIndex = 10; @@ -458,27 +388,27 @@ // this.label17.BackColor = System.Drawing.Color.Transparent; this.label17.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label17.Location = new System.Drawing.Point(444, 41); + this.label17.Location = new System.Drawing.Point(459, 41); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(159, 30); this.label17.TabIndex = 9; this.label17.Text = "频率差值>80MHz:"; this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX10 + // text_freThreshold2 // // // // - this.textBoxX10.Border.Class = "TextBoxBorder"; - this.textBoxX10.Border.CornerDiameter = 5; - this.textBoxX10.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX10.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX10.Location = new System.Drawing.Point(609, 41); - this.textBoxX10.Name = "textBoxX10"; - this.textBoxX10.PreventEnterBeep = true; - this.textBoxX10.Size = new System.Drawing.Size(168, 29); - this.textBoxX10.TabIndex = 8; + this.text_freThreshold2.Border.Class = "TextBoxBorder"; + this.text_freThreshold2.Border.CornerDiameter = 5; + this.text_freThreshold2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freThreshold2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freThreshold2.Location = new System.Drawing.Point(624, 41); + this.text_freThreshold2.Name = "text_freThreshold2"; + this.text_freThreshold2.PreventEnterBeep = true; + this.text_freThreshold2.Size = new System.Drawing.Size(168, 29); + this.text_freThreshold2.TabIndex = 8; // // label18 // @@ -502,38 +432,38 @@ this.label19.Text = "频率差值<=80MHz:"; this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX11 + // text_freThreshold1 // // // // - this.textBoxX11.Border.Class = "TextBoxBorder"; - this.textBoxX11.Border.CornerDiameter = 5; - this.textBoxX11.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX11.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX11.Location = new System.Drawing.Point(195, 45); - this.textBoxX11.Name = "textBoxX11"; - this.textBoxX11.PreventEnterBeep = true; - this.textBoxX11.Size = new System.Drawing.Size(168, 29); - this.textBoxX11.TabIndex = 5; + this.text_freThreshold1.Border.Class = "TextBoxBorder"; + this.text_freThreshold1.Border.CornerDiameter = 5; + this.text_freThreshold1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freThreshold1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freThreshold1.Location = new System.Drawing.Point(195, 45); + this.text_freThreshold1.Name = "text_freThreshold1"; + this.text_freThreshold1.PreventEnterBeep = true; + this.text_freThreshold1.Size = new System.Drawing.Size(168, 29); + this.text_freThreshold1.TabIndex = 5; // // groupBox1 // this.groupBox1.Controls.Add(this.label11); this.groupBox1.Controls.Add(this.label10); this.groupBox1.Controls.Add(this.label9); - this.groupBox1.Controls.Add(this.textBoxX7); + this.groupBox1.Controls.Add(this.text_soEleAlarm); this.groupBox1.Controls.Add(this.label8); - this.groupBox1.Controls.Add(this.textBoxX6); + this.groupBox1.Controls.Add(this.text_soEleAddValue); this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label7); - this.groupBox1.Controls.Add(this.textBoxX5); + this.groupBox1.Controls.Add(this.text_soEleFrequency); this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Controls.Add(this.textBoxX1); + this.groupBox1.Controls.Add(this.text_soOutDelay); this.groupBox1.Location = new System.Drawing.Point(31, 18); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(904, 162); + this.groupBox1.Size = new System.Drawing.Size(904, 145); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "电平参数"; @@ -542,7 +472,7 @@ // this.label11.BackColor = System.Drawing.Color.Transparent; this.label11.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label11.Location = new System.Drawing.Point(786, 97); + this.label11.Location = new System.Drawing.Point(801, 89); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(45, 30); this.label11.TabIndex = 16; @@ -553,7 +483,7 @@ // this.label10.BackColor = System.Drawing.Color.Transparent; this.label10.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label10.Location = new System.Drawing.Point(372, 97); + this.label10.Location = new System.Drawing.Point(372, 89); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(45, 30); this.label10.TabIndex = 15; @@ -564,59 +494,59 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(444, 97); + this.label9.Location = new System.Drawing.Point(459, 89); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(159, 30); this.label9.TabIndex = 14; this.label9.Text = "输出电平警告值:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX7 + // text_soEleAlarm // // // // - this.textBoxX7.Border.Class = "TextBoxBorder"; - this.textBoxX7.Border.CornerDiameter = 5; - this.textBoxX7.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX7.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX7.Location = new System.Drawing.Point(609, 97); - this.textBoxX7.Name = "textBoxX7"; - this.textBoxX7.PreventEnterBeep = true; - this.textBoxX7.Size = new System.Drawing.Size(168, 29); - this.textBoxX7.TabIndex = 13; + this.text_soEleAlarm.Border.Class = "TextBoxBorder"; + this.text_soEleAlarm.Border.CornerDiameter = 5; + this.text_soEleAlarm.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleAlarm.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleAlarm.Location = new System.Drawing.Point(624, 89); + this.text_soEleAlarm.Name = "text_soEleAlarm"; + this.text_soEleAlarm.PreventEnterBeep = true; + this.text_soEleAlarm.Size = new System.Drawing.Size(168, 29); + this.text_soEleAlarm.TabIndex = 13; // // label8 // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(30, 97); + this.label8.Location = new System.Drawing.Point(30, 89); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(159, 30); this.label8.TabIndex = 12; this.label8.Text = "信号源电平增加值:"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX6 + // text_soEleAddValue // // // // - this.textBoxX6.Border.Class = "TextBoxBorder"; - this.textBoxX6.Border.CornerDiameter = 5; - this.textBoxX6.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX6.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX6.Location = new System.Drawing.Point(195, 97); - this.textBoxX6.Name = "textBoxX6"; - this.textBoxX6.PreventEnterBeep = true; - this.textBoxX6.Size = new System.Drawing.Size(168, 29); - this.textBoxX6.TabIndex = 11; + this.text_soEleAddValue.Border.Class = "TextBoxBorder"; + this.text_soEleAddValue.Border.CornerDiameter = 5; + this.text_soEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleAddValue.Location = new System.Drawing.Point(195, 89); + this.text_soEleAddValue.Name = "text_soEleAddValue"; + this.text_soEleAddValue.PreventEnterBeep = true; + this.text_soEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_soEleAddValue.TabIndex = 11; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(786, 39); + this.label6.Location = new System.Drawing.Point(801, 39); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(45, 30); this.label6.TabIndex = 10; @@ -627,27 +557,27 @@ // this.label7.BackColor = System.Drawing.Color.Transparent; this.label7.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(444, 41); + this.label7.Location = new System.Drawing.Point(459, 41); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(159, 30); this.label7.TabIndex = 9; this.label7.Text = "信号源初始电平:"; this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX5 + // text_soEleFrequency // // // // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(609, 41); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(168, 29); - this.textBoxX5.TabIndex = 8; + this.text_soEleFrequency.Border.Class = "TextBoxBorder"; + this.text_soEleFrequency.Border.CornerDiameter = 5; + this.text_soEleFrequency.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleFrequency.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleFrequency.Location = new System.Drawing.Point(624, 41); + this.text_soEleFrequency.Name = "text_soEleFrequency"; + this.text_soEleFrequency.PreventEnterBeep = true; + this.text_soEleFrequency.Size = new System.Drawing.Size(168, 29); + this.text_soEleFrequency.TabIndex = 8; // // label5 // @@ -671,20 +601,112 @@ this.label1.Text = "信号源输出延时:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX1 + // text_soOutDelay // // // // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX1.Location = new System.Drawing.Point(195, 45); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(168, 29); - this.textBoxX1.TabIndex = 5; + this.text_soOutDelay.Border.Class = "TextBoxBorder"; + this.text_soOutDelay.Border.CornerDiameter = 5; + this.text_soOutDelay.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soOutDelay.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soOutDelay.Location = new System.Drawing.Point(195, 45); + this.text_soOutDelay.Name = "text_soOutDelay"; + this.text_soOutDelay.PreventEnterBeep = true; + this.text_soOutDelay.Size = new System.Drawing.Size(168, 29); + this.text_soOutDelay.TabIndex = 5; + // + // btnCancel + // + this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancel.EnterForeColor = System.Drawing.Color.White; + this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancel.FlatAppearance.BorderSize = 0; + this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancel.HoverForeColor = System.Drawing.Color.White; + this.btnCancel.Location = new System.Drawing.Point(314, 396); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancel.PressForeColor = System.Drawing.Color.White; + this.btnCancel.Radius = 5; + this.btnCancel.Size = new System.Drawing.Size(150, 30); + this.btnCancel.TabIndex = 0; + this.btnCancel.Text = "放弃修改"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(504, 396); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(150, 30); + this.btnSave.TabIndex = 0; + this.btnSave.Text = "保存设置"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // roundButton1 + // + this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton1.EnterForeColor = System.Drawing.Color.White; + this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton1.FlatAppearance.BorderSize = 0; + this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.roundButton1.HoverForeColor = System.Drawing.Color.White; + this.roundButton1.Location = new System.Drawing.Point(337, 510); + this.roundButton1.Name = "roundButton1"; + this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton1.PressForeColor = System.Drawing.Color.White; + this.roundButton1.Radius = 5; + this.roundButton1.Size = new System.Drawing.Size(150, 30); + this.roundButton1.TabIndex = 19; + this.roundButton1.Text = "放弃修改"; + this.roundButton1.UseVisualStyleBackColor = true; + this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click); + // + // roundButton2 + // + this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton2.EnterForeColor = System.Drawing.Color.White; + this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton2.FlatAppearance.BorderSize = 0; + this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.roundButton2.HoverForeColor = System.Drawing.Color.White; + this.roundButton2.Location = new System.Drawing.Point(527, 510); + this.roundButton2.Name = "roundButton2"; + this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton2.PressForeColor = System.Drawing.Color.White; + this.roundButton2.Radius = 5; + this.roundButton2.Size = new System.Drawing.Size(150, 30); + this.roundButton2.TabIndex = 20; + this.roundButton2.Text = "保存设置"; + this.roundButton2.UseVisualStyleBackColor = true; + this.roundButton2.Click += new System.EventHandler(this.roundButton2_Click); // // SettingCtrlForm // @@ -713,11 +735,9 @@ private RoundButton btnCancel; private RoundButton btnSave; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX3; + private DevComponents.DotNetBar.Controls.TextBoxX text_generatorIp; private System.Windows.Forms.Label label4; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private DevComponents.DotNetBar.Controls.TextBoxX text_exportPath; private System.Windows.Forms.Button button1; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; @@ -725,35 +745,37 @@ private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label14; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX8; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycEleAddValue; private System.Windows.Forms.Label label20; private System.Windows.Forms.Label label21; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX12; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold2; private System.Windows.Forms.Label label22; private System.Windows.Forms.Label label23; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX13; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold1; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label15; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX9; + private DevComponents.DotNetBar.Controls.TextBoxX text_freEleAddValue; private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label17; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX10; + private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold2; private System.Windows.Forms.Label label18; private System.Windows.Forms.Label label19; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX11; + private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold1; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label9; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX7; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleAlarm; private System.Windows.Forms.Label label8; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX6; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleAddValue; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label7; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleFrequency; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label1; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; + private DevComponents.DotNetBar.Controls.TextBoxX text_soOutDelay; + private RoundButton roundButton1; + private RoundButton roundButton2; } } diff --git a/RbFreqStandMeasure/setting/SettingCtrlForm.cs b/RbFreqStandMeasure/setting/SettingCtrlForm.cs index 11b3bba..220e58e 100644 --- a/RbFreqStandMeasure/setting/SettingCtrlForm.cs +++ b/RbFreqStandMeasure/setting/SettingCtrlForm.cs @@ -1,9 +1,14 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; +using System.Reflection; using System.Text; using System.Windows.Forms; @@ -11,9 +16,92 @@ { public partial class SettingCtrlForm : UserControl { + DictService dictService = new DictServiceImpl(); + //CounterParam + public SettingCtrlForm() { InitializeComponent(); + + CounterParam counterParam = dictService.getCounterParam(); + text_generatorIp.Text = counterParam.GeneratorIp; + text_exportPath.Text = ConfigHelper.GetAppConfig("exportPath").ToString().Trim() ; + initCheckParam(); + } + + private void initCheckParam() + { + CounterCheckParam counterCheckParam = dictService.getCounterCheckParam(); + text_soOutDelay.Text = counterCheckParam.SoOutDelay; + text_soEleFrequency.Text = counterCheckParam.SoEleFrequency; + text_soEleAlarm.Text = counterCheckParam.SoEleAlarm; + text_soEleAddValue.Text = counterCheckParam.SoEleAddValue; + + text_freThreshold1.Text = counterCheckParam.FreThreshold1; + text_freThreshold2.Text = counterCheckParam.FreThreshold2; + text_freEleAddValue.Text = counterCheckParam.FreEleAddValue; + + text_cycThreshold1.Text = counterCheckParam.CycThreshold1; + text_cycThreshold2.Text = counterCheckParam.CycThreshold2; + text_cycEleAddValue.Text = counterCheckParam.CycEleAddValue; + + } + + private void btnSave_Click(object sender, EventArgs e) + { + try + { + if (text_generatorIp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入计数器IP"); + return; + } + if (text_exportPath.Text.Trim().Equals("")) + { + MessageBox.Show("请输入数据导出默认路径"); + return; + } + ConfigHelper.UpdateAppConfig("exportPath", text_exportPath.Text.Trim()); + dictService.updateCounterIp(text_generatorIp.Text.Trim()); + + MessageBox.Show("保存成功!"); + } + catch(Exception ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "保存失败:"+ ex.Message); + MessageBox.Show("保存失败!"); + } + } + + private void btnCancel_Click(object sender, EventArgs e) + { + CounterParam counterParam = dictService.getCounterParam(); + text_generatorIp.Text = counterParam.GeneratorIp; + text_exportPath.Text = ConfigHelper.GetAppConfig("exportPath").ToString().Trim(); + } + + private void roundButton1_Click(object sender, EventArgs e) + { + initCheckParam(); + } + + private void roundButton2_Click(object sender, EventArgs e) + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + counterCheckParam.SoOutDelay = text_soOutDelay.Text; + counterCheckParam.SoEleFrequency = text_soEleFrequency.Text; + counterCheckParam.SoEleAlarm = text_soEleAlarm.Text ; + counterCheckParam.SoEleAddValue = text_soEleAddValue.Text ; + + counterCheckParam.FreThreshold1= text_freThreshold1.Text ; + counterCheckParam.FreThreshold2= text_freThreshold2.Text ; + counterCheckParam.FreEleAddValue= text_freEleAddValue.Text ; + + counterCheckParam.CycThreshold1= text_cycThreshold1.Text ; + counterCheckParam.CycThreshold2= text_cycThreshold2.Text ; + counterCheckParam.CycEleAddValue= text_cycEleAddValue.Text ; + + dictService.updateCheckParam(counterCheckParam); } } } diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs index 4051656..fdb2eb6 100644 --- a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs @@ -49,11 +49,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.panelBase = new System.Windows.Forms.Panel(); + this.label8 = new System.Windows.Forms.Label(); + this.label_clockStatus = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelBase = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.label_clockStatus = new System.Windows.Forms.Label(); this.panelLocation.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); @@ -92,10 +92,10 @@ // this.label13.BackColor = System.Drawing.Color.Transparent; this.label13.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label13.Location = new System.Drawing.Point(0, 220); + this.label13.Location = new System.Drawing.Point(38, 226); this.label13.Margin = new System.Windows.Forms.Padding(0); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(75, 25); + this.label13.Size = new System.Drawing.Size(57, 25); this.label13.TabIndex = 1; this.label13.Text = "Z:"; this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -104,10 +104,10 @@ // this.label12.BackColor = System.Drawing.Color.Transparent; this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(0, 180); + this.label12.Location = new System.Drawing.Point(34, 186); this.label12.Margin = new System.Windows.Forms.Padding(0); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(75, 25); + this.label12.Size = new System.Drawing.Size(61, 25); this.label12.TabIndex = 1; this.label12.Text = "Y:"; this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -116,10 +116,10 @@ // this.label11.BackColor = System.Drawing.Color.Transparent; this.label11.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label11.Location = new System.Drawing.Point(0, 140); + this.label11.Location = new System.Drawing.Point(31, 146); this.label11.Margin = new System.Windows.Forms.Padding(0); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(75, 25); + this.label11.Size = new System.Drawing.Size(64, 25); this.label11.TabIndex = 1; this.label11.Text = "X:"; this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -128,9 +128,9 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 60); + this.label9.Location = new System.Drawing.Point(34, 66); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(75, 25); + this.label9.Size = new System.Drawing.Size(61, 25); this.label9.TabIndex = 1; this.label9.Text = "经度:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -139,10 +139,10 @@ // this.label10.BackColor = System.Drawing.Color.Transparent; this.label10.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label10.Location = new System.Drawing.Point(0, 100); + this.label10.Location = new System.Drawing.Point(31, 106); this.label10.Margin = new System.Windows.Forms.Padding(0); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(75, 25); + this.label10.Size = new System.Drawing.Size(64, 25); this.label10.TabIndex = 1; this.label10.Text = "纬度:"; this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -211,6 +211,7 @@ // panelSite // this.panelSite.BackColor = System.Drawing.Color.Black; + this.panelSite.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelSite.Location = new System.Drawing.Point(113, 15); this.panelSite.Name = "panelSite"; this.panelSite.Size = new System.Drawing.Size(610, 610); @@ -252,7 +253,7 @@ // this.label7.BackColor = System.Drawing.Color.Transparent; this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(7, 137); + this.label7.Location = new System.Drawing.Point(20, 143); this.label7.Margin = new System.Windows.Forms.Padding(0); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(75, 25); @@ -264,7 +265,7 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(7, 97); + this.label6.Location = new System.Drawing.Point(20, 103); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(75, 25); this.label6.TabIndex = 1; @@ -275,7 +276,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(7, 57); + this.label1.Location = new System.Drawing.Point(20, 63); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(75, 25); this.label1.TabIndex = 1; @@ -296,11 +297,35 @@ this.panelBase.Size = new System.Drawing.Size(220, 156); this.panelBase.TabIndex = 3; // + // label8 + // + this.label8.BackColor = System.Drawing.Color.Transparent; + this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label8.ForeColor = System.Drawing.Color.Gray; + this.label8.Location = new System.Drawing.Point(99, 100); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(67, 25); + this.label8.TabIndex = 5; + this.label8.Text = "定位有效"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label_clockStatus + // + this.label_clockStatus.BackColor = System.Drawing.Color.Transparent; + this.label_clockStatus.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_clockStatus.ForeColor = System.Drawing.Color.Gray; + this.label_clockStatus.Location = new System.Drawing.Point(100, 59); + this.label_clockStatus.Name = "label_clockStatus"; + this.label_clockStatus.Size = new System.Drawing.Size(65, 25); + this.label_clockStatus.TabIndex = 4; + this.label_clockStatus.Text = "快锁"; + this.label_clockStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(7, 100); + this.label3.Location = new System.Drawing.Point(20, 100); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(75, 25); this.label3.TabIndex = 1; @@ -311,7 +336,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(7, 60); + this.label2.Location = new System.Drawing.Point(20, 60); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(75, 25); this.label2.TabIndex = 1; @@ -330,30 +355,6 @@ this.labelBase.Text = "基本信息"; this.labelBase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label8 - // - this.label8.BackColor = System.Drawing.Color.Transparent; - this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.ForeColor = System.Drawing.Color.Gray; - this.label8.Location = new System.Drawing.Point(86, 100); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(67, 25); - this.label8.TabIndex = 5; - this.label8.Text = "定位有效"; - this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label_clockStatus - // - this.label_clockStatus.BackColor = System.Drawing.Color.Transparent; - this.label_clockStatus.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_clockStatus.ForeColor = System.Drawing.Color.Gray; - this.label_clockStatus.Location = new System.Drawing.Point(87, 59); - this.label_clockStatus.Name = "label_clockStatus"; - this.label_clockStatus.Size = new System.Drawing.Size(65, 25); - this.label_clockStatus.TabIndex = 4; - this.label_clockStatus.Text = "快锁"; - this.label_clockStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // StatusCtrlForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/info/ageRate.cs b/RbFreqStandMeasure/info/ageRate.cs index 486f4a6..7529830 100644 --- a/RbFreqStandMeasure/info/ageRate.cs +++ b/RbFreqStandMeasure/info/ageRate.cs @@ -4,235 +4,28 @@ using System.Windows.Forms; using System.Drawing.Drawing2D; using Casic.Birmm.RbFreqStandMeasure.Properties; +using System.Data; +using System.Windows.Forms.DataVisualization.Charting; namespace Casic.Birmm.RbFreqStandMeasure { public partial class ageRate : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - - public ageRate() + + public ageRate(DataTable originData) { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - InitialCanvas(); + chart1.Series["Series1"].XValueMember = "时间"; + chart1.Series["Series1"].YValueMembers = "相对频率偏差"; + + //chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle; //线条上的数据点标志类型 + //chart1.Series["Series1"].MarkerSize = 3; //标志大小 + Series Series1 = new Series(); + chart1.Series.Add(Series1);//加入你的chart1 + chart1.DataSource = originData; + } - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 9c376de..3a62610 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -34,26 +34,31 @@ this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label_customerName = new System.Windows.Forms.Label(); - this.label_devModel = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label_devModel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(13, 81); + this.chart1.Location = new System.Drawing.Point(3, 67); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 238); + this.chart1.Size = new System.Drawing.Size(402, 176); this.chart1.TabIndex = 117; this.chart1.Text = "chart1"; // @@ -62,7 +67,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(380, 10); + this.label1.Location = new System.Drawing.Point(316, 8); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -74,7 +79,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(261, 10); + this.label4.Location = new System.Drawing.Point(197, 8); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(119, 27); @@ -87,32 +92,19 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(146, 42); + this.label_customerName.Location = new System.Drawing.Point(100, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); + this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label_devModel - // - this.label_devModel.BackColor = System.Drawing.Color.Transparent; - this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(146, 10); - this.label_devModel.Margin = new System.Windows.Forms.Padding(0); - this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; - this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(59, 42); + this.label2.Location = new System.Drawing.Point(13, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -120,24 +112,12 @@ this.label2.Text = "测量结果:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label9 - // - this.label9.BackColor = System.Drawing.Color.Transparent; - this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(10, 10); - this.label9.Margin = new System.Windows.Forms.Padding(0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 111; - this.label9.Text = "预热天数:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label3.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label3.Location = new System.Drawing.Point(380, 42); + this.label3.Location = new System.Drawing.Point(316, 35); this.label3.Margin = new System.Windows.Forms.Padding(0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); @@ -149,7 +129,7 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(293, 42); + this.label5.Location = new System.Drawing.Point(229, 35); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(87, 27); @@ -157,10 +137,34 @@ this.label5.Text = "标准偏差:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // label9 + // + this.label9.BackColor = System.Drawing.Color.Transparent; + this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(17, 8); + this.label9.Margin = new System.Windows.Forms.Padding(0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(83, 27); + this.label9.TabIndex = 111; + this.label9.Text = "预热天数:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label_devModel + // + this.label_devModel.BackColor = System.Drawing.Color.Transparent; + this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; + this.label_devModel.Location = new System.Drawing.Point(100, 8); + this.label_devModel.Margin = new System.Windows.Forms.Padding(0); + this.label_devModel.Name = "label_devModel"; + this.label_devModel.Size = new System.Drawing.Size(67, 27); + this.label_devModel.TabIndex = 113; + this.label_devModel.Text = "仪:"; + this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // ageRate // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.label3); this.Controls.Add(this.label5); @@ -172,10 +176,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "ageRate"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); @@ -187,10 +188,10 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label_customerName; - private System.Windows.Forms.Label label_devModel; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label_devModel; } } diff --git a/RbFreqStandMeasure/info/bootFeature.cs b/RbFreqStandMeasure/info/bootFeature.cs index 4063048..2cec888 100644 --- a/RbFreqStandMeasure/info/bootFeature.cs +++ b/RbFreqStandMeasure/info/bootFeature.cs @@ -9,230 +9,15 @@ { public partial class bootFeature : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } public bootFeature() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - + //设置背景颜色为透明 + this.BackColor = Color.Transparent; } + - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index a1fa758..133d6b5 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -42,16 +42,22 @@ // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 50); + this.chart1.Location = new System.Drawing.Point(3, 65); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; + series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.DateTime; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 265); + this.chart1.Size = new System.Drawing.Size(399, 178); this.chart1.TabIndex = 110; this.chart1.Text = "chart1"; // @@ -60,7 +66,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 6); + this.label1.Location = new System.Drawing.Point(294, 6); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -72,7 +78,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 6); + this.label4.Location = new System.Drawing.Point(207, 6); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -85,7 +91,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(455, 6); + this.label_customerName.Location = new System.Drawing.Point(106, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -98,7 +104,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 6); + this.label_devModel.Location = new System.Drawing.Point(106, 6); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -110,7 +116,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(368, 6); + this.label2.Location = new System.Drawing.Point(19, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -122,18 +128,17 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 6); + this.label9.Location = new System.Drawing.Point(22, 6); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); + this.label9.Size = new System.Drawing.Size(84, 27); this.label9.TabIndex = 100; this.label9.Text = "y(t)-Min:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // bootFeature // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.chart1); this.Controls.Add(this.label1); @@ -143,10 +148,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "bootFeature"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); diff --git a/RbFreqStandMeasure/info/stability.cs b/RbFreqStandMeasure/info/stability.cs index e42c91f..22e26df 100644 --- a/RbFreqStandMeasure/info/stability.cs +++ b/RbFreqStandMeasure/info/stability.cs @@ -12,227 +12,15 @@ private int x = 0; private int y = 0; - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - + public stability() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); + //设置背景颜色为透明 this.BackColor = Color.Transparent; - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } + } + } } diff --git a/RbFreqStandMeasure/info/stability.designer.cs b/RbFreqStandMeasure/info/stability.designer.cs index c8db121..0a6b17e 100644 --- a/RbFreqStandMeasure/info/stability.designer.cs +++ b/RbFreqStandMeasure/info/stability.designer.cs @@ -34,8 +34,6 @@ this.label9 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); // // label_customerName @@ -43,7 +41,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(452, 11); + this.label_customerName.Location = new System.Drawing.Point(197, 126); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -56,7 +54,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(122, 11); + this.label_devModel.Location = new System.Drawing.Point(197, 38); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -68,7 +66,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(365, 11); + this.label2.Location = new System.Drawing.Point(110, 126); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -80,10 +78,10 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(5, 11); + this.label9.Location = new System.Drawing.Point(114, 38); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(117, 27); + this.label9.Size = new System.Drawing.Size(83, 27); this.label9.TabIndex = 79; this.label9.Text = "测量结果:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -93,7 +91,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(282, 11); + this.label1.Location = new System.Drawing.Point(197, 82); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -105,7 +103,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(195, 11); + this.label4.Location = new System.Drawing.Point(110, 82); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -113,21 +111,10 @@ this.label4.Text = "标准偏差:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // dataGridView1 - // - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(16, 51); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(517, 261); - this.dataGridView1.TabIndex = 89; - // // stability // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.dataGridView1); this.Controls.Add(this.label1); this.Controls.Add(this.label4); this.Controls.Add(this.label_customerName); @@ -135,11 +122,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "stability"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } @@ -151,6 +134,5 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.DataGridView dataGridView1; } } diff --git a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs index cb453d7..d67b5a2 100644 --- a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs @@ -30,50 +30,50 @@ private void InitializeComponent() { this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.textBoxX3 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_generatorIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label4 = new System.Windows.Forms.Label(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_exportPath = new DevComponents.DotNetBar.Controls.TextBoxX(); this.button1 = new System.Windows.Forms.Button(); - this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.label12 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); - this.textBoxX8 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label20 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); - this.textBoxX12 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label22 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); - this.textBoxX13 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label13 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); - this.textBoxX9 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label16 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); - this.textBoxX10 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label18 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); - this.textBoxX11 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label11 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.textBoxX7 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleAlarm = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label8 = new System.Windows.Forms.Label(); - this.textBoxX6 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleFrequency = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label5 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soOutDelay = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -86,79 +86,53 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(247, 177); + this.label2.Location = new System.Drawing.Point(244, 243); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(150, 30); this.label2.TabIndex = 4; - this.label2.Text = "频率发生器IP:"; + this.label2.Text = "计数器IP:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(247, 237); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(150, 30); - this.label3.TabIndex = 4; - this.label3.Text = "频率信号源IP:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // textBoxX2 + // text_generatorIp // // // // - this.textBoxX2.Border.Class = "TextBoxBorder"; - this.textBoxX2.Border.CornerDiameter = 5; - this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX2.Location = new System.Drawing.Point(437, 177); - this.textBoxX2.Name = "textBoxX2"; - this.textBoxX2.PreventEnterBeep = true; - this.textBoxX2.Size = new System.Drawing.Size(250, 29); - this.textBoxX2.TabIndex = 5; - // - // textBoxX3 - // - // - // - // - this.textBoxX3.Border.Class = "TextBoxBorder"; - this.textBoxX3.Border.CornerDiameter = 5; - this.textBoxX3.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX3.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX3.Location = new System.Drawing.Point(437, 237); - this.textBoxX3.Name = "textBoxX3"; - this.textBoxX3.PreventEnterBeep = true; - this.textBoxX3.Size = new System.Drawing.Size(250, 29); - this.textBoxX3.TabIndex = 6; + this.text_generatorIp.Border.Class = "TextBoxBorder"; + this.text_generatorIp.Border.CornerDiameter = 5; + this.text_generatorIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_generatorIp.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_generatorIp.Location = new System.Drawing.Point(400, 243); + this.text_generatorIp.Name = "text_generatorIp"; + this.text_generatorIp.PreventEnterBeep = true; + this.text_generatorIp.Size = new System.Drawing.Size(326, 29); + this.text_generatorIp.TabIndex = 5; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(221, 121); + this.label4.Location = new System.Drawing.Point(218, 153); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(176, 30); this.label4.TabIndex = 4; - this.label4.Text = "数据默认存放路径:"; + this.label4.Text = "数据默认导出路径:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX4 + // text_exportPath // // // // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(437, 121); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(250, 29); - this.textBoxX4.TabIndex = 2; + this.text_exportPath.Border.Class = "TextBoxBorder"; + this.text_exportPath.Border.CornerDiameter = 5; + this.text_exportPath.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_exportPath.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_exportPath.Location = new System.Drawing.Point(400, 153); + this.text_exportPath.Name = "text_exportPath"; + this.text_exportPath.PreventEnterBeep = true; + this.text_exportPath.Size = new System.Drawing.Size(326, 29); + this.text_exportPath.TabIndex = 2; // // button1 // @@ -166,56 +140,12 @@ this.button1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.path; this.button1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Location = new System.Drawing.Point(691, 121); + this.button1.Location = new System.Drawing.Point(739, 153); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(35, 28); this.button1.TabIndex = 7; this.button1.UseVisualStyleBackColor = false; // - // btnSave - // - this.btnSave.EnterBackColor = System.Drawing.Color.Blue; - this.btnSave.EnterForeColor = System.Drawing.Color.White; - this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnSave.FlatAppearance.BorderSize = 0; - this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); - this.btnSave.HoverForeColor = System.Drawing.Color.White; - this.btnSave.Location = new System.Drawing.Point(504, 377); - this.btnSave.Name = "btnSave"; - this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnSave.PressForeColor = System.Drawing.Color.White; - this.btnSave.Radius = 5; - this.btnSave.Size = new System.Drawing.Size(150, 30); - this.btnSave.TabIndex = 0; - this.btnSave.Text = "保存设置"; - this.btnSave.UseVisualStyleBackColor = true; - // - // btnCancel - // - this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; - this.btnCancel.EnterForeColor = System.Drawing.Color.White; - this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnCancel.FlatAppearance.BorderSize = 0; - this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.btnCancel.HoverForeColor = System.Drawing.Color.White; - this.btnCancel.Location = new System.Drawing.Point(314, 377); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnCancel.PressForeColor = System.Drawing.Color.White; - this.btnCancel.Radius = 5; - this.btnCancel.Size = new System.Drawing.Size(150, 30); - this.btnCancel.TabIndex = 0; - this.btnCancel.Text = "放弃修改"; - this.btnCancel.UseVisualStyleBackColor = true; - // // tabControl1 // this.tabControl1.Controls.Add(this.tabPage1); @@ -232,11 +162,9 @@ this.tabPage1.Controls.Add(this.label4); this.tabPage1.Controls.Add(this.button1); this.tabPage1.Controls.Add(this.btnCancel); - this.tabPage1.Controls.Add(this.textBoxX3); this.tabPage1.Controls.Add(this.btnSave); - this.tabPage1.Controls.Add(this.textBoxX2); - this.tabPage1.Controls.Add(this.textBoxX4); - this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.text_generatorIp); + this.tabPage1.Controls.Add(this.text_exportPath); this.tabPage1.Controls.Add(this.label2); this.tabPage1.Location = new System.Drawing.Point(4, 29); this.tabPage1.Name = "tabPage1"; @@ -248,6 +176,8 @@ // // tabPage2 // + this.tabPage2.Controls.Add(this.roundButton1); + this.tabPage2.Controls.Add(this.roundButton2); this.tabPage2.Controls.Add(this.groupBox3); this.tabPage2.Controls.Add(this.groupBox2); this.tabPage2.Controls.Add(this.groupBox1); @@ -263,16 +193,16 @@ // this.groupBox3.Controls.Add(this.label12); this.groupBox3.Controls.Add(this.label14); - this.groupBox3.Controls.Add(this.textBoxX8); + this.groupBox3.Controls.Add(this.text_cycEleAddValue); this.groupBox3.Controls.Add(this.label20); this.groupBox3.Controls.Add(this.label21); - this.groupBox3.Controls.Add(this.textBoxX12); + this.groupBox3.Controls.Add(this.text_cycThreshold2); this.groupBox3.Controls.Add(this.label22); this.groupBox3.Controls.Add(this.label23); - this.groupBox3.Controls.Add(this.textBoxX13); - this.groupBox3.Location = new System.Drawing.Point(31, 373); + this.groupBox3.Controls.Add(this.text_cycThreshold1); + this.groupBox3.Location = new System.Drawing.Point(31, 336); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(904, 162); + this.groupBox3.Size = new System.Drawing.Size(904, 140); this.groupBox3.TabIndex = 18; this.groupBox3.TabStop = false; this.groupBox3.Text = "周期灵敏度"; @@ -281,7 +211,7 @@ // this.label12.BackColor = System.Drawing.Color.Transparent; this.label12.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(372, 97); + this.label12.Location = new System.Drawing.Point(372, 91); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(45, 30); this.label12.TabIndex = 15; @@ -292,33 +222,33 @@ // this.label14.BackColor = System.Drawing.Color.Transparent; this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label14.Location = new System.Drawing.Point(30, 97); + this.label14.Location = new System.Drawing.Point(30, 91); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(159, 30); this.label14.TabIndex = 12; this.label14.Text = "测量误差电平增加值:"; this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX8 + // text_cycEleAddValue // // // // - this.textBoxX8.Border.Class = "TextBoxBorder"; - this.textBoxX8.Border.CornerDiameter = 5; - this.textBoxX8.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX8.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX8.Location = new System.Drawing.Point(195, 97); - this.textBoxX8.Name = "textBoxX8"; - this.textBoxX8.PreventEnterBeep = true; - this.textBoxX8.Size = new System.Drawing.Size(168, 29); - this.textBoxX8.TabIndex = 11; + this.text_cycEleAddValue.Border.Class = "TextBoxBorder"; + this.text_cycEleAddValue.Border.CornerDiameter = 5; + this.text_cycEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycEleAddValue.Location = new System.Drawing.Point(195, 91); + this.text_cycEleAddValue.Name = "text_cycEleAddValue"; + this.text_cycEleAddValue.PreventEnterBeep = true; + this.text_cycEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_cycEleAddValue.TabIndex = 11; // // label20 // this.label20.BackColor = System.Drawing.Color.Transparent; this.label20.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label20.Location = new System.Drawing.Point(786, 39); + this.label20.Location = new System.Drawing.Point(803, 39); this.label20.Name = "label20"; this.label20.Size = new System.Drawing.Size(45, 30); this.label20.TabIndex = 10; @@ -329,27 +259,27 @@ // this.label21.BackColor = System.Drawing.Color.Transparent; this.label21.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label21.Location = new System.Drawing.Point(444, 41); + this.label21.Location = new System.Drawing.Point(461, 41); this.label21.Name = "label21"; this.label21.Size = new System.Drawing.Size(159, 30); this.label21.TabIndex = 9; this.label21.Text = "周期差值>80MHz:"; this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX12 + // text_cycThreshold2 // // // // - this.textBoxX12.Border.Class = "TextBoxBorder"; - this.textBoxX12.Border.CornerDiameter = 5; - this.textBoxX12.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX12.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX12.Location = new System.Drawing.Point(609, 41); - this.textBoxX12.Name = "textBoxX12"; - this.textBoxX12.PreventEnterBeep = true; - this.textBoxX12.Size = new System.Drawing.Size(168, 29); - this.textBoxX12.TabIndex = 8; + this.text_cycThreshold2.Border.Class = "TextBoxBorder"; + this.text_cycThreshold2.Border.CornerDiameter = 5; + this.text_cycThreshold2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycThreshold2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycThreshold2.Location = new System.Drawing.Point(626, 41); + this.text_cycThreshold2.Name = "text_cycThreshold2"; + this.text_cycThreshold2.PreventEnterBeep = true; + this.text_cycThreshold2.Size = new System.Drawing.Size(168, 29); + this.text_cycThreshold2.TabIndex = 8; // // label22 // @@ -373,35 +303,35 @@ this.label23.Text = "周期差值<=80MHz:"; this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX13 + // text_cycThreshold1 // // // // - this.textBoxX13.Border.Class = "TextBoxBorder"; - this.textBoxX13.Border.CornerDiameter = 5; - this.textBoxX13.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX13.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX13.Location = new System.Drawing.Point(195, 45); - this.textBoxX13.Name = "textBoxX13"; - this.textBoxX13.PreventEnterBeep = true; - this.textBoxX13.Size = new System.Drawing.Size(168, 29); - this.textBoxX13.TabIndex = 5; + this.text_cycThreshold1.Border.Class = "TextBoxBorder"; + this.text_cycThreshold1.Border.CornerDiameter = 5; + this.text_cycThreshold1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycThreshold1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycThreshold1.Location = new System.Drawing.Point(195, 45); + this.text_cycThreshold1.Name = "text_cycThreshold1"; + this.text_cycThreshold1.PreventEnterBeep = true; + this.text_cycThreshold1.Size = new System.Drawing.Size(168, 29); + this.text_cycThreshold1.TabIndex = 5; // // groupBox2 // this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); - this.groupBox2.Controls.Add(this.textBoxX9); + this.groupBox2.Controls.Add(this.text_freEleAddValue); this.groupBox2.Controls.Add(this.label16); this.groupBox2.Controls.Add(this.label17); - this.groupBox2.Controls.Add(this.textBoxX10); + this.groupBox2.Controls.Add(this.text_freThreshold2); this.groupBox2.Controls.Add(this.label18); this.groupBox2.Controls.Add(this.label19); - this.groupBox2.Controls.Add(this.textBoxX11); - this.groupBox2.Location = new System.Drawing.Point(31, 194); + this.groupBox2.Controls.Add(this.text_freThreshold1); + this.groupBox2.Location = new System.Drawing.Point(31, 177); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(904, 162); + this.groupBox2.Size = new System.Drawing.Size(904, 147); this.groupBox2.TabIndex = 17; this.groupBox2.TabStop = false; this.groupBox2.Text = "频率灵敏度"; @@ -410,7 +340,7 @@ // this.label13.BackColor = System.Drawing.Color.Transparent; this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label13.Location = new System.Drawing.Point(372, 97); + this.label13.Location = new System.Drawing.Point(372, 91); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(45, 30); this.label13.TabIndex = 15; @@ -421,33 +351,33 @@ // this.label15.BackColor = System.Drawing.Color.Transparent; this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label15.Location = new System.Drawing.Point(30, 97); + this.label15.Location = new System.Drawing.Point(30, 91); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(159, 30); this.label15.TabIndex = 12; this.label15.Text = "测量误差电平增加值:"; this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX9 + // text_freEleAddValue // // // // - this.textBoxX9.Border.Class = "TextBoxBorder"; - this.textBoxX9.Border.CornerDiameter = 5; - this.textBoxX9.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX9.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX9.Location = new System.Drawing.Point(195, 97); - this.textBoxX9.Name = "textBoxX9"; - this.textBoxX9.PreventEnterBeep = true; - this.textBoxX9.Size = new System.Drawing.Size(168, 29); - this.textBoxX9.TabIndex = 11; + this.text_freEleAddValue.Border.Class = "TextBoxBorder"; + this.text_freEleAddValue.Border.CornerDiameter = 5; + this.text_freEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freEleAddValue.Location = new System.Drawing.Point(195, 91); + this.text_freEleAddValue.Name = "text_freEleAddValue"; + this.text_freEleAddValue.PreventEnterBeep = true; + this.text_freEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_freEleAddValue.TabIndex = 11; // // label16 // this.label16.BackColor = System.Drawing.Color.Transparent; this.label16.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label16.Location = new System.Drawing.Point(786, 39); + this.label16.Location = new System.Drawing.Point(801, 39); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(45, 30); this.label16.TabIndex = 10; @@ -458,27 +388,27 @@ // this.label17.BackColor = System.Drawing.Color.Transparent; this.label17.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label17.Location = new System.Drawing.Point(444, 41); + this.label17.Location = new System.Drawing.Point(459, 41); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(159, 30); this.label17.TabIndex = 9; this.label17.Text = "频率差值>80MHz:"; this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX10 + // text_freThreshold2 // // // // - this.textBoxX10.Border.Class = "TextBoxBorder"; - this.textBoxX10.Border.CornerDiameter = 5; - this.textBoxX10.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX10.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX10.Location = new System.Drawing.Point(609, 41); - this.textBoxX10.Name = "textBoxX10"; - this.textBoxX10.PreventEnterBeep = true; - this.textBoxX10.Size = new System.Drawing.Size(168, 29); - this.textBoxX10.TabIndex = 8; + this.text_freThreshold2.Border.Class = "TextBoxBorder"; + this.text_freThreshold2.Border.CornerDiameter = 5; + this.text_freThreshold2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freThreshold2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freThreshold2.Location = new System.Drawing.Point(624, 41); + this.text_freThreshold2.Name = "text_freThreshold2"; + this.text_freThreshold2.PreventEnterBeep = true; + this.text_freThreshold2.Size = new System.Drawing.Size(168, 29); + this.text_freThreshold2.TabIndex = 8; // // label18 // @@ -502,38 +432,38 @@ this.label19.Text = "频率差值<=80MHz:"; this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX11 + // text_freThreshold1 // // // // - this.textBoxX11.Border.Class = "TextBoxBorder"; - this.textBoxX11.Border.CornerDiameter = 5; - this.textBoxX11.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX11.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX11.Location = new System.Drawing.Point(195, 45); - this.textBoxX11.Name = "textBoxX11"; - this.textBoxX11.PreventEnterBeep = true; - this.textBoxX11.Size = new System.Drawing.Size(168, 29); - this.textBoxX11.TabIndex = 5; + this.text_freThreshold1.Border.Class = "TextBoxBorder"; + this.text_freThreshold1.Border.CornerDiameter = 5; + this.text_freThreshold1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freThreshold1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freThreshold1.Location = new System.Drawing.Point(195, 45); + this.text_freThreshold1.Name = "text_freThreshold1"; + this.text_freThreshold1.PreventEnterBeep = true; + this.text_freThreshold1.Size = new System.Drawing.Size(168, 29); + this.text_freThreshold1.TabIndex = 5; // // groupBox1 // this.groupBox1.Controls.Add(this.label11); this.groupBox1.Controls.Add(this.label10); this.groupBox1.Controls.Add(this.label9); - this.groupBox1.Controls.Add(this.textBoxX7); + this.groupBox1.Controls.Add(this.text_soEleAlarm); this.groupBox1.Controls.Add(this.label8); - this.groupBox1.Controls.Add(this.textBoxX6); + this.groupBox1.Controls.Add(this.text_soEleAddValue); this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label7); - this.groupBox1.Controls.Add(this.textBoxX5); + this.groupBox1.Controls.Add(this.text_soEleFrequency); this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Controls.Add(this.textBoxX1); + this.groupBox1.Controls.Add(this.text_soOutDelay); this.groupBox1.Location = new System.Drawing.Point(31, 18); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(904, 162); + this.groupBox1.Size = new System.Drawing.Size(904, 145); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "电平参数"; @@ -542,7 +472,7 @@ // this.label11.BackColor = System.Drawing.Color.Transparent; this.label11.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label11.Location = new System.Drawing.Point(786, 97); + this.label11.Location = new System.Drawing.Point(801, 89); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(45, 30); this.label11.TabIndex = 16; @@ -553,7 +483,7 @@ // this.label10.BackColor = System.Drawing.Color.Transparent; this.label10.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label10.Location = new System.Drawing.Point(372, 97); + this.label10.Location = new System.Drawing.Point(372, 89); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(45, 30); this.label10.TabIndex = 15; @@ -564,59 +494,59 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(444, 97); + this.label9.Location = new System.Drawing.Point(459, 89); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(159, 30); this.label9.TabIndex = 14; this.label9.Text = "输出电平警告值:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX7 + // text_soEleAlarm // // // // - this.textBoxX7.Border.Class = "TextBoxBorder"; - this.textBoxX7.Border.CornerDiameter = 5; - this.textBoxX7.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX7.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX7.Location = new System.Drawing.Point(609, 97); - this.textBoxX7.Name = "textBoxX7"; - this.textBoxX7.PreventEnterBeep = true; - this.textBoxX7.Size = new System.Drawing.Size(168, 29); - this.textBoxX7.TabIndex = 13; + this.text_soEleAlarm.Border.Class = "TextBoxBorder"; + this.text_soEleAlarm.Border.CornerDiameter = 5; + this.text_soEleAlarm.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleAlarm.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleAlarm.Location = new System.Drawing.Point(624, 89); + this.text_soEleAlarm.Name = "text_soEleAlarm"; + this.text_soEleAlarm.PreventEnterBeep = true; + this.text_soEleAlarm.Size = new System.Drawing.Size(168, 29); + this.text_soEleAlarm.TabIndex = 13; // // label8 // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(30, 97); + this.label8.Location = new System.Drawing.Point(30, 89); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(159, 30); this.label8.TabIndex = 12; this.label8.Text = "信号源电平增加值:"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX6 + // text_soEleAddValue // // // // - this.textBoxX6.Border.Class = "TextBoxBorder"; - this.textBoxX6.Border.CornerDiameter = 5; - this.textBoxX6.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX6.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX6.Location = new System.Drawing.Point(195, 97); - this.textBoxX6.Name = "textBoxX6"; - this.textBoxX6.PreventEnterBeep = true; - this.textBoxX6.Size = new System.Drawing.Size(168, 29); - this.textBoxX6.TabIndex = 11; + this.text_soEleAddValue.Border.Class = "TextBoxBorder"; + this.text_soEleAddValue.Border.CornerDiameter = 5; + this.text_soEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleAddValue.Location = new System.Drawing.Point(195, 89); + this.text_soEleAddValue.Name = "text_soEleAddValue"; + this.text_soEleAddValue.PreventEnterBeep = true; + this.text_soEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_soEleAddValue.TabIndex = 11; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(786, 39); + this.label6.Location = new System.Drawing.Point(801, 39); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(45, 30); this.label6.TabIndex = 10; @@ -627,27 +557,27 @@ // this.label7.BackColor = System.Drawing.Color.Transparent; this.label7.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(444, 41); + this.label7.Location = new System.Drawing.Point(459, 41); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(159, 30); this.label7.TabIndex = 9; this.label7.Text = "信号源初始电平:"; this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX5 + // text_soEleFrequency // // // // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(609, 41); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(168, 29); - this.textBoxX5.TabIndex = 8; + this.text_soEleFrequency.Border.Class = "TextBoxBorder"; + this.text_soEleFrequency.Border.CornerDiameter = 5; + this.text_soEleFrequency.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleFrequency.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleFrequency.Location = new System.Drawing.Point(624, 41); + this.text_soEleFrequency.Name = "text_soEleFrequency"; + this.text_soEleFrequency.PreventEnterBeep = true; + this.text_soEleFrequency.Size = new System.Drawing.Size(168, 29); + this.text_soEleFrequency.TabIndex = 8; // // label5 // @@ -671,20 +601,112 @@ this.label1.Text = "信号源输出延时:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX1 + // text_soOutDelay // // // // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX1.Location = new System.Drawing.Point(195, 45); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(168, 29); - this.textBoxX1.TabIndex = 5; + this.text_soOutDelay.Border.Class = "TextBoxBorder"; + this.text_soOutDelay.Border.CornerDiameter = 5; + this.text_soOutDelay.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soOutDelay.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soOutDelay.Location = new System.Drawing.Point(195, 45); + this.text_soOutDelay.Name = "text_soOutDelay"; + this.text_soOutDelay.PreventEnterBeep = true; + this.text_soOutDelay.Size = new System.Drawing.Size(168, 29); + this.text_soOutDelay.TabIndex = 5; + // + // btnCancel + // + this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancel.EnterForeColor = System.Drawing.Color.White; + this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancel.FlatAppearance.BorderSize = 0; + this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancel.HoverForeColor = System.Drawing.Color.White; + this.btnCancel.Location = new System.Drawing.Point(314, 396); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancel.PressForeColor = System.Drawing.Color.White; + this.btnCancel.Radius = 5; + this.btnCancel.Size = new System.Drawing.Size(150, 30); + this.btnCancel.TabIndex = 0; + this.btnCancel.Text = "放弃修改"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(504, 396); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(150, 30); + this.btnSave.TabIndex = 0; + this.btnSave.Text = "保存设置"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // roundButton1 + // + this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton1.EnterForeColor = System.Drawing.Color.White; + this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton1.FlatAppearance.BorderSize = 0; + this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.roundButton1.HoverForeColor = System.Drawing.Color.White; + this.roundButton1.Location = new System.Drawing.Point(337, 510); + this.roundButton1.Name = "roundButton1"; + this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton1.PressForeColor = System.Drawing.Color.White; + this.roundButton1.Radius = 5; + this.roundButton1.Size = new System.Drawing.Size(150, 30); + this.roundButton1.TabIndex = 19; + this.roundButton1.Text = "放弃修改"; + this.roundButton1.UseVisualStyleBackColor = true; + this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click); + // + // roundButton2 + // + this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton2.EnterForeColor = System.Drawing.Color.White; + this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton2.FlatAppearance.BorderSize = 0; + this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.roundButton2.HoverForeColor = System.Drawing.Color.White; + this.roundButton2.Location = new System.Drawing.Point(527, 510); + this.roundButton2.Name = "roundButton2"; + this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton2.PressForeColor = System.Drawing.Color.White; + this.roundButton2.Radius = 5; + this.roundButton2.Size = new System.Drawing.Size(150, 30); + this.roundButton2.TabIndex = 20; + this.roundButton2.Text = "保存设置"; + this.roundButton2.UseVisualStyleBackColor = true; + this.roundButton2.Click += new System.EventHandler(this.roundButton2_Click); // // SettingCtrlForm // @@ -713,11 +735,9 @@ private RoundButton btnCancel; private RoundButton btnSave; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX3; + private DevComponents.DotNetBar.Controls.TextBoxX text_generatorIp; private System.Windows.Forms.Label label4; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private DevComponents.DotNetBar.Controls.TextBoxX text_exportPath; private System.Windows.Forms.Button button1; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; @@ -725,35 +745,37 @@ private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label14; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX8; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycEleAddValue; private System.Windows.Forms.Label label20; private System.Windows.Forms.Label label21; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX12; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold2; private System.Windows.Forms.Label label22; private System.Windows.Forms.Label label23; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX13; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold1; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label15; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX9; + private DevComponents.DotNetBar.Controls.TextBoxX text_freEleAddValue; private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label17; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX10; + private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold2; private System.Windows.Forms.Label label18; private System.Windows.Forms.Label label19; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX11; + private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold1; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label9; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX7; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleAlarm; private System.Windows.Forms.Label label8; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX6; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleAddValue; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label7; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleFrequency; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label1; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; + private DevComponents.DotNetBar.Controls.TextBoxX text_soOutDelay; + private RoundButton roundButton1; + private RoundButton roundButton2; } } diff --git a/RbFreqStandMeasure/setting/SettingCtrlForm.cs b/RbFreqStandMeasure/setting/SettingCtrlForm.cs index 11b3bba..220e58e 100644 --- a/RbFreqStandMeasure/setting/SettingCtrlForm.cs +++ b/RbFreqStandMeasure/setting/SettingCtrlForm.cs @@ -1,9 +1,14 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; +using System.Reflection; using System.Text; using System.Windows.Forms; @@ -11,9 +16,92 @@ { public partial class SettingCtrlForm : UserControl { + DictService dictService = new DictServiceImpl(); + //CounterParam + public SettingCtrlForm() { InitializeComponent(); + + CounterParam counterParam = dictService.getCounterParam(); + text_generatorIp.Text = counterParam.GeneratorIp; + text_exportPath.Text = ConfigHelper.GetAppConfig("exportPath").ToString().Trim() ; + initCheckParam(); + } + + private void initCheckParam() + { + CounterCheckParam counterCheckParam = dictService.getCounterCheckParam(); + text_soOutDelay.Text = counterCheckParam.SoOutDelay; + text_soEleFrequency.Text = counterCheckParam.SoEleFrequency; + text_soEleAlarm.Text = counterCheckParam.SoEleAlarm; + text_soEleAddValue.Text = counterCheckParam.SoEleAddValue; + + text_freThreshold1.Text = counterCheckParam.FreThreshold1; + text_freThreshold2.Text = counterCheckParam.FreThreshold2; + text_freEleAddValue.Text = counterCheckParam.FreEleAddValue; + + text_cycThreshold1.Text = counterCheckParam.CycThreshold1; + text_cycThreshold2.Text = counterCheckParam.CycThreshold2; + text_cycEleAddValue.Text = counterCheckParam.CycEleAddValue; + + } + + private void btnSave_Click(object sender, EventArgs e) + { + try + { + if (text_generatorIp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入计数器IP"); + return; + } + if (text_exportPath.Text.Trim().Equals("")) + { + MessageBox.Show("请输入数据导出默认路径"); + return; + } + ConfigHelper.UpdateAppConfig("exportPath", text_exportPath.Text.Trim()); + dictService.updateCounterIp(text_generatorIp.Text.Trim()); + + MessageBox.Show("保存成功!"); + } + catch(Exception ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "保存失败:"+ ex.Message); + MessageBox.Show("保存失败!"); + } + } + + private void btnCancel_Click(object sender, EventArgs e) + { + CounterParam counterParam = dictService.getCounterParam(); + text_generatorIp.Text = counterParam.GeneratorIp; + text_exportPath.Text = ConfigHelper.GetAppConfig("exportPath").ToString().Trim(); + } + + private void roundButton1_Click(object sender, EventArgs e) + { + initCheckParam(); + } + + private void roundButton2_Click(object sender, EventArgs e) + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + counterCheckParam.SoOutDelay = text_soOutDelay.Text; + counterCheckParam.SoEleFrequency = text_soEleFrequency.Text; + counterCheckParam.SoEleAlarm = text_soEleAlarm.Text ; + counterCheckParam.SoEleAddValue = text_soEleAddValue.Text ; + + counterCheckParam.FreThreshold1= text_freThreshold1.Text ; + counterCheckParam.FreThreshold2= text_freThreshold2.Text ; + counterCheckParam.FreEleAddValue= text_freEleAddValue.Text ; + + counterCheckParam.CycThreshold1= text_cycThreshold1.Text ; + counterCheckParam.CycThreshold2= text_cycThreshold2.Text ; + counterCheckParam.CycEleAddValue= text_cycEleAddValue.Text ; + + dictService.updateCheckParam(counterCheckParam); } } } diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs index 4051656..fdb2eb6 100644 --- a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs @@ -49,11 +49,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.panelBase = new System.Windows.Forms.Panel(); + this.label8 = new System.Windows.Forms.Label(); + this.label_clockStatus = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelBase = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.label_clockStatus = new System.Windows.Forms.Label(); this.panelLocation.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); @@ -92,10 +92,10 @@ // this.label13.BackColor = System.Drawing.Color.Transparent; this.label13.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label13.Location = new System.Drawing.Point(0, 220); + this.label13.Location = new System.Drawing.Point(38, 226); this.label13.Margin = new System.Windows.Forms.Padding(0); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(75, 25); + this.label13.Size = new System.Drawing.Size(57, 25); this.label13.TabIndex = 1; this.label13.Text = "Z:"; this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -104,10 +104,10 @@ // this.label12.BackColor = System.Drawing.Color.Transparent; this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(0, 180); + this.label12.Location = new System.Drawing.Point(34, 186); this.label12.Margin = new System.Windows.Forms.Padding(0); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(75, 25); + this.label12.Size = new System.Drawing.Size(61, 25); this.label12.TabIndex = 1; this.label12.Text = "Y:"; this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -116,10 +116,10 @@ // this.label11.BackColor = System.Drawing.Color.Transparent; this.label11.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label11.Location = new System.Drawing.Point(0, 140); + this.label11.Location = new System.Drawing.Point(31, 146); this.label11.Margin = new System.Windows.Forms.Padding(0); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(75, 25); + this.label11.Size = new System.Drawing.Size(64, 25); this.label11.TabIndex = 1; this.label11.Text = "X:"; this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -128,9 +128,9 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 60); + this.label9.Location = new System.Drawing.Point(34, 66); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(75, 25); + this.label9.Size = new System.Drawing.Size(61, 25); this.label9.TabIndex = 1; this.label9.Text = "经度:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -139,10 +139,10 @@ // this.label10.BackColor = System.Drawing.Color.Transparent; this.label10.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label10.Location = new System.Drawing.Point(0, 100); + this.label10.Location = new System.Drawing.Point(31, 106); this.label10.Margin = new System.Windows.Forms.Padding(0); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(75, 25); + this.label10.Size = new System.Drawing.Size(64, 25); this.label10.TabIndex = 1; this.label10.Text = "纬度:"; this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -211,6 +211,7 @@ // panelSite // this.panelSite.BackColor = System.Drawing.Color.Black; + this.panelSite.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelSite.Location = new System.Drawing.Point(113, 15); this.panelSite.Name = "panelSite"; this.panelSite.Size = new System.Drawing.Size(610, 610); @@ -252,7 +253,7 @@ // this.label7.BackColor = System.Drawing.Color.Transparent; this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(7, 137); + this.label7.Location = new System.Drawing.Point(20, 143); this.label7.Margin = new System.Windows.Forms.Padding(0); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(75, 25); @@ -264,7 +265,7 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(7, 97); + this.label6.Location = new System.Drawing.Point(20, 103); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(75, 25); this.label6.TabIndex = 1; @@ -275,7 +276,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(7, 57); + this.label1.Location = new System.Drawing.Point(20, 63); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(75, 25); this.label1.TabIndex = 1; @@ -296,11 +297,35 @@ this.panelBase.Size = new System.Drawing.Size(220, 156); this.panelBase.TabIndex = 3; // + // label8 + // + this.label8.BackColor = System.Drawing.Color.Transparent; + this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label8.ForeColor = System.Drawing.Color.Gray; + this.label8.Location = new System.Drawing.Point(99, 100); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(67, 25); + this.label8.TabIndex = 5; + this.label8.Text = "定位有效"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label_clockStatus + // + this.label_clockStatus.BackColor = System.Drawing.Color.Transparent; + this.label_clockStatus.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_clockStatus.ForeColor = System.Drawing.Color.Gray; + this.label_clockStatus.Location = new System.Drawing.Point(100, 59); + this.label_clockStatus.Name = "label_clockStatus"; + this.label_clockStatus.Size = new System.Drawing.Size(65, 25); + this.label_clockStatus.TabIndex = 4; + this.label_clockStatus.Text = "快锁"; + this.label_clockStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(7, 100); + this.label3.Location = new System.Drawing.Point(20, 100); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(75, 25); this.label3.TabIndex = 1; @@ -311,7 +336,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(7, 60); + this.label2.Location = new System.Drawing.Point(20, 60); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(75, 25); this.label2.TabIndex = 1; @@ -330,30 +355,6 @@ this.labelBase.Text = "基本信息"; this.labelBase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label8 - // - this.label8.BackColor = System.Drawing.Color.Transparent; - this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.ForeColor = System.Drawing.Color.Gray; - this.label8.Location = new System.Drawing.Point(86, 100); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(67, 25); - this.label8.TabIndex = 5; - this.label8.Text = "定位有效"; - this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label_clockStatus - // - this.label_clockStatus.BackColor = System.Drawing.Color.Transparent; - this.label_clockStatus.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_clockStatus.ForeColor = System.Drawing.Color.Gray; - this.label_clockStatus.Location = new System.Drawing.Point(87, 59); - this.label_clockStatus.Name = "label_clockStatus"; - this.label_clockStatus.Size = new System.Drawing.Size(65, 25); - this.label_clockStatus.TabIndex = 4; - this.label_clockStatus.Text = "快锁"; - this.label_clockStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // StatusCtrlForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.cs b/RbFreqStandMeasure/status/StatusCtrlForm.cs index 2c9cd2c..2337d58 100644 --- a/RbFreqStandMeasure/status/StatusCtrlForm.cs +++ b/RbFreqStandMeasure/status/StatusCtrlForm.cs @@ -15,9 +15,10 @@ { InitializeComponent(); - Coordinate coo = new Coordinate(); - panelSite.Controls.Add(coo); - coo.Show(); + //panelSite.BackgroundImage = Properties.Resources.地球; + //Coordinate coo = new Coordinate(); + //panelSite.Controls.Add(coo); + //coo.Show(); } } } diff --git a/RbFreqStandMeasure/App.config b/RbFreqStandMeasure/App.config index 24a9a22..234e3f1 100644 --- a/RbFreqStandMeasure/App.config +++ b/RbFreqStandMeasure/App.config @@ -8,6 +8,8 @@ + + @@ -20,6 +22,9 @@ + + + diff --git a/RbFreqStandMeasure/DataBackupDlg.Designer.cs b/RbFreqStandMeasure/DataBackupDlg.Designer.cs index 337dfe3..1f294ee 100644 --- a/RbFreqStandMeasure/DataBackupDlg.Designer.cs +++ b/RbFreqStandMeasure/DataBackupDlg.Designer.cs @@ -76,7 +76,7 @@ // this.panel1.Controls.Add(this.rdDataBackup); this.panel1.Controls.Add(this.rdDataRecover); - this.panel1.Location = new System.Drawing.Point(35, 40); + this.panel1.Location = new System.Drawing.Point(35, 50); this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(483, 61); @@ -131,7 +131,7 @@ this.btn_save.Radius = 5; this.btn_save.Size = new System.Drawing.Size(116, 30); this.btn_save.TabIndex = 15; - this.btn_save.Text = "确定"; + this.btn_save.Text = "开始备份"; this.btn_save.UseVisualStyleBackColor = true; this.btn_save.Click += new System.EventHandler(this.btn_save_Click); // @@ -215,6 +215,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(533, 394); this.ControlBox = false; this.Controls.Add(this.panel2); diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs index 973dc0f..40a5682 100644 --- a/RbFreqStandMeasure/DataBackupDlg.cs +++ b/RbFreqStandMeasure/DataBackupDlg.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,6 +39,14 @@ private void btn_save_Click(object sender, EventArgs e) { + if (rdDataBackup.Checked) + { + DataHelper.Backup(textBoxX1.Text); + } + else if (rdDataRecover.Checked) + { + DataHelper.Restore(textBoxX1.Text); + } this.HideMaskAction(); } @@ -46,8 +55,13 @@ if (rdDataRecover.Checked) { labelX1.Text = "请选择文件进行还原:"; + btn_save.Text = "开始还原"; } - else labelX1.Text = "请选择备份文件存放路径:"; + else + { + labelX1.Text = "请选择备份文件存放路径:"; + btn_save.Text = "开始备份"; + } } private void button1_Click(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/Properties/Resources.Designer.cs b/RbFreqStandMeasure/Properties/Resources.Designer.cs index d3f5288..4959dea 100644 --- a/RbFreqStandMeasure/Properties/Resources.Designer.cs +++ b/RbFreqStandMeasure/Properties/Resources.Designer.cs @@ -469,5 +469,15 @@ return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 地球 { + get { + object obj = ResourceManager.GetObject("地球", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/RbFreqStandMeasure/Properties/Resources.resx b/RbFreqStandMeasure/Properties/Resources.resx index 8d6c9ab..07a8e00 100644 --- a/RbFreqStandMeasure/Properties/Resources.resx +++ b/RbFreqStandMeasure/Properties/Resources.resx @@ -241,4 +241,7 @@ ..\Resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\地球.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs new file mode 100644 index 0000000..a4d0c95 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterCheckParam.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + /// + /// 字典 + /// + public class CounterCheckParam + { + private long id; + private string soOutDelay; + private string soEleFrequency; + private string soEleAddValue; + private string soEleAlarm; + private string freThreshold1; + private string freThreshold2; + private string freEleAddValue; + private string cycThreshold1; + private string cycThreshold2; + private string cycEleAddValue; + + public long Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string SoOutDelay { get => soOutDelay; set => soOutDelay = value; } + public string SoEleFrequency { get => soEleFrequency; set => soEleFrequency = value; } + public string SoEleAddValue { get => soEleAddValue; set => soEleAddValue = value; } + public string SoEleAlarm { get => soEleAlarm; set => soEleAlarm = value; } + public string FreThreshold1 { get => freThreshold1; set => freThreshold1 = value; } + public string FreThreshold2 { get => freThreshold2; set => freThreshold2 = value; } + public string FreEleAddValue { get => freEleAddValue; set => freEleAddValue = value; } + public string CycThreshold1 { get => cycThreshold1; set => cycThreshold1 = value; } + public string CycThreshold2 { get => cycThreshold2; set => cycThreshold2 = value; } + public string CycEleAddValue { get => cycEleAddValue; set => cycEleAddValue = value; } + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs index de161fe..19bbfee 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterData.cs @@ -8,18 +8,13 @@ class CounterData { private int id; + private long deviceId; + private string outValue; - private string model; - - private string devCode; - - private string channel; - - private string nominalValue; - - private string indexValue; - - private DateTime createTime; + private string value; + private string sensitivity; + private string logTime; + private int detecType; //1-频率测量,2-周期测量 public int Id { @@ -34,83 +29,11 @@ } } - public string Model - { - get - { - return model; - } - - set - { - model = value; - } - } - - public string DevCode - { - get - { - return devCode; - } - - set - { - devCode = value; - } - } - - public string Channel - { - get - { - return channel; - } - - set - { - channel = value; - } - } - - public string NominalValue - { - get - { - return nominalValue; - } - - set - { - nominalValue = value; - } - } - - public string IndexValue - { - get - { - return indexValue; - } - - set - { - indexValue = value; - } - } - - public DateTime CreateTime - { - get - { - return createTime; - } - - set - { - createTime = value; - } - } - + public long DeviceId { get => deviceId; set => deviceId = value; } + public string OutValue { get => outValue; set => outValue = value; } + public string Value { get => value; set => this.value = value; } + public string Sensitivity { get => sensitivity; set => sensitivity = value; } + public string LogTime { get => logTime; set => logTime = value; } + public int DetecType { get => detecType; set => detecType = value; } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs new file mode 100644 index 0000000..a693f2f --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterDetecInit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model +{ + class CounterDetecInit + { + private int id; + + private string frequency; + + private string cycle; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + + public string Frequency { get => frequency; set => frequency = value; } + public string Cycle { get => cycle; set => cycle = value; } + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs index d75f4c5..6b3cc6c 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/CounterParam.cs @@ -10,10 +10,10 @@ /// public class CounterParam { - private int id; + private long id; //设备id - private int deviceId; + private long deviceId; //波特率 private String baudRate; @@ -24,7 +24,7 @@ //信号发生器IP private String signalSourceIp; - public int Id + public long Id { get { @@ -76,7 +76,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs index 608e90a..3f84511 100644 --- a/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs +++ b/RbFreqStandMeasure/R_DataBase/Model/DetectionItem.cs @@ -5,10 +5,10 @@ { public class DetectionItem { - private int id; + private long id; //设备ID - private int deviceId; + private long deviceId; //开始时间 private DateTime startTime; @@ -31,7 +31,7 @@ //频率稳定度 private String interval; - public int Id + public long Id { get { @@ -44,7 +44,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs index 826c5bf..54a9859 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDataService.cs @@ -1,4 +1,4 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using System; using System.Collections.Generic; using System.Linq; @@ -8,7 +8,7 @@ { interface CounterDataService { - int add(string model,string devCode,string channel,string nominalValue,string indexValue,DateTime createTime); + } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs new file mode 100644 index 0000000..454b274 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/CounterDetecInitService.cs @@ -0,0 +1,21 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service +{ + interface CounterDetecInitService + { + int add(string frequency,string cycle); + + int update(int id, string frequency, string cycle); + + int delete(int id); + + List getAll(); + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index 84676e2..8135c6e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -14,7 +14,7 @@ int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(long deviceId); + List search(long deviceId, bool isInDetection); int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index c4c33f4..525c686 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -8,7 +8,7 @@ { interface DeviceService { - int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); @@ -25,6 +25,8 @@ List getDeviceByChannel(); + List getAllCounter(); + } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs index 3c3cfa1..8c17b0e 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DictService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DictService.cs @@ -1,4 +1,5 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,6 +10,14 @@ { String getNameByCode(string codeType,string code); - List getTypeListByCodeType(string codeType); + List getTypeListByCodeType(string codeType); + + CounterParam getCounterParam(); + + CounterCheckParam getCounterCheckParam(); + + int updateCounterIp(string ip); + + int updateCheckParam(CounterCheckParam counterCheckParam); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs index ae2fee4..3aaa5b1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDataServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ { class CounterDataServiceImpl:CounterDataService { - public int add(string model, string devCode, string channel, string nominalValue, string indexValue, DateTime createTime) + public int add(int deviceId, String baudRate, String generatorIp, String signalSourceIp) { int iRetval = -1; try { if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : 数据库链接断开"); return iRetval; } - string sQry = "INSERT INTO r_counter_data (MODEL,DEVCODE,CHANNEL,NOMINAL_VALUE,INDEX_VALUE,CREATE_TIME)" + - "values(@MODEL,@DEVCODE,@CHANNEL,@NOMINAL_VALUE,@INDEX_VALUE,@CREATE_TIME)"; + string sQry = "INSERT INTO r_counter_param (DEVICE_ID,BAUD_RATE,GENERATOR_IP,SIGNAL_SOURCE_IP)" + + "values(@DEVICE_ID,@BAUD_RATE,@GENERATOR_IP,@SIGNAL_SOURCE_IP)"; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); - cmd.Parameters.Add("@MODEL", MySqlDbType.Int64, 20).Value = model; - cmd.Parameters.Add("@DEVCODE", MySqlDbType.String, 30).Value = devCode; - cmd.Parameters.Add("@CHANNEL", MySqlDbType.String, 30).Value = channel; - cmd.Parameters.Add("@NOMINAL_VALUE", MySqlDbType.String, 30).Value = nominalValue; - cmd.Parameters.Add("@INDEX_VALUE", MySqlDbType.String, 30).Value = indexValue; - cmd.Parameters.Add("@CREATE_TIME", MySqlDbType.Date, 0).Value = createTime; + cmd.Parameters.Add("@DEVICE_ID", MySqlDbType.Int64, 20).Value = deviceId; + cmd.Parameters.Add("@BAUD_RATE", MySqlDbType.String, 255).Value = baudRate; + cmd.Parameters.Add("@GENERATOR_IP", MySqlDbType.String, 0).Value = generatorIp; + cmd.Parameters.Add("@SIGNAL_SOURCE_IP", MySqlDbType.String, 0).Value = signalSourceIp; cmd.ExecuteNonQuery(); cmd.Dispose(); + iRetval = 0; } catch(MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); iRetval = -1; } return iRetval; } + public CounterParam getCounterParamByDeviceId(int deviceId) + { + CounterParam counterParam = new CounterParam(); + + try + { + string sql = "SELECT * FROM r_counter_param where DEVICE_ID = " + deviceId; + + MySqlCommand cmd = new MySqlCommand(sql, DbConnectService.mySqlConnect); + + MySqlDataReader aReader = cmd.ExecuteReader(CommandBehavior.Default); + + if (aReader != null) + { + if (aReader.Read()) + { + //判断门的状态 + if (!aReader.IsDBNull(0)) + counterParam.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) + counterParam.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) + counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) + counterParam.SignalSourceIp = aReader.GetString(4); + } + } + + cmd.Dispose(); + + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterParam : " + ex.Message); + counterParam = null; + } + + return counterParam; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs new file mode 100644 index 0000000..1b8c465 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/CounterDetecInitServiceImpl.cs @@ -0,0 +1,152 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using MySql.Data.MySqlClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl +{ + class CounterDetecInitServiceImpl:CounterDetecInitService + { + public List getAll() + { + + List counterDetecInitList = new List(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_counter_detec_init order by FREQUENCY"; + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + CounterDetecInit counterDetecInit = new CounterDetecInit(); + + if (!aReader.IsDBNull(0)) counterDetecInit.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterDetecInit.Frequency = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterDetecInit.Cycle = aReader.GetString(2); + + counterDetecInitList.Add(counterDetecInit); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + } + + return counterDetecInitList; + } + public int add(string frequency, string cycle) + { + int iRetval = -1; + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : 数据库链接断开"); + return iRetval; + } + + string sQry = "INSERT INTO r_counter_detec_init (FREQUENCY, CYCLE)" + + " values (@FREQUENCY,@CYCLE)"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.Int64, 20).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + iRetval = 0; + } + catch(MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addCounterData : " + ex.Message); + iRetval = -1; + } + + return iRetval; + } + + + public int update(int id, string frequency, string cycle) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_detec_init SET FREQUENCY=@FREQUENCY, CYCLE=@CYCLE " + + "WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@FREQUENCY", MySqlDbType.String, 30).Value = frequency; + cmd.Parameters.Add("@CYCLE", MySqlDbType.String, 30).Value = cycle; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } + + public int delete(int id) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "delete from r_counter_detec_init WHERE ID = " + id; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "deleteDeviced : " + ex.Message); + } + return iRetval; + } + + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index f8c6f6d..d1260fe 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -128,7 +128,7 @@ return iRetval; } - public List serach(long deviceId) + public List search(long deviceId, bool isInDetection) { List detectionItemList = new List(); try @@ -140,6 +140,10 @@ } string sQry = "SELECT * FROM r_detection_item where DEVICE_ID = " + deviceId; + if (isInDetection) + { + sQry = sQry + " and ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' between START_TIME AND END_TIME)"; + } MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -149,7 +153,7 @@ DetectionItem detectionItem = new DetectionItem(); //姓名 if (!aReader.IsDBNull(0)) detectionItem.Id=Convert.ToInt32(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(1)) detectionItem.DeviceId = Convert.ToInt64(aReader.GetString(1)); if (!aReader.IsDBNull(2)) detectionItem.StartTime = Convert.ToDateTime(aReader.GetString(2)); if (!aReader.IsDBNull(3)) detectionItem.EndTime = Convert.ToDateTime(aReader.GetString(3)); if (!aReader.IsDBNull(4)) detectionItem.Stability = aReader.GetString(4); @@ -165,8 +169,7 @@ } catch (MySqlException ex) { - LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); - detectionItemList = null; + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDetectionItem: " + ex.Message); } return detectionItemList; } diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 3f1b8bc..8c3f140 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +" and DETECTION_ITEM=" + detectionType + " and (LOG_TIME BETWEEN '" + startTime + "' and '"+ endTime + "') order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -67,7 +67,7 @@ DetectionDto detectionDto = new DetectionDto(); //姓名 if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); - if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); + if (!aReader.IsDBNull(1)) detectionDto.LogTime = Convert.ToDateTime(aReader.GetString(1)).ToString("yyyy-MM-dd HH:mm:ss"); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); detectionDtoList.Add(detectionDto); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 068a9e1..fae05e6 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -13,10 +13,10 @@ { class DeviceServiceImpl : DeviceService { - public int add(string devName, string devCode, string devTypeId, string devModel, + public long add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { - int iRetval = -1; + long deviceId = -1; //DetectionItemService detectionItemService = new DetectionItemServiceImpl(); try @@ -24,7 +24,7 @@ if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : 数据库链接断开"); - return iRetval; + return deviceId; } string sQry = "INSERT INTO r_device (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,REG_TIME,CUSTOMER_NAME,CUSTOMER_DEV,STATUSID,CHANNEL,ACTIVE)" + @@ -44,15 +44,25 @@ cmd.ExecuteNonQuery(); - cmd.Dispose(); + cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + sQry = "SELECT max(id) from r_device"; + cmd.ExecuteNonQuery(); + using (MySqlDataReader aReader = cmd.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) deviceId = Convert.ToInt64(aReader.GetString(0)); + } + } - iRetval = 0; + cmd.Dispose(); } catch (MySqlException ex) { LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "addDeviced : " + ex.Message); + deviceId = -1; } - return iRetval; + return deviceId; } public int update(long id, string devName, string devCode, string devTypeId, string devModel, @@ -68,8 +78,8 @@ return iRetval; } - string sQry = "UPDATE r_device SET (DEV_NAME,DEV_CODE,DEV_TYPEID,DEV_MODEL,CUSTOMER_NAME,CUSTOMER_DEV,CHANNEL)" + - "values(@DEV_NAME,@DEV_CODE,@DEV_TYPEID,@DEV_MODEL,@CUSTOMER_NAME,@CUSTOMER_DEV,@CHANNEL) WHERE ID = " + id; + string sQry = "UPDATE r_device SET DEV_NAME=@DEV_NAME, DEV_CODE=@DEV_CODE ,DEV_TYPEID=@DEV_TYPEID ,DEV_MODEL=@DEV_MODEL ,CUSTOMER_NAME=@CUSTOMER_NAME ,CUSTOMER_DEV=@CUSTOMER_DEV ,CHANNEL=@CHANNEL " + + "WHERE ID = " + id; MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); cmd.Parameters.Add("@DEV_NAME", MySqlDbType.String, 30).Value = devName; @@ -194,6 +204,66 @@ return deviceDtoList; } + public List getAllCounter() + { + + List deviceDtoList = new List(); + DictService dictService = new DictServiceImpl(); + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice : 数据库链接断开"); + return null; + } + + string sQry = "SELECT * FROM r_device where active = " + 0 + " and DEV_TYPEID='2'"; + + + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceDto deviceDto = new DeviceDto(); + + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); + if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); + if (!aReader.IsDBNull(3)) + { + deviceDto.DevTypeId = aReader.GetString(3); + deviceDto.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); + if (!aReader.IsDBNull(5)) deviceDto.CustomerName = aReader.GetString(6); + if (!aReader.IsDBNull(6)) deviceDto.CustomerDev = aReader.GetString(7); + if (!aReader.IsDBNull(7)) + { + deviceDto.StatusId = aReader.GetString(7); + deviceDto.StatusName = dictService.getNameByCode("devStatus", aReader.GetString(7)); + } + if (!aReader.IsDBNull(8)) deviceDto.Channel = aReader.GetString(8); + + deviceDtoList.Add(deviceDto); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + deviceDtoList = null; + } + + return deviceDtoList; + } + public List searchPage(string devName, string devCode, string devModel, string customDev, string customerName, string statusId, int page, int limit) diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs index 05fcfb3..1b85062 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DictServiceImpl.cs @@ -1,4 +1,5 @@ -using Casic.Birmm.RbFreqStandMeasure.Tools; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.Tools; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; @@ -55,23 +56,27 @@ return name; } - public List getTypeListByCodeType(string codeType) + public List getTypeListByCodeType(string codeType) { - List nameList = new List(); + List nameList = new List(); MySqlConnection conn = null; try { conn = DbConnectService.getConnection(); - string sQry = "SELECT name FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; + string sQry = "SELECT * FROM r_dict where pid = (select id from r_dict where code = '" + codeType + "')"; MySqlCommand aCommand = new MySqlCommand(sQry, conn); using (MySqlDataReader aReader = aCommand.ExecuteReader()) { while (aReader.Read()) { - if (!aReader.IsDBNull(0)) - nameList.Add(aReader.GetString(0)); + Dict dict = new Dict(); + if (!aReader.IsDBNull(0)) dict.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) dict.Pid = Convert.ToInt32(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) dict.Name = aReader.GetString(2); + if (!aReader.IsDBNull(3)) dict.Code = aReader.GetString(3); + nameList.Add(dict); } aCommand.Dispose(); @@ -95,5 +100,142 @@ return nameList; } + + + public CounterParam getCounterParam() + { + CounterParam counterParam = new CounterParam(); + try + { + string sQry = "SELECT * FROM r_counter_param"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterParam.DeviceId = Convert.ToInt64(aReader.GetString(1)); + if (!aReader.IsDBNull(2)) counterParam.BaudRate = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterParam.GeneratorIp = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterParam.SignalSourceIp = aReader.GetString(4); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterParam; + } + + public int updateCounterIp(string ip) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_param SET GENERATOR_IP='"+ ip +"'"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateCounterIp : " + ex.Message); + } + return iRetval; + } + + public CounterCheckParam getCounterCheckParam() + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + try + { + string sQry = "SELECT * FROM r_counter_check_params"; + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + if (aReader.Read()) + { + if (!aReader.IsDBNull(0)) counterCheckParam.Id = Convert.ToInt64(aReader.GetString(0)); + if (!aReader.IsDBNull(1)) counterCheckParam.SoOutDelay = aReader.GetString(1); + if (!aReader.IsDBNull(2)) counterCheckParam.SoEleFrequency = aReader.GetString(2); + if (!aReader.IsDBNull(3)) counterCheckParam.SoEleAddValue = aReader.GetString(3); + if (!aReader.IsDBNull(4)) counterCheckParam.SoEleAlarm = aReader.GetString(4); + if (!aReader.IsDBNull(5)) counterCheckParam.FreThreshold1 = aReader.GetString(5); + if (!aReader.IsDBNull(6)) counterCheckParam.FreThreshold2 = aReader.GetString(6); + if (!aReader.IsDBNull(7)) counterCheckParam.FreEleAddValue = aReader.GetString(7); + if (!aReader.IsDBNull(8)) counterCheckParam.CycThreshold1 = aReader.GetString(8); + if (!aReader.IsDBNull(9)) counterCheckParam.CycThreshold2 = aReader.GetString(9); + if (!aReader.IsDBNull(10)) counterCheckParam.CycEleAddValue = aReader.GetString(10); + } + + aCommand.Dispose(); + + } + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "searchDevice: " + ex.Message); + + } + return counterCheckParam; + } + + public int updateCheckParam(CounterCheckParam counterCheckParam) + { + int iRetval = -1; + + try + { + if (DbConnectService.mySqlConnect.State == ConnectionState.Closed) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : 数据库链接断开"); + return iRetval; + } + + string sQry = "UPDATE r_counter_check_params SET SO_OUT_DELAY=@SO_OUT_DELAY,SO_ELE_FREQUENCY=@SO_ELE_FREQUENCY,SO_ELE_ADD_VALUE=@SO_ELE_ADD_VALUE,SO_ELE_ALARM=@SO_ELE_ALARM,FRE_THRESHOLD1=@FRE_THRESHOLD1,FRE_THRESHOLD2=@FRE_THRESHOLD2,FRE_ELE_ADD_VALUE=@FRE_ELE_ADD_VALUE,CYC_THRESHOLD1=@CYC_THRESHOLD1,CYC_THRESHOLD2=@CYC_THRESHOLD2,CYC_ELE_ADD_VALUE=@CYC_ELE_ADD_VALUE"; + + MySqlCommand cmd = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + cmd.Parameters.Add("@SO_OUT_DELAY", MySqlDbType.String, 30).Value = counterCheckParam.SoOutDelay; + cmd.Parameters.Add("@SO_ELE_FREQUENCY", MySqlDbType.String, 30).Value = counterCheckParam.SoEleFrequency; + cmd.Parameters.Add("@SO_ELE_ADD_VALUE", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAddValue; + cmd.Parameters.Add("@SO_ELE_ALARM", MySqlDbType.String, 30).Value = counterCheckParam.SoEleAlarm; + cmd.Parameters.Add("@FRE_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold1; + cmd.Parameters.Add("@FRE_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.FreThreshold2; + cmd.Parameters.Add("@FRE_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.FreEleAddValue; + cmd.Parameters.Add("@CYC_THRESHOLD1", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold1; + cmd.Parameters.Add("@CYC_THRESHOLD2", MySqlDbType.String, 30).Value = counterCheckParam.CycThreshold2; + cmd.Parameters.Add("@CYC_ELE_ADD_VALUE", MySqlDbType.String, 20).Value = counterCheckParam.CycEleAddValue; + + cmd.ExecuteNonQuery(); + + cmd.Dispose(); + + iRetval = 0; + } + catch (MySqlException ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "updateDeviced : " + ex.Message); + } + return iRetval; + } } } \ No newline at end of file diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index cc0218d..a3b6848 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -128,6 +128,12 @@ + + Form + + + AddDlg.cs + UserControl @@ -140,12 +146,6 @@ bootFeature.cs - - UserControl - - - accuracy.cs - UserControl @@ -158,6 +158,12 @@ DetailDlg.cs + + UserControl + + + accuracy.cs + True True @@ -168,18 +174,22 @@ + + + + @@ -286,6 +296,9 @@ StatusCtrlForm.cs + + AddDlg.cs + CounterCtrlForm.cs Designer @@ -304,15 +317,15 @@ DataBackupDlg.cs Designer + + accuracy.cs + ageRate.cs bootFeature.cs - - accuracy.cs - stability.cs @@ -498,6 +511,9 @@ + + + diff --git "a/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" new file mode 100644 index 0000000..53047dd --- /dev/null +++ "b/RbFreqStandMeasure/Resources/\345\234\260\347\220\203.png" Binary files differ diff --git a/RbFreqStandMeasure/counter/AddDlg.Designer.cs b/RbFreqStandMeasure/counter/AddDlg.Designer.cs new file mode 100644 index 0000000..700c829 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.Designer.cs @@ -0,0 +1,289 @@ + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + partial class AddDlg + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.btnExitDev = new System.Windows.Forms.Button(); + this.labelTitle = new System.Windows.Forms.Label(); + this.btn_downTypeList = new System.Windows.Forms.Button(); + this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbBox_devType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.channel1 = new DevComponents.Editors.ComboItem(); + this.channel2 = new DevComponents.Editors.ComboItem(); + this.channel3 = new DevComponents.Editors.ComboItem(); + this.channel4 = new DevComponents.Editors.ComboItem(); + this.channel5 = new DevComponents.Editors.ComboItem(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.label14 = new System.Windows.Forms.Label(); + this.inputDevName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label5 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.labelTitle); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(401, 32); + this.panel1.TabIndex = 18; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + // + // btnExitDev + // + this.btnExitDev.BackColor = System.Drawing.Color.Transparent; + this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExitDev.FlatAppearance.BorderSize = 0; + this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnExitDev.Location = new System.Drawing.Point(370, 7); + this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); + this.btnExitDev.Name = "btnExitDev"; + this.btnExitDev.Size = new System.Drawing.Size(20, 20); + this.btnExitDev.TabIndex = 2; + this.btnExitDev.UseVisualStyleBackColor = false; + this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // labelTitle + // + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加"; + // + // btn_downTypeList + // + this.btn_downTypeList.BackColor = System.Drawing.Color.White; + this.btn_downTypeList.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_downTypeList.FlatAppearance.BorderSize = 0; + this.btn_downTypeList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btn_downTypeList.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btn_downTypeList.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btn_downTypeList.Location = new System.Drawing.Point(296, 96); + this.btn_downTypeList.Margin = new System.Windows.Forms.Padding(0); + this.btn_downTypeList.Name = "btn_downTypeList"; + this.btn_downTypeList.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.btn_downTypeList.Size = new System.Drawing.Size(17, 23); + this.btn_downTypeList.TabIndex = 52; + this.btn_downTypeList.Text = "﹀"; + this.btn_downTypeList.UseVisualStyleBackColor = false; + // + // text_devType + // + // + // + // + this.text_devType.Border.Class = "TextBoxBorder"; + this.text_devType.Border.CornerDiameter = 5; + this.text_devType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_devType.Location = new System.Drawing.Point(234, 94); + this.text_devType.Margin = new System.Windows.Forms.Padding(0); + this.text_devType.Name = "text_devType"; + this.text_devType.PreventEnterBeep = true; + this.text_devType.Size = new System.Drawing.Size(81, 27); + this.text_devType.TabIndex = 50; + // + // cbBox_devType + // + this.cbBox_devType.DisplayMember = "Text"; + this.cbBox_devType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbBox_devType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.cbBox_devType.FormattingEnabled = true; + this.cbBox_devType.ItemHeight = 18; + this.cbBox_devType.Location = new System.Drawing.Point(236, 96); + this.cbBox_devType.Name = "cbBox_devType"; + this.cbBox_devType.Size = new System.Drawing.Size(77, 24); + this.cbBox_devType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbBox_devType.TabIndex = 54; + // + // channel1 + // + this.channel1.Text = "通道1"; + this.channel1.Value = "1"; + // + // channel2 + // + this.channel2.Text = "通道2"; + this.channel2.Value = "2"; + // + // channel3 + // + this.channel3.Text = "通道3"; + this.channel3.Value = "3"; + // + // channel4 + // + this.channel4.Text = "通道4"; + this.channel4.Value = "4"; + // + // channel5 + // + this.channel5.Text = "通道5"; + this.channel5.Value = "5"; + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(90, 165); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(94, 30); + this.btnSave.TabIndex = 17; + this.btnSave.Text = "开始检测"; + this.btnSave.UseVisualStyleBackColor = true; + // + // btnCancelSetDev + // + this.btnCancelSetDev.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancelSetDev.EnterForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancelSetDev.FlatAppearance.BorderSize = 0; + this.btnCancelSetDev.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancelSetDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelSetDev.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancelSetDev.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancelSetDev.HoverForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Location = new System.Drawing.Point(216, 165); + this.btnCancelSetDev.Name = "btnCancelSetDev"; + this.btnCancelSetDev.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancelSetDev.PressForeColor = System.Drawing.Color.White; + this.btnCancelSetDev.Radius = 5; + this.btnCancelSetDev.Size = new System.Drawing.Size(94, 30); + this.btnCancelSetDev.TabIndex = 18; + this.btnCancelSetDev.Text = "取消"; + this.btnCancelSetDev.UseVisualStyleBackColor = true; + this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(38, 61); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 349; + this.label14.Text = "*"; + // + // inputDevName + // + // + // + // + this.inputDevName.Border.Class = "TextBoxBorder"; + this.inputDevName.Border.CornerDiameter = 5; + this.inputDevName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.inputDevName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.inputDevName.Location = new System.Drawing.Point(54, 94); + this.inputDevName.Margin = new System.Windows.Forms.Padding(0); + this.inputDevName.Name = "inputDevName"; + this.inputDevName.PreventEnterBeep = true; + this.inputDevName.Size = new System.Drawing.Size(162, 27); + this.inputDevName.TabIndex = 347; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(50, 57); + this.label5.Margin = new System.Windows.Forms.Padding(0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(124, 27); + this.label5.TabIndex = 348; + this.label5.Text = "请输入测试数据:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // AddDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(402, 233); + this.ControlBox = false; + this.Controls.Add(this.label14); + this.Controls.Add(this.inputDevName); + this.Controls.Add(this.label5); + this.Controls.Add(this.btn_downTypeList); + this.Controls.Add(this.text_devType); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnCancelSetDev); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cbBox_devType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AddDlg"; + this.Text = "添加检测设备"; + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private RoundButton btnCancelSetDev; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Label labelTitle; + private DevComponents.Editors.ComboItem channel1; + private DevComponents.Editors.ComboItem channel2; + private DevComponents.Editors.ComboItem channel3; + private DevComponents.Editors.ComboItem channel4; + private DevComponents.Editors.ComboItem channel5; + private System.Windows.Forms.Button btn_downTypeList; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbBox_devType; + public DevComponents.DotNetBar.Controls.TextBoxX text_devType; + public RoundButton btnSave; + private System.Windows.Forms.Label label14; + public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; + private System.Windows.Forms.Label label5; + } +} \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/AddDlg.cs b/RbFreqStandMeasure/counter/AddDlg.cs new file mode 100644 index 0000000..9f47b6b --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.cs @@ -0,0 +1,57 @@ +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using DevComponents.DotNetBar.Controls; +using DevComponents.Editors; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Casic.Birmm.RbFreqStandMeasure.info +{ + public partial class AddDlg : Form + { + #region 无边框拖动效果/最小化窗口/关闭窗口 + [DllImport("user32.dll")]//拖动无窗体的控件 + public static extern bool ReleaseCapture(); + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + public const int WM_SYSCOMMAND = 0x0112; + public const int SC_MOVE = 0xF010; + public const int HTCAPTION = 0x0002; + private void panel1_MouseDown(object sender, MouseEventArgs e) + { + //拖动窗体 + ReleaseCapture(); + SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); + } + #endregion + + DictService dictService = new DictServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + + + public Action HideMaskAction + { + get; + set; + } + + public AddDlg() + { + InitializeComponent(); + + List dictList = dictService.getTypeListByCodeType("devType"); + + } + + // 关闭对话框 + private void btnAddDevCancel_Click(object sender, EventArgs e) + { + this.HideMaskAction(); + } + + } +} diff --git a/RbFreqStandMeasure/counter/AddDlg.resx b/RbFreqStandMeasure/counter/AddDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RbFreqStandMeasure/counter/AddDlg.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs index a55cfbe..e1b5c26 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.Designer.cs @@ -31,63 +31,161 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.benDelete = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableCounterResult = new System.Windows.Forms.DataGridView(); + this.dataGridView_CounterResult = new System.Windows.Forms.DataGridView(); this.panelMedian = new System.Windows.Forms.Panel(); - this.listBox1 = new System.Windows.Forms.ListBox(); 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.benEdit = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.labelControl = new System.Windows.Forms.Label(); this.panelSource = new System.Windows.Forms.Panel(); - this.comboBoxEx4 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem13 = new DevComponents.Editors.ComboItem(); - this.comboItem14 = new DevComponents.Editors.ComboItem(); - this.comboItem15 = new DevComponents.Editors.ComboItem(); - this.comboItem16 = new DevComponents.Editors.ComboItem(); + this.label7 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.button2 = new System.Windows.Forms.Button(); + this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btn_dropDetecModel = new System.Windows.Forms.Button(); + this.textBoxX2 = 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(); this.label6 = new System.Windows.Forms.Label(); this.roundButton3 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.comboBoxEx3 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_unit = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem9 = new DevComponents.Editors.ComboItem(); this.comboItem10 = new DevComponents.Editors.ComboItem(); this.comboItem11 = new DevComponents.Editors.ComboItem(); this.comboItem12 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx2 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_frequency = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.comboItem5 = new DevComponents.Editors.ComboItem(); this.comboItem6 = new DevComponents.Editors.ComboItem(); this.comboItem7 = new DevComponents.Editors.ComboItem(); this.comboItem8 = new DevComponents.Editors.ComboItem(); - this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.comboItem1 = new DevComponents.Editors.ComboItem(); - this.comboItem2 = new DevComponents.Editors.ComboItem(); - this.comboItem3 = new DevComponents.Editors.ComboItem(); - this.comboItem4 = new DevComponents.Editors.ComboItem(); this.labelSource = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panelCounter = new System.Windows.Forms.Panel(); - this.inputDevStatus = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btn_downCounterList = new System.Windows.Forms.Button(); + this.text_counterCode = 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(); this.testing = new DevComponents.Editors.ComboItem(); this.toBeTested = new DevComponents.Editors.ComboItem(); - this.inputDevType = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_counterIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelCounter = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).BeginInit(); this.panelMedian.SuspendLayout(); this.panelControl.SuspendLayout(); this.panelSource.SuspendLayout(); this.panelCounter.SuspendLayout(); this.SuspendLayout(); // + // panel1 + // + this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel1.Controls.Add(this.dataGridView_CounterResult); + this.panel1.Location = new System.Drawing.Point(297, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(719, 646); + this.panel1.TabIndex = 5; + // + // dataGridView_CounterResult + // + 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; + 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; + this.dataGridView_CounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_CounterResult.ColumnHeadersHeight = 50; + this.dataGridView_CounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_CounterResult.GridColor = System.Drawing.Color.WhiteSmoke; + this.dataGridView_CounterResult.Location = new System.Drawing.Point(10, 10); + this.dataGridView_CounterResult.MultiSelect = false; + 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; + this.dataGridView_CounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; + this.dataGridView_CounterResult.RowTemplate.Height = 50; + this.dataGridView_CounterResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_CounterResult.Size = new System.Drawing.Size(696, 627); + this.dataGridView_CounterResult.TabIndex = 1; + this.dataGridView_CounterResult.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CounterResult_CellDoubleClick); + this.dataGridView_CounterResult.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.dataGridView_CounterResult_CellValuePushed); + // + // panelMedian + // + this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; + this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panelMedian.Controls.Add(this.labelMedian); + this.panelMedian.Controls.Add(this.btn_add); + this.panelMedian.Controls.Add(this.benDelete); + this.panelMedian.Location = new System.Drawing.Point(10, 531); + this.panelMedian.Name = "panelMedian"; + this.panelMedian.Size = new System.Drawing.Size(288, 120); + this.panelMedian.TabIndex = 4; + // + // labelMedian + // + this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelMedian.ForeColor = System.Drawing.Color.White; + this.labelMedian.Location = new System.Drawing.Point(10, 9); + this.labelMedian.Name = "labelMedian"; + this.labelMedian.Size = new System.Drawing.Size(267, 32); + this.labelMedian.TabIndex = 1; + 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(167, 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(89, 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; @@ -100,151 +198,17 @@ 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(19, 616); + this.benDelete.Location = new System.Drawing.Point(42, 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(70, 26); + this.benDelete.Size = new System.Drawing.Size(89, 26); this.benDelete.TabIndex = 13; this.benDelete.Text = "删除"; this.benDelete.UseVisualStyleBackColor = true; - // - // roundButton1 - // - this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton1.EnterForeColor = System.Drawing.Color.White; - this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton1.FlatAppearance.BorderSize = 0; - this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton1.HoverForeColor = System.Drawing.Color.White; - this.roundButton1.Location = new System.Drawing.Point(114, 616); - this.roundButton1.Margin = new System.Windows.Forms.Padding(0); - this.roundButton1.Name = "roundButton1"; - this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton1.PressForeColor = System.Drawing.Color.White; - this.roundButton1.Radius = 5; - this.roundButton1.Size = new System.Drawing.Size(70, 26); - this.roundButton1.TabIndex = 14; - this.roundButton1.Text = "手动输入"; - this.roundButton1.UseVisualStyleBackColor = true; - // - // roundButton2 - // - this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; - this.roundButton2.EnterForeColor = System.Drawing.Color.White; - this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.roundButton2.FlatAppearance.BorderSize = 0; - this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.roundButton2.HoverForeColor = System.Drawing.Color.White; - this.roundButton2.Location = new System.Drawing.Point(209, 616); - this.roundButton2.Margin = new System.Windows.Forms.Padding(0); - this.roundButton2.Name = "roundButton2"; - this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; - this.roundButton2.PressForeColor = System.Drawing.Color.White; - this.roundButton2.Radius = 5; - this.roundButton2.Size = new System.Drawing.Size(70, 26); - this.roundButton2.TabIndex = 14; - this.roundButton2.Text = "写列表"; - this.roundButton2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_list; - this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panel1.Controls.Add(this.tableCounterResult); - this.panel1.Location = new System.Drawing.Point(297, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(719, 642); - this.panel1.TabIndex = 5; - // - // tableCounterResult - // - this.tableCounterResult.AllowUserToAddRows = false; - this.tableCounterResult.AllowUserToDeleteRows = false; - this.tableCounterResult.AllowUserToResizeColumns = false; - this.tableCounterResult.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)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.tableCounterResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.tableCounterResult.BackgroundColor = System.Drawing.Color.White; - this.tableCounterResult.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.tableCounterResult.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.tableCounterResult.ColumnHeadersHeight = 50; - this.tableCounterResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.tableCounterResult.GridColor = System.Drawing.Color.WhiteSmoke; - this.tableCounterResult.Location = new System.Drawing.Point(10, 10); - this.tableCounterResult.MultiSelect = false; - this.tableCounterResult.Name = "tableCounterResult"; - this.tableCounterResult.RowHeadersVisible = false; - this.tableCounterResult.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.White; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.tableCounterResult.RowsDefaultCellStyle = dataGridViewCellStyle2; - this.tableCounterResult.RowTemplate.DefaultCellStyle.NullValue = "-"; - this.tableCounterResult.RowTemplate.Height = 50; - this.tableCounterResult.Size = new System.Drawing.Size(696, 627); - this.tableCounterResult.TabIndex = 1; - // - // panelMedian - // - this.panelMedian.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_median; - this.panelMedian.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelMedian.Controls.Add(this.listBox1); - this.panelMedian.Controls.Add(this.labelMedian); - this.panelMedian.Location = new System.Drawing.Point(10, 451); - this.panelMedian.Name = "panelMedian"; - this.panelMedian.Size = new System.Drawing.Size(291, 157); - this.panelMedian.TabIndex = 4; - // - // listBox1 - // - this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.listBox1.FormattingEnabled = true; - this.listBox1.ItemHeight = 17; - this.listBox1.Items.AddRange(new object[] { - "11111", - "2222", - "3333", - "44444", - "55555", - "66666", - "7677777"}); - this.listBox1.Location = new System.Drawing.Point(10, 42); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(271, 102); - this.listBox1.TabIndex = 0; - // - // labelMedian - // - this.labelMedian.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.labelMedian.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.labelMedian.ForeColor = System.Drawing.Color.White; - this.labelMedian.Location = new System.Drawing.Point(10, 10); - this.labelMedian.Name = "labelMedian"; - this.labelMedian.Size = new System.Drawing.Size(271, 32); - this.labelMedian.TabIndex = 1; - this.labelMedian.Text = "测量值中间变量"; - this.labelMedian.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.benDelete.Click += new System.EventHandler(this.benDelete_Click); // // panelControl // @@ -252,9 +216,9 @@ this.panelControl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelControl.Controls.Add(this.benEdit); this.panelControl.Controls.Add(this.labelControl); - this.panelControl.Location = new System.Drawing.Point(10, 354); + this.panelControl.Location = new System.Drawing.Point(10, 416); this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(291, 91); + this.panelControl.Size = new System.Drawing.Size(288, 116); this.panelControl.TabIndex = 3; // // benEdit @@ -269,13 +233,13 @@ this.benEdit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.benEdit.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.benEdit.HoverForeColor = System.Drawing.Color.White; - this.benEdit.Location = new System.Drawing.Point(67, 48); + this.benEdit.Location = new System.Drawing.Point(62, 58); this.benEdit.Margin = new System.Windows.Forms.Padding(0); this.benEdit.Name = "benEdit"; this.benEdit.PressBackColor = System.Drawing.Color.DarkBlue; this.benEdit.PressForeColor = System.Drawing.Color.White; this.benEdit.Radius = 5; - this.benEdit.Size = new System.Drawing.Size(150, 26); + this.benEdit.Size = new System.Drawing.Size(166, 26); this.benEdit.TabIndex = 11; this.benEdit.Text = "启动连续检定"; this.benEdit.UseVisualStyleBackColor = true; @@ -287,7 +251,7 @@ this.labelControl.ForeColor = System.Drawing.Color.White; this.labelControl.Location = new System.Drawing.Point(10, 10); this.labelControl.Name = "labelControl"; - this.labelControl.Size = new System.Drawing.Size(271, 32); + this.labelControl.Size = new System.Drawing.Size(267, 32); this.labelControl.TabIndex = 1; this.labelControl.Text = "测量控制"; this.labelControl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -296,62 +260,191 @@ // this.panelSource.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_source; this.panelSource.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelSource.Controls.Add(this.comboBoxEx4); + this.panelSource.Controls.Add(this.label7); + this.panelSource.Controls.Add(this.button3); + this.panelSource.Controls.Add(this.textBoxX5); + this.panelSource.Controls.Add(this.button2); + this.panelSource.Controls.Add(this.textBoxX4); + this.panelSource.Controls.Add(this.btn_dropDetecModel); + this.panelSource.Controls.Add(this.textBoxX2); + 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.roundButton3); this.panelSource.Controls.Add(this.textBoxX1); - this.panelSource.Controls.Add(this.comboBoxEx3); - this.panelSource.Controls.Add(this.comboBoxEx2); - this.panelSource.Controls.Add(this.comboBoxEx1); + this.panelSource.Controls.Add(this.comboBox_unit); + this.panelSource.Controls.Add(this.comboBox_frequency); this.panelSource.Controls.Add(this.labelSource); this.panelSource.Controls.Add(this.label5); this.panelSource.Controls.Add(this.label4); this.panelSource.Controls.Add(this.label3); - this.panelSource.Location = new System.Drawing.Point(10, 129); + this.panelSource.Location = new System.Drawing.Point(10, 155); this.panelSource.Name = "panelSource"; - this.panelSource.Size = new System.Drawing.Size(291, 220); + this.panelSource.Size = new System.Drawing.Size(288, 262); this.panelSource.TabIndex = 1; // - // comboBoxEx4 + // label7 // - this.comboBoxEx4.DisplayMember = "Text"; - this.comboBoxEx4.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx4.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx4.FormattingEnabled = true; - this.comboBoxEx4.ItemHeight = 20; - this.comboBoxEx4.Items.AddRange(new object[] { - this.comboItem13, - this.comboItem14, - this.comboItem15, - this.comboItem16}); - this.comboBoxEx4.Location = new System.Drawing.Point(88, 91); - this.comboBoxEx4.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx4.Name = "comboBoxEx4"; - this.comboBoxEx4.Size = new System.Drawing.Size(174, 26); - this.comboBoxEx4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx4.TabIndex = 16; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(194, 172); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(33, 26); + this.label7.TabIndex = 61; + this.label7.Text = "mV"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // comboItem13 + // button3 // - this.comboItem13.Text = "全部"; + this.button3.BackColor = System.Drawing.Color.White; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button3.Location = new System.Drawing.Point(231, 135); + this.button3.Margin = new System.Windows.Forms.Padding(0); + this.button3.Name = "button3"; + this.button3.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button3.Size = new System.Drawing.Size(18, 23); + this.button3.TabIndex = 60; + this.button3.Text = "﹀"; + this.button3.UseVisualStyleBackColor = false; // - // comboItem14 + // textBoxX5 // - this.comboItem14.Text = "待检测"; // - // comboItem15 // - this.comboItem15.Text = "检测中"; // - // comboItem16 + this.textBoxX5.Border.Class = "TextBoxBorder"; + this.textBoxX5.Border.CornerDiameter = 5; + this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX5.Location = new System.Drawing.Point(196, 133); + this.textBoxX5.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX5.Name = "textBoxX5"; + this.textBoxX5.PreventEnterBeep = true; + this.textBoxX5.Size = new System.Drawing.Size(57, 27); + this.textBoxX5.TabIndex = 59; // - this.comboItem16.Text = "已检测"; + // button2 + // + this.button2.BackColor = System.Drawing.Color.White; + this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.button2.Location = new System.Drawing.Point(168, 136); + this.button2.Margin = new System.Windows.Forms.Padding(0); + this.button2.Name = "button2"; + this.button2.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); + this.button2.Size = new System.Drawing.Size(18, 23); + this.button2.TabIndex = 58; + this.button2.Text = "﹀"; + this.button2.UseVisualStyleBackColor = false; + // + // textBoxX4 + // + // + // + // + this.textBoxX4.Border.Class = "TextBoxBorder"; + this.textBoxX4.Border.CornerDiameter = 5; + this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX4.Location = new System.Drawing.Point(102, 134); + this.textBoxX4.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX4.Name = "textBoxX4"; + this.textBoxX4.PreventEnterBeep = true; + this.textBoxX4.Size = new System.Drawing.Size(90, 27); + this.textBoxX4.TabIndex = 57; + // + // 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, 95); + 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); + // + // textBoxX2 + // + // + // + // + this.textBoxX2.Border.Class = "TextBoxBorder"; + this.textBoxX2.Border.CornerDiameter = 5; + this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.textBoxX2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.textBoxX2.Location = new System.Drawing.Point(101, 53); + this.textBoxX2.Margin = new System.Windows.Forms.Padding(0); + this.textBoxX2.MaximumSize = new System.Drawing.Size(150, 26); + this.textBoxX2.Name = "textBoxX2"; + this.textBoxX2.PreventEnterBeep = true; + this.textBoxX2.ReadOnly = true; + this.textBoxX2.Size = new System.Drawing.Size(150, 26); + this.textBoxX2.TabIndex = 17; + this.textBoxX2.Text = "33250"; + // + // 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, 93); + 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; + // + // comboBox_detecModel + // + this.comboBox_detecModel.DisplayMember = "Text"; + this.comboBox_detecModel.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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, 94); + 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.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_detecModel.TabIndex = 16; + this.comboBox_detecModel.SelectedIndexChanged += new System.EventHandler(this.comboBox_detecModel_SelectedIndexChanged); + // + // comboItem1 + // + this.comboItem1.Text = "频率测量"; + // + // comboItem2 + // + this.comboItem2.Text = "周期测量"; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(17, 91); + this.label6.Location = new System.Drawing.Point(17, 94); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(70, 26); this.label6.TabIndex = 15; @@ -370,13 +463,13 @@ this.roundButton3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.roundButton3.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); this.roundButton3.HoverForeColor = System.Drawing.Color.White; - this.roundButton3.Location = new System.Drawing.Point(202, 166); + this.roundButton3.Location = new System.Drawing.Point(101, 213); this.roundButton3.Margin = new System.Windows.Forms.Padding(0); this.roundButton3.Name = "roundButton3"; this.roundButton3.PressBackColor = System.Drawing.Color.DarkBlue; this.roundButton3.PressForeColor = System.Drawing.Color.White; this.roundButton3.Radius = 5; - this.roundButton3.Size = new System.Drawing.Size(50, 26); + this.roundButton3.Size = new System.Drawing.Size(94, 26); this.roundButton3.TabIndex = 14; this.roundButton3.Text = "下发"; this.roundButton3.UseVisualStyleBackColor = true; @@ -391,7 +484,7 @@ this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.textBoxX1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.textBoxX1.Location = new System.Drawing.Point(85, 166); + this.textBoxX1.Location = new System.Drawing.Point(102, 172); this.textBoxX1.Margin = new System.Windows.Forms.Padding(0); this.textBoxX1.MaximumSize = new System.Drawing.Size(150, 26); this.textBoxX1.Name = "textBoxX1"; @@ -399,25 +492,25 @@ this.textBoxX1.Size = new System.Drawing.Size(90, 26); this.textBoxX1.TabIndex = 11; // - // comboBoxEx3 + // comboBox_unit // - this.comboBoxEx3.DisplayMember = "Text"; - this.comboBoxEx3.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx3.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx3.FormattingEnabled = true; - this.comboBoxEx3.ItemHeight = 20; - this.comboBoxEx3.Items.AddRange(new object[] { + this.comboBox_unit.DisplayMember = "Text"; + this.comboBox_unit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_unit.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_unit.FormattingEnabled = true; + this.comboBox_unit.ItemHeight = 20; + this.comboBox_unit.Items.AddRange(new object[] { this.comboItem9, this.comboItem10, this.comboItem11, this.comboItem12}); - this.comboBoxEx3.Location = new System.Drawing.Point(207, 130); - this.comboBoxEx3.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx3.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx3.Name = "comboBoxEx3"; - this.comboBoxEx3.Size = new System.Drawing.Size(55, 26); - this.comboBoxEx3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx3.TabIndex = 13; + this.comboBox_unit.Location = new System.Drawing.Point(196, 134); + this.comboBox_unit.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_unit.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_unit.Name = "comboBox_unit"; + this.comboBox_unit.Size = new System.Drawing.Size(55, 26); + this.comboBox_unit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_unit.TabIndex = 13; // // comboItem9 // @@ -435,25 +528,25 @@ // this.comboItem12.Text = "已检测"; // - // comboBoxEx2 + // comboBox_frequency // - this.comboBoxEx2.DisplayMember = "Text"; - this.comboBoxEx2.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx2.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx2.FormattingEnabled = true; - this.comboBoxEx2.ItemHeight = 20; - this.comboBoxEx2.Items.AddRange(new object[] { + this.comboBox_frequency.DisplayMember = "Text"; + this.comboBox_frequency.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_frequency.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.comboBox_frequency.FormattingEnabled = true; + this.comboBox_frequency.ItemHeight = 20; + this.comboBox_frequency.Items.AddRange(new object[] { this.comboItem5, this.comboItem6, this.comboItem7, this.comboItem8}); - this.comboBoxEx2.Location = new System.Drawing.Point(86, 130); - this.comboBoxEx2.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx2.MaximumSize = new System.Drawing.Size(150, 0); - this.comboBoxEx2.Name = "comboBoxEx2"; - this.comboBoxEx2.Size = new System.Drawing.Size(95, 26); - this.comboBoxEx2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx2.TabIndex = 12; + this.comboBox_frequency.Location = new System.Drawing.Point(102, 135); + this.comboBox_frequency.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_frequency.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_frequency.Name = "comboBox_frequency"; + this.comboBox_frequency.Size = new System.Drawing.Size(90, 26); + this.comboBox_frequency.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_frequency.TabIndex = 12; // // comboItem5 // @@ -471,41 +564,6 @@ // this.comboItem8.Text = "已检测"; // - // comboBoxEx1 - // - this.comboBoxEx1.DisplayMember = "Text"; - this.comboBoxEx1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxEx1.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.comboBoxEx1.FormattingEnabled = true; - this.comboBoxEx1.ItemHeight = 20; - this.comboBoxEx1.Items.AddRange(new object[] { - this.comboItem1, - this.comboItem2, - this.comboItem3, - this.comboItem4}); - this.comboBoxEx1.Location = new System.Drawing.Point(87, 53); - this.comboBoxEx1.Margin = new System.Windows.Forms.Padding(0); - this.comboBoxEx1.Name = "comboBoxEx1"; - this.comboBoxEx1.Size = new System.Drawing.Size(175, 26); - this.comboBoxEx1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.comboBoxEx1.TabIndex = 11; - // - // comboItem1 - // - this.comboItem1.Text = "全部"; - // - // comboItem2 - // - this.comboItem2.Text = "待检测"; - // - // comboItem3 - // - this.comboItem3.Text = "检测中"; - // - // comboItem4 - // - this.comboItem4.Text = "已检测"; - // // labelSource // this.labelSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); @@ -513,7 +571,7 @@ this.labelSource.ForeColor = System.Drawing.Color.White; this.labelSource.Location = new System.Drawing.Point(10, 10); this.labelSource.Name = "labelSource"; - this.labelSource.Size = new System.Drawing.Size(271, 32); + this.labelSource.Size = new System.Drawing.Size(267, 32); this.labelSource.TabIndex = 1; this.labelSource.Text = "信号源参数设置"; this.labelSource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -522,18 +580,18 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(2, 163); + this.label5.Location = new System.Drawing.Point(4, 172); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(83, 26); this.label5.TabIndex = 2; - this.label5.Text = "电平(mV)"; + this.label5.Text = "电平"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(21, 130); + this.label4.Location = new System.Drawing.Point(25, 136); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 26); this.label4.TabIndex = 2; @@ -544,7 +602,7 @@ // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(25, 53); + this.label3.Location = new System.Drawing.Point(29, 53); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 26); this.label3.TabIndex = 2; @@ -555,35 +613,72 @@ // this.panelCounter.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_ct_counter; this.panelCounter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.panelCounter.Controls.Add(this.inputDevStatus); - this.panelCounter.Controls.Add(this.inputDevType); + this.panelCounter.Controls.Add(this.btn_downCounterList); + this.panelCounter.Controls.Add(this.text_counterCode); + this.panelCounter.Controls.Add(this.comboBox_counters); + this.panelCounter.Controls.Add(this.text_counterIp); this.panelCounter.Controls.Add(this.label1); this.panelCounter.Controls.Add(this.label2); this.panelCounter.Controls.Add(this.labelCounter); this.panelCounter.Location = new System.Drawing.Point(10, 5); this.panelCounter.Name = "panelCounter"; - this.panelCounter.Size = new System.Drawing.Size(291, 134); + this.panelCounter.Size = new System.Drawing.Size(288, 151); this.panelCounter.TabIndex = 0; // - // inputDevStatus + // btn_downCounterList // - this.inputDevStatus.DisplayMember = "Text"; - this.inputDevStatus.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.inputDevStatus.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevStatus.FormattingEnabled = true; - this.inputDevStatus.ItemHeight = 20; - this.inputDevStatus.Items.AddRange(new object[] { + 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(230, 67); + 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_counterCode + // + // + // + // + this.text_counterCode.Border.Class = "TextBoxBorder"; + this.text_counterCode.Border.CornerDiameter = 5; + this.text_counterCode.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterCode.Location = new System.Drawing.Point(102, 65); + this.text_counterCode.Margin = new System.Windows.Forms.Padding(0); + this.text_counterCode.Name = "text_counterCode"; + this.text_counterCode.PreventEnterBeep = true; + this.text_counterCode.Size = new System.Drawing.Size(150, 27); + this.text_counterCode.TabIndex = 53; + // + // comboBox_counters + // + this.comboBox_counters.DisplayMember = "Text"; + this.comboBox_counters.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + 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; + this.comboBox_counters.Items.AddRange(new object[] { this.All, this.tested, this.testing, this.toBeTested}); - this.inputDevStatus.Location = new System.Drawing.Point(95, 50); - this.inputDevStatus.Margin = new System.Windows.Forms.Padding(0); - this.inputDevStatus.MaximumSize = new System.Drawing.Size(150, 0); - this.inputDevStatus.Name = "inputDevStatus"; - this.inputDevStatus.Size = new System.Drawing.Size(150, 26); - this.inputDevStatus.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.inputDevStatus.TabIndex = 10; + this.comboBox_counters.Location = new System.Drawing.Point(102, 65); + this.comboBox_counters.Margin = new System.Windows.Forms.Padding(0); + this.comboBox_counters.MaximumSize = new System.Drawing.Size(150, 0); + this.comboBox_counters.Name = "comboBox_counters"; + this.comboBox_counters.Size = new System.Drawing.Size(150, 27); + this.comboBox_counters.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_counters.TabIndex = 10; + this.comboBox_counters.SelectedIndexChanged += new System.EventHandler(this.comboBox_counters_SelectedIndexChanged); // // All // @@ -601,29 +696,30 @@ // this.toBeTested.Text = "已检测"; // - // inputDevType + // text_counterIp // // // // - this.inputDevType.Border.Class = "TextBoxBorder"; - this.inputDevType.Border.CornerDiameter = 5; - this.inputDevType.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.inputDevType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.inputDevType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.inputDevType.Location = new System.Drawing.Point(95, 86); - this.inputDevType.Margin = new System.Windows.Forms.Padding(0); - this.inputDevType.MaximumSize = new System.Drawing.Size(150, 26); - this.inputDevType.Name = "inputDevType"; - this.inputDevType.PreventEnterBeep = true; - this.inputDevType.Size = new System.Drawing.Size(150, 26); - this.inputDevType.TabIndex = 9; + this.text_counterIp.Border.Class = "TextBoxBorder"; + this.text_counterIp.Border.CornerDiameter = 5; + this.text_counterIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_counterIp.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.text_counterIp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.text_counterIp.Location = new System.Drawing.Point(102, 101); + this.text_counterIp.Margin = new System.Windows.Forms.Padding(0); + this.text_counterIp.MaximumSize = new System.Drawing.Size(150, 26); + this.text_counterIp.Name = "text_counterIp"; + this.text_counterIp.PreventEnterBeep = true; + this.text_counterIp.ReadOnly = true; + this.text_counterIp.Size = new System.Drawing.Size(150, 26); + this.text_counterIp.TabIndex = 9; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(10, 86); + this.label1.Location = new System.Drawing.Point(15, 101); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 26); this.label1.TabIndex = 2; @@ -634,7 +730,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(14, 50); + this.label2.Location = new System.Drawing.Point(15, 65); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 26); this.label2.TabIndex = 2; @@ -648,7 +744,7 @@ this.labelCounter.ForeColor = System.Drawing.Color.White; this.labelCounter.Location = new System.Drawing.Point(10, 10); this.labelCounter.Name = "labelCounter"; - this.labelCounter.Size = new System.Drawing.Size(271, 32); + this.labelCounter.Size = new System.Drawing.Size(268, 32); this.labelCounter.TabIndex = 1; this.labelCounter.Text = "计数器参数设置"; this.labelCounter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -658,9 +754,6 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - this.Controls.Add(this.roundButton2); - this.Controls.Add(this.roundButton1); - this.Controls.Add(this.benDelete); this.Controls.Add(this.panel1); this.Controls.Add(this.panelMedian); this.Controls.Add(this.panelControl); @@ -669,7 +762,7 @@ this.Name = "CounterCtrlForm"; this.Size = new System.Drawing.Size(1024, 654); this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tableCounterResult)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_CounterResult)).EndInit(); this.panelMedian.ResumeLayout(false); this.panelControl.ResumeLayout(false); this.panelSource.ResumeLayout(false); @@ -695,39 +788,40 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private RoundButton benEdit; - private System.Windows.Forms.ListBox listBox1; private RoundButton benDelete; - private RoundButton roundButton1; - private RoundButton roundButton2; - private System.Windows.Forms.DataGridView tableCounterResult; - private DevComponents.DotNetBar.Controls.TextBoxX inputDevType; - private DevComponents.DotNetBar.Controls.ComboBoxEx inputDevStatus; + private RoundButton btn_add; + private System.Windows.Forms.DataGridView dataGridView_CounterResult; + private DevComponents.DotNetBar.Controls.TextBoxX text_counterIp; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_counters; private DevComponents.Editors.ComboItem All; private DevComponents.Editors.ComboItem tested; private DevComponents.Editors.ComboItem testing; private DevComponents.Editors.ComboItem toBeTested; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx2; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_frequency; private DevComponents.Editors.ComboItem comboItem5; private DevComponents.Editors.ComboItem comboItem6; private DevComponents.Editors.ComboItem comboItem7; private DevComponents.Editors.ComboItem comboItem8; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx1; - private DevComponents.Editors.ComboItem comboItem1; - private DevComponents.Editors.ComboItem comboItem2; - private DevComponents.Editors.ComboItem comboItem3; - private DevComponents.Editors.ComboItem comboItem4; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx3; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_unit; private DevComponents.Editors.ComboItem comboItem9; private DevComponents.Editors.ComboItem comboItem10; private DevComponents.Editors.ComboItem comboItem11; private DevComponents.Editors.ComboItem comboItem12; private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; private RoundButton roundButton3; - private DevComponents.DotNetBar.Controls.ComboBoxEx comboBoxEx4; - private DevComponents.Editors.ComboItem comboItem13; - private DevComponents.Editors.ComboItem comboItem14; - private DevComponents.Editors.ComboItem comboItem15; - private DevComponents.Editors.ComboItem comboItem16; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_detecModel; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; private System.Windows.Forms.Label label6; + private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; + private System.Windows.Forms.Button btn_downCounterList; + public DevComponents.DotNetBar.Controls.TextBoxX text_counterCode; + private System.Windows.Forms.Button button3; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private System.Windows.Forms.Button button2; + public DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private System.Windows.Forms.Button btn_dropDetecModel; + public DevComponents.DotNetBar.Controls.TextBoxX textBox_detecModel; + private System.Windows.Forms.Label label7; } } diff --git a/RbFreqStandMeasure/counter/CounterCtrlForm.cs b/RbFreqStandMeasure/counter/CounterCtrlForm.cs index a107c4e..ecd9c0d 100644 --- a/RbFreqStandMeasure/counter/CounterCtrlForm.cs +++ b/RbFreqStandMeasure/counter/CounterCtrlForm.cs @@ -1,4 +1,8 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -11,7 +15,13 @@ { public partial class CounterCtrlForm : UserControl { - DataTable counterResults = null; + DataTable table_counterDetecInit = null; + DeviceService deviceService = new DeviceServiceImpl(); + DictService dictService = new DictServiceImpl(); + CounterDetecInitService counterDetecInitService = new CounterDetecInitServiceImpl(); + + Label colStdValue = new Label(); + Label colValue = new Label(); #region 样式常量定影 private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 @@ -22,14 +32,21 @@ { InitializeComponent(); + List list = deviceService.getAllCounter(); + + comboBox_counters.DataSource = list; + comboBox_counters.DisplayMember = "DevCode"; + comboBox_counters.ValueMember = "Id"; InitTableCounter(); - LoadCounterResultList(); + LoadCounterDetecInitList(); + + CounterParam counterParam = dictService.getCounterParam(); + text_counterIp.Text = counterParam.GeneratorIp; } private void InitTableCounter() { - tableCounterResult.Columns.Clear(); - tableCounterResult.Rows.Clear(); + dataGridView_CounterResult.DataSource = null; // 添加标题栏 Panel tableHeader = new Panel @@ -39,7 +56,7 @@ Location = new Point(0, 0) }; tableHeader.BackColor = titleBackColor; - tableCounterResult.Controls.Add(tableHeader); + dataGridView_CounterResult.Controls.Add(tableHeader); // 序号 Label colIndex = new Label @@ -53,7 +70,7 @@ Location = new Point(0, 0), Size = new Size(50, 50) }; - tableCounterResult.Controls.Add(colIndex); + dataGridView_CounterResult.Controls.Add(colIndex); colIndex.BringToFront(); // 仪器型号 @@ -65,10 +82,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器型号", - Location = new Point(50, 0), + Location = new Point(46, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevType); + dataGridView_CounterResult.Controls.Add(colDevType); colDevType.BringToFront(); // 仪器编号 @@ -80,10 +97,10 @@ BackColor = titleBackColor, AutoSize = false, Text = "仪器编号", - Location = new Point(150, 0), + Location = new Point(145, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevNo); + dataGridView_CounterResult.Controls.Add(colDevNo); colDevNo.BringToFront(); // 描述/端口 @@ -95,94 +112,237 @@ BackColor = titleBackColor, AutoSize = false, Text = "描述/端口", - Location = new Point(250, 0), + Location = new Point(240, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colDevPort); + dataGridView_CounterResult.Controls.Add(colDevPort); colDevPort.BringToFront(); // 标称值 - Label colStdValue = new Label + colStdValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "标称值", - Location = new Point(350, 0), + Text = "输出频率", + Location = new Point(328, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colStdValue); + dataGridView_CounterResult.Controls.Add(colStdValue); colStdValue.BringToFront(); // 指标值 - Label colValue = new Label + colValue = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "指标值", - Location = new Point(450, 0), + Text = "测量频率", + Location = new Point(413, 0), Size = new Size(100, 50) }; - tableCounterResult.Controls.Add(colValue); + dataGridView_CounterResult.Controls.Add(colValue); colValue.BringToFront(); // 创建日期 - Label colCreateTime = new Label + Label colSensitivity = new Label { Font = titleFont, ForeColor = Color.White, TextAlign = ContentAlignment.MiddleCenter, BackColor = titleBackColor, AutoSize = false, - Text = "创建日期", - Location = new Point(550, 0), - Size = new Size(164, 50) + Text = "灵敏度", + Location = new Point(512, 0), + Size = new Size(75, 50) }; - tableCounterResult.Controls.Add(colCreateTime); - colCreateTime.BringToFront(); + dataGridView_CounterResult.Controls.Add(colSensitivity); + colSensitivity.BringToFront(); + + Label colTime = new Label + { + Font = titleFont, + ForeColor = Color.White, + TextAlign = ContentAlignment.MiddleCenter, + BackColor = titleBackColor, + AutoSize = false, + Text = "测量时间", + Location = new Point(588, 0), + Size = new Size(100, 50) + }; + dataGridView_CounterResult.Controls.Add(colTime); + colTime.BringToFront(); + + + dataGridView_CounterResult.Columns.Add("index", ""); + dataGridView_CounterResult.Columns.Add("devType", ""); + dataGridView_CounterResult.Columns.Add("devNo", ""); + dataGridView_CounterResult.Columns.Add("devPort", ""); + dataGridView_CounterResult.Columns.Add("stdValue", ""); + dataGridView_CounterResult.Columns.Add("value", ""); + dataGridView_CounterResult.Columns.Add("sensitivity", ""); + dataGridView_CounterResult.Columns.Add("logTime", ""); + dataGridView_CounterResult.Columns.Add("id", ""); } - private void LoadCounterResultList() + private void LoadCounterDetecInitList() { - counterResults = new DataTable(); + table_counterDetecInit = new DataTable(); - counterResults.Columns.Add("index", Type.GetType("System.String")); - counterResults.Columns.Add("devType", Type.GetType("System.String")); - counterResults.Columns.Add("devNo", Type.GetType("System.String")); - counterResults.Columns.Add("devPort", Type.GetType("System.String")); - counterResults.Columns.Add("stdValue", Type.GetType("System.String")); - counterResults.Columns.Add("value", Type.GetType("System.String")); - counterResults.Columns.Add("createTime", Type.GetType("System.DateTime")); + table_counterDetecInit.Columns.Add("index", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devType", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devNo", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("devPort", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("stdValue", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("value", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("sensitivity", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("logTime", Type.GetType("System.String")); + table_counterDetecInit.Columns.Add("id", Type.GetType("System.Int32")); - counterResults.Rows.Add("1", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("2", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("3", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("4", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); - counterResults.Rows.Add("5", "53250A", "123456", "输入A", "10Hz", "12Hz", DateTime.Now); + if (text_counterCode.Text != "") + { + string devType = ""; + string devCode = ""; + string devPort = "输入A"; + + List list =deviceService.search("", text_counterCode.Text,"","","",""); + if (null != list && list.Count > 0) + { + devType = list[0].DevTypeName; + devCode = list[0].DevCode; + } - tableCounterResult.DataSource = counterResults; + // 获取数据 + List queryList = counterDetecInitService.getAll(); + if (null != queryList && queryList.Count > 0) + { + int index = 1; + foreach (CounterDetecInit counterDetecInit in queryList) + { + if (textBox_detecModel.Text.Equals("周期测量")) + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Cycle,"","","", counterDetecInit.Id); + + } + else + { + table_counterDetecInit.Rows.Add(index, devType, devCode, devPort,counterDetecInit.Frequency,"","","", counterDetecInit.Id); + } + dataGridView_CounterResult.Rows.Add(table_counterDetecInit.Rows[index - 1]); + } - // width=714px - tableCounterResult.Columns[0].Width = 50; - tableCounterResult.Columns[1].Width = 100; - tableCounterResult.Columns[2].Width = 100; - tableCounterResult.Columns[3].Width = 100; - tableCounterResult.Columns[4].Width = 100; - tableCounterResult.Columns[5].Width = 100; - tableCounterResult.Columns[6].Width = 164; + //dataGridView_CounterResult.DataSource = table_counterDetecInit; - tableCounterResult.Columns[0].ReadOnly = true; - tableCounterResult.Columns[1].ReadOnly = true; - tableCounterResult.Columns[2].ReadOnly = true; - tableCounterResult.Columns[3].ReadOnly = true; - tableCounterResult.Columns[4].ReadOnly = true; - tableCounterResult.Columns[5].ReadOnly = true; - tableCounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[8].Visible = false; + + // width=714px + dataGridView_CounterResult.Columns[0].Width = 50; + dataGridView_CounterResult.Columns[1].Width = 95; + dataGridView_CounterResult.Columns[2].Width = 95; + dataGridView_CounterResult.Columns[3].Width = 95; + dataGridView_CounterResult.Columns[4].Width = 85; + dataGridView_CounterResult.Columns[5].Width = 85; + dataGridView_CounterResult.Columns[6].Width = 85; + dataGridView_CounterResult.Columns[7].Width = 104; + + dataGridView_CounterResult.Columns[0].ReadOnly = true; + dataGridView_CounterResult.Columns[1].ReadOnly = true; + dataGridView_CounterResult.Columns[2].ReadOnly = true; + dataGridView_CounterResult.Columns[3].ReadOnly = true; + dataGridView_CounterResult.Columns[4].ReadOnly = true; + dataGridView_CounterResult.Columns[5].ReadOnly = true; + dataGridView_CounterResult.Columns[6].ReadOnly = true; + dataGridView_CounterResult.Columns[7].ReadOnly = true; + + + } + else + { + //tableToBeTested.Visible = false; + //labelNodata.Visible = true; + } + + } + } + + private void btn_downCounterList_Click(object sender, EventArgs e) + { + comboBox_counters.DroppedDown = true; + } + + private void comboBox_counters_SelectedIndexChanged(object sender, EventArgs e) + { + text_counterCode.Text = ((DeviceDto)comboBox_counters.SelectedItem).DevCode; + LoadCounterDetecInitList(); + + } + + private void btn_dropDetecModel_Click(object sender, EventArgs e) + { + comboBox_detecModel.DroppedDown = true; } + + private void comboBox_detecModel_SelectedIndexChanged(object sender, EventArgs e) + { + textBox_detecModel.Text = comboBox_detecModel.SelectedItem.ToString(); + if (textBox_detecModel.Text.Equals("频率测量")) + { + colStdValue.Text = "输出频率"; + colValue.Text = "测量频率"; + } + else if (textBox_detecModel.Text.Equals("周期测量")) + { + colStdValue.Text = "输出周期"; + colValue.Text = "测量周期"; + } + } + + private void dataGridView_CounterResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 6 || e.ColumnIndex == 7) + { + dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].ReadOnly = false;//将当前单元格设为可读 + dataGridView_CounterResult.CurrentCell = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex];//获取当前单元格 + dataGridView_CounterResult.BeginEdit(true);//将单元格设为编辑状态 + } + } + + private void dataGridView_CounterResult_CellValuePushed(object sender, DataGridViewCellValueEventArgs e) + { + int id = Convert.ToInt32(dataGridView_CounterResult.Rows[e.RowIndex].Cells[8].Value); + string value = dataGridView_CounterResult.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); + if (e.ColumnIndex == 4) + { + if (textBox_detecModel.Text.Equals("周期测量")) counterDetecInitService.update(id,"",value); + else counterDetecInitService.update(id, value, ""); + } + } + + private void benDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + == DialogResult.Yes) + { + //deviceService.delete(Convert.ToInt32(dataGridView_DevList.Rows[dataGridView_DevList.CurrentRow.Index].Cells[8].Value)); + MessageBox.Show("删除成功", "提示"); + //LoadCounterDetecInitList(); + } + } + + private void btn_add_Click(object sender, EventArgs e) + { + int index = dataGridView_CounterResult.Rows.Add(); + dataGridView_CounterResult.Rows[index].Cells[0].Value = "1"; + dataGridView_CounterResult.Rows[index].Cells[1].Value = "2"; + dataGridView_CounterResult.Rows[index].Cells[2].Value = "监听"; + } + + private void roundButton1_Click(object sender, EventArgs e) + { + } } } diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs index fab6451..fe9267b 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.Designer.cs @@ -65,11 +65,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label12 = new System.Windows.Forms.Label(); - this.radio_1s = new System.Windows.Forms.RadioButton(); - this.radio_10s = new System.Windows.Forms.RadioButton(); - this.radio_20s = new System.Windows.Forms.RadioButton(); this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); + this.label12 = new System.Windows.Forms.Label(); this.btnCancelSetChannel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.panel1.SuspendLayout(); @@ -425,7 +425,7 @@ this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Location = new System.Drawing.Point(9, 206); + this.groupBox2.Location = new System.Drawing.Point(9, 209); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(617, 128); this.groupBox2.TabIndex = 15; @@ -667,42 +667,18 @@ this.groupBox3.TabIndex = 16; this.groupBox3.TabStop = false; // - // label12 + // radio_100s // - this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(10, 17); - this.label12.Margin = new System.Windows.Forms.Padding(0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(107, 27); - this.label12.TabIndex = 10; - this.label12.Text = "稳定度采样时间"; - this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // radio_1s - // - this.radio_1s.AutoSize = true; - this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_1s.Location = new System.Drawing.Point(126, 20); - this.radio_1s.Name = "radio_1s"; - this.radio_1s.Size = new System.Drawing.Size(41, 24); - this.radio_1s.TabIndex = 15; - this.radio_1s.TabStop = true; - this.radio_1s.Tag = "1"; - this.radio_1s.Text = "1s"; - this.radio_1s.UseVisualStyleBackColor = true; - // - // radio_10s - // - this.radio_10s.AutoSize = true; - this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_10s.Location = new System.Drawing.Point(244, 19); - this.radio_10s.Name = "radio_10s"; - this.radio_10s.Size = new System.Drawing.Size(49, 24); - this.radio_10s.TabIndex = 16; - this.radio_10s.TabStop = true; - this.radio_10s.Tag = "10"; - this.radio_10s.Text = "10s"; - this.radio_10s.UseVisualStyleBackColor = true; + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(479, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 18; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; // // radio_20s // @@ -717,18 +693,42 @@ this.radio_20s.Text = "20s"; this.radio_20s.UseVisualStyleBackColor = true; // - // radio_100s + // radio_10s // - this.radio_100s.AutoSize = true; - this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.radio_100s.Location = new System.Drawing.Point(479, 19); - this.radio_100s.Name = "radio_100s"; - this.radio_100s.Size = new System.Drawing.Size(57, 24); - this.radio_100s.TabIndex = 18; - this.radio_100s.TabStop = true; - this.radio_100s.Tag = "100"; - this.radio_100s.Text = "100s"; - this.radio_100s.UseVisualStyleBackColor = true; + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(244, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 16; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(126, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 15; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(10, 17); + this.label12.Margin = new System.Windows.Forms.Padding(0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(107, 27); + this.label12.TabIndex = 10; + this.label12.Text = "稳定度采样时间"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnCancelSetChannel // diff --git a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs index 3dd891a..b009dd6 100644 --- a/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs +++ b/RbFreqStandMeasure/home/SetDevTestDlg.Designer.cs @@ -420,7 +420,7 @@ this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); this.groupBox2.Controls.Add(this.label12); - this.groupBox2.Location = new System.Drawing.Point(10, 167); + this.groupBox2.Location = new System.Drawing.Point(10, 169); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(619, 129); diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index d5ff4fa..7f555e1 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -34,6 +34,12 @@ this.btnExitDev = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.btn_downTypeList = new System.Windows.Forms.Button(); this.text_devType = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label7 = new System.Windows.Forms.Label(); @@ -63,23 +69,23 @@ this.checkBox_bootFeature = new System.Windows.Forms.CheckBox(); this.checkBox_accuracy = new System.Windows.Forms.CheckBox(); this.checkBox_stability = new System.Windows.Forms.CheckBox(); - this.endTimeEst = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.endTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.startTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.label3 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label6 = new System.Windows.Forms.Label(); - this.checkBox_100s = new System.Windows.Forms.CheckBox(); - this.checkBox_20s = new System.Windows.Forms.CheckBox(); - this.checkBox_10s = new System.Windows.Forms.CheckBox(); - this.checkBox_1s = new System.Windows.Forms.CheckBox(); this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.btnCancelSetDev = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.radio_100s = new System.Windows.Forms.RadioButton(); + this.radio_20s = new System.Windows.Forms.RadioButton(); + this.radio_10s = new System.Windows.Forms.RadioButton(); + this.radio_1s = new System.Windows.Forms.RadioButton(); this.panel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -133,10 +139,16 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "添加送检仪器"; + this.labelTitle.Text = "添加"; // // groupBox4 // + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.btn_downTypeList); this.groupBox4.Controls.Add(this.text_devType); this.groupBox4.Controls.Add(this.label7); @@ -162,6 +174,84 @@ this.groupBox4.TabStop = false; this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter); // + // label17 + // + this.label17.AutoSize = true; + this.label17.BackColor = System.Drawing.Color.Transparent; + this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.ForeColor = System.Drawing.Color.OrangeRed; + this.label17.Location = new System.Drawing.Point(323, 98); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(17, 21); + this.label17.TabIndex = 351; + this.label17.Text = "*"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Transparent; + this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.ForeColor = System.Drawing.Color.OrangeRed; + this.label16.Location = new System.Drawing.Point(19, 102); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 21); + this.label16.TabIndex = 350; + this.label16.Text = "*"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.BackColor = System.Drawing.Color.Transparent; + this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.OrangeRed; + this.label15.Location = new System.Drawing.Point(309, 60); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(17, 21); + this.label15.TabIndex = 349; + this.label15.Text = "*"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.BackColor = System.Drawing.Color.Transparent; + this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.OrangeRed; + this.label11.Location = new System.Drawing.Point(19, 60); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(17, 21); + this.label11.TabIndex = 348; + this.label11.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.Transparent; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.OrangeRed; + this.label10.Location = new System.Drawing.Point(309, 23); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(17, 21); + this.label10.TabIndex = 347; + this.label10.Text = "*"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.Transparent; + this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.ForeColor = System.Drawing.Color.OrangeRed; + this.label14.Location = new System.Drawing.Point(19, 22); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(17, 21); + this.label14.TabIndex = 346; + this.label14.Text = "*"; + // // btn_downTypeList // this.btn_downTypeList.BackColor = System.Drawing.Color.White; @@ -341,10 +431,10 @@ // label9 // this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(24, 57); + this.label9.Location = new System.Drawing.Point(32, 57); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 27); + this.label9.Size = new System.Drawing.Size(68, 27); this.label9.TabIndex = 44; this.label9.Text = "仪器型号"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -384,10 +474,10 @@ // label8 // this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(290, 20); + this.label8.Location = new System.Drawing.Point(318, 20); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 27); + this.label8.Size = new System.Drawing.Size(72, 27); this.label8.TabIndex = 43; this.label8.Text = "仪器编号"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -395,10 +485,10 @@ // label5 // this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(17, 20); + this.label5.Location = new System.Drawing.Point(28, 20); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); + this.label5.Size = new System.Drawing.Size(72, 27); this.label5.TabIndex = 42; this.label5.Text = "仪器名称"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -449,13 +539,13 @@ this.groupBox1.Controls.Add(this.checkBox_bootFeature); this.groupBox1.Controls.Add(this.checkBox_accuracy); this.groupBox1.Controls.Add(this.checkBox_stability); - this.groupBox1.Controls.Add(this.endTimeEst); + this.groupBox1.Controls.Add(this.endTime); this.groupBox1.Controls.Add(this.startTime); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(10, 212); + this.groupBox1.Location = new System.Drawing.Point(10, 210); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(617, 140); this.groupBox1.TabIndex = 39; @@ -518,55 +608,55 @@ this.checkBox_stability.UseVisualStyleBackColor = true; this.checkBox_stability.CheckedChanged += new System.EventHandler(this.checkBox_stability_CheckedChanged); // - // endTimeEst + // endTime // // // // - this.endTimeEst.BackgroundStyle.Class = "DateTimeInputBackground"; - this.endTimeEst.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; - this.endTimeEst.ButtonDropDown.Visible = true; - this.endTimeEst.CustomFormat = "yyyy-MM-dd HH:mm"; - this.endTimeEst.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.endTimeEst.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; - this.endTimeEst.IsPopupCalendarOpen = false; - this.endTimeEst.Location = new System.Drawing.Point(395, 94); + this.endTime.BackgroundStyle.Class = "DateTimeInputBackground"; + this.endTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.endTime.ButtonDropDown.Visible = true; + this.endTime.CustomFormat = "yyyy-MM-dd HH:mm"; + this.endTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.endTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; + this.endTime.IsPopupCalendarOpen = false; + this.endTime.Location = new System.Drawing.Point(395, 94); // // // // // // - this.endTimeEst.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); - this.endTimeEst.MonthCalendar.ClearButtonVisible = true; + this.endTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.endTime.MonthCalendar.ClearButtonVisible = true; // // // - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; - this.endTimeEst.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); - this.endTimeEst.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.endTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.endTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.DisplayMonth = new System.DateTime(2021, 3, 1, 0, 0, 0, 0); + this.endTime.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; // // // - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.endTimeEst.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.endTimeEst.MonthCalendar.TodayButtonVisible = true; - this.endTimeEst.Name = "endTimeEst"; - this.endTimeEst.ShowUpDown = true; - this.endTimeEst.Size = new System.Drawing.Size(180, 23); - this.endTimeEst.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.endTimeEst.TabIndex = 44; - this.endTimeEst.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.endTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.endTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.endTime.MonthCalendar.TodayButtonVisible = true; + this.endTime.Name = "endTime"; + this.endTime.ShowUpDown = true; + this.endTime.Size = new System.Drawing.Size(180, 23); + this.endTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.endTime.TabIndex = 44; + this.endTime.Value = new System.DateTime(2021, 3, 24, 15, 59, 31, 0); // // startTime // @@ -653,11 +743,11 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.radio_100s); + this.groupBox2.Controls.Add(this.radio_20s); + this.groupBox2.Controls.Add(this.radio_10s); + this.groupBox2.Controls.Add(this.radio_1s); this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.checkBox_100s); - this.groupBox2.Controls.Add(this.checkBox_20s); - this.groupBox2.Controls.Add(this.checkBox_10s); - this.groupBox2.Controls.Add(this.checkBox_1s); this.groupBox2.Enabled = false; this.groupBox2.Location = new System.Drawing.Point(9, 353); this.groupBox2.Name = "groupBox2"; @@ -676,50 +766,6 @@ this.label6.Text = "频率稳定度"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // checkBox_100s - // - this.checkBox_100s.AutoSize = true; - this.checkBox_100s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_100s.Location = new System.Drawing.Point(468, 19); - this.checkBox_100s.Name = "checkBox_100s"; - this.checkBox_100s.Size = new System.Drawing.Size(60, 24); - this.checkBox_100s.TabIndex = 42; - this.checkBox_100s.Text = "100S"; - this.checkBox_100s.UseVisualStyleBackColor = true; - // - // checkBox_20s - // - this.checkBox_20s.AutoSize = true; - this.checkBox_20s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_20s.Location = new System.Drawing.Point(349, 19); - this.checkBox_20s.Name = "checkBox_20s"; - this.checkBox_20s.Size = new System.Drawing.Size(52, 24); - this.checkBox_20s.TabIndex = 41; - this.checkBox_20s.Text = "20S"; - this.checkBox_20s.UseVisualStyleBackColor = true; - // - // checkBox_10s - // - this.checkBox_10s.AutoSize = true; - this.checkBox_10s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_10s.Location = new System.Drawing.Point(233, 19); - this.checkBox_10s.Name = "checkBox_10s"; - this.checkBox_10s.Size = new System.Drawing.Size(52, 24); - this.checkBox_10s.TabIndex = 40; - this.checkBox_10s.Text = "10S"; - this.checkBox_10s.UseVisualStyleBackColor = true; - // - // checkBox_1s - // - this.checkBox_1s.AutoSize = true; - this.checkBox_1s.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.checkBox_1s.Location = new System.Drawing.Point(115, 19); - this.checkBox_1s.Name = "checkBox_1s"; - this.checkBox_1s.Size = new System.Drawing.Size(44, 24); - this.checkBox_1s.TabIndex = 39; - this.checkBox_1s.Text = "1S"; - this.checkBox_1s.UseVisualStyleBackColor = true; - // // btnSave // this.btnSave.EnterBackColor = System.Drawing.Color.Blue; @@ -766,6 +812,58 @@ this.btnCancelSetDev.UseVisualStyleBackColor = true; this.btnCancelSetDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // + // radio_100s + // + this.radio_100s.AutoSize = true; + this.radio_100s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_100s.Location = new System.Drawing.Point(468, 19); + this.radio_100s.Name = "radio_100s"; + this.radio_100s.Size = new System.Drawing.Size(57, 24); + this.radio_100s.TabIndex = 47; + this.radio_100s.TabStop = true; + this.radio_100s.Tag = "100"; + this.radio_100s.Text = "100s"; + this.radio_100s.UseVisualStyleBackColor = true; + // + // radio_20s + // + this.radio_20s.AutoSize = true; + this.radio_20s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_20s.Location = new System.Drawing.Point(349, 20); + this.radio_20s.Name = "radio_20s"; + this.radio_20s.Size = new System.Drawing.Size(49, 24); + this.radio_20s.TabIndex = 46; + this.radio_20s.TabStop = true; + this.radio_20s.Tag = "20"; + this.radio_20s.Text = "20s"; + this.radio_20s.UseVisualStyleBackColor = true; + // + // radio_10s + // + this.radio_10s.AutoSize = true; + this.radio_10s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_10s.Location = new System.Drawing.Point(233, 19); + this.radio_10s.Name = "radio_10s"; + this.radio_10s.Size = new System.Drawing.Size(49, 24); + this.radio_10s.TabIndex = 45; + this.radio_10s.TabStop = true; + this.radio_10s.Tag = "10"; + this.radio_10s.Text = "10s"; + this.radio_10s.UseVisualStyleBackColor = true; + // + // radio_1s + // + this.radio_1s.AutoSize = true; + this.radio_1s.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radio_1s.Location = new System.Drawing.Point(115, 20); + this.radio_1s.Name = "radio_1s"; + this.radio_1s.Size = new System.Drawing.Size(41, 24); + this.radio_1s.TabIndex = 44; + this.radio_1s.TabStop = true; + this.radio_1s.Tag = "1"; + this.radio_1s.Text = "1s"; + this.radio_1s.UseVisualStyleBackColor = true; + // // AddDevDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -786,9 +884,10 @@ this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.endTimeEst)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.endTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.startTime)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); @@ -815,11 +914,9 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label6; public DevComponents.DotNetBar.Controls.TextBoxX text_channelNo; private System.Windows.Forms.Button btn_downTypeList; @@ -832,12 +929,8 @@ public DevComponents.DotNetBar.Controls.TextBoxX inputDevName; public DevComponents.DotNetBar.Controls.TextBoxX text_devType; public System.Windows.Forms.CheckBox checkBox_startNow; - public DevComponents.Editors.DateTimeAdv.DateTimeInput endTimeEst; + public DevComponents.Editors.DateTimeAdv.DateTimeInput endTime; public DevComponents.Editors.DateTimeAdv.DateTimeInput startTime; - public System.Windows.Forms.CheckBox checkBox_100s; - public System.Windows.Forms.CheckBox checkBox_20s; - public System.Windows.Forms.CheckBox checkBox_10s; - public System.Windows.Forms.CheckBox checkBox_1s; public System.Windows.Forms.CheckBox checkBox_count; public System.Windows.Forms.CheckBox checkBox_ageRate; public System.Windows.Forms.CheckBox checkBox_bootFeature; @@ -845,5 +938,17 @@ public System.Windows.Forms.CheckBox checkBox_stability; public System.Windows.Forms.Button btn_downChannelList; public RoundButton btnSave; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.RadioButton radio_100s; + private System.Windows.Forms.RadioButton radio_20s; + private System.Windows.Forms.RadioButton radio_10s; + private System.Windows.Forms.RadioButton radio_1s; + public System.Windows.Forms.GroupBox groupBox1; + public System.Windows.Forms.GroupBox groupBox2; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/AddDevDlg.cs b/RbFreqStandMeasure/info/AddDevDlg.cs index a2dbf38..d5d2e7e 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.cs @@ -1,9 +1,11 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -41,7 +43,11 @@ { InitializeComponent(); - cbBox_devType.DataSource = dictService.getTypeListByCodeType("devType"); + List dictList = dictService.getTypeListByCodeType("devType"); + cbBox_devType.DataSource = dictList; + cbBox_devType.DisplayMember = "Name"; + cbBox_devType.ValueMember = "Code"; + btnSave.Text = "添加仪器"; if (HomeCtrlForm.channelFreeList.Count > 0) { @@ -50,10 +56,11 @@ { cbBox_channelFree.Items.Add(item); } + } else { - text_channelNo.WatermarkText = "无空闲通道可选"; + text_channelNo.WatermarkText = "无空闲通道"; } } @@ -67,11 +74,35 @@ // 添加并开始检测 private void btnSave_Click(object sender, EventArgs e) { + if (inputDevName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器名称!");return; + } + if (inputDevCode.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器编号!"); return; + } + if (inputDevModel.Text.Trim().Equals("")) + { + MessageBox.Show("请输入仪器型号!"); return; + } + if (text_devType.Text.Trim().Equals("")) + { + MessageBox.Show("请选择仪器类型!"); return; + } + if (inputCustComp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入送检单位!"); return; + } + if (inputCustName.Text.Trim().Equals("")) + { + MessageBox.Show("请输入联系人!"); return; + } if (text_channelNo.Text.Trim() != "") { - if (checkBox_stability.Checked && !checkBox_1s.Checked && !checkBox_10s.Checked && !checkBox_20s.Checked && !checkBox_100s.Checked) + if (checkBox_stability.Checked && !radio_1s.Checked && !radio_10s.Checked && !radio_20s.Checked && !radio_100s.Checked) { - MessageBox.Show("请选择频率稳定度!"); + MessageBox.Show("请选择频率稳定度采样时间!"); return; } if (!checkBox_accuracy.Checked && !checkBox_stability.Checked && !checkBox_ageRate.Checked && !checkBox_bootFeature.Checked && !checkBox_count.Checked) @@ -86,28 +117,64 @@ string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + string devTypeCode = cbBox_devType.SelectedValue.ToString(); - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("cbBox_channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + string channelNo = text_channelNo.Text; // 初始化数据访问接口 DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + + if (labelTitle.Text.Equals("添加")) { - if (btnSave.Text.Equals("添加并开始检测")) + long deviceId = devService.add(devName, devCode, devTypeCode, devModel, devCustomComp, devCustomName, channelNo); + if (deviceId != -1) { - //detectionItemService.add(deviceId, timePicker_startTime.Value, timePicker_endTime.Value, stability, accuracy, bootFeature, ageRate, interval); - // 重新加载首页的通道状态 - HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + if (btnSave.Text.Equals("添加并开始检测")) + { + string stability = "-3"; + string accuracy = "-3"; + string bootFeature = "-3"; + string ageRate = "-3"; + string interval = ""; + if (checkBox_startNow.Checked || startTime.Value == DateTime.Now) + { + if (checkBox_stability.Checked) { stability = "-1"; } + if (checkBox_accuracy.Checked) accuracy = "-1"; + if (checkBox_bootFeature.Checked) bootFeature = "-1"; + if (checkBox_ageRate.Checked) ageRate = "-1"; + } + else + { + if (checkBox_stability.Checked) stability = "-2"; + if (checkBox_accuracy.Checked) accuracy = "-2"; + if (checkBox_bootFeature.Checked) bootFeature = "-2"; + if (checkBox_ageRate.Checked) ageRate = "-2"; + } + + if (checkBox_stability.Checked) + { + if (radio_1s.Checked) interval = "1"; + else if (radio_10s.Checked) interval = "10"; + else if (radio_20s.Checked) interval = "20"; + else if (radio_100s.Checked) interval = "100"; + } + detectionItemService.add(deviceId, startTime.Value, endTime.Value, stability, accuracy, bootFeature, ageRate, interval,text_channelNo.Text); + // 重新加载首页的通道状态 + HomeCtrlForm.homeCtrlForm.LoadChannelStatus(); + } + // 添加成功,继续保存检测项目和开始时间 + this.HideMaskAction(); + + } - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); - + else + { + LogHelper.WriteErrorLog(this.GetType(), "添仪器[" + devName + "]失败"); + } } - else + else if (labelTitle.Text.Equals("修改")) { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + } } @@ -140,7 +207,7 @@ private void cbBox_devType_SelectedIndexChanged(object sender, EventArgs e) { - text_devType.Text = cbBox_devType.SelectedItem.ToString(); + text_devType.Text = ((Dict)cbBox_devType.SelectedItem).Name; } private void cbBox_channelFree_SelectedIndexChanged(object sender, EventArgs e) diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index cd2d36c..77ac28c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,8 +29,11 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); @@ -39,13 +42,6 @@ this.channel3 = new DevComponents.Editors.ComboItem(); this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.button1 = new System.Windows.Forms.Button(); - this.btn_ageRate = new System.Windows.Forms.Button(); - this.btn_bootFeature = new System.Windows.Forms.Button(); - this.btn_accurary = new System.Windows.Forms.Button(); - this.btn_stability = new System.Windows.Forms.Button(); - this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label_customerComp = new System.Windows.Forms.Label(); this.label_devCode = new System.Windows.Forms.Label(); @@ -56,18 +52,27 @@ this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.panel_result = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label_noTimes = new System.Windows.Forms.Label(); this.dataGridView_times = new System.Windows.Forms.DataGridView(); this.label_noData = new System.Windows.Forms.Label(); - this.label_noTimes = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tab_stability = new System.Windows.Forms.TabPage(); + this.tab_accuracy = new System.Windows.Forms.TabPage(); + this.tab_bootFeature = new System.Windows.Forms.TabPage(); + this.tab_ageRate = new System.Windows.Forms.TabPage(); + this.tab_count = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dataGridView_Data = new System.Windows.Forms.DataGridView(); this.panel1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -133,111 +138,6 @@ this.channel5.Text = "通道5"; this.channel5.Value = "5"; // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label_noData); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.btn_ageRate); - this.groupBox1.Controls.Add(this.btn_bootFeature); - this.groupBox1.Controls.Add(this.btn_accurary); - this.groupBox1.Controls.Add(this.btn_stability); - this.groupBox1.Controls.Add(this.dataGridView_Data); - this.groupBox1.Location = new System.Drawing.Point(8, 39); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(439, 493); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; - // - // btn_ageRate - // - this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_ageRate.Location = new System.Drawing.Point(240, 446); - this.btn_ageRate.Name = "btn_ageRate"; - this.btn_ageRate.Size = new System.Drawing.Size(75, 31); - this.btn_ageRate.TabIndex = 7; - this.btn_ageRate.Text = "日老化率"; - this.btn_ageRate.UseVisualStyleBackColor = true; - // - // btn_bootFeature - // - this.btn_bootFeature.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_bootFeature.Location = new System.Drawing.Point(161, 446); - this.btn_bootFeature.Name = "btn_bootFeature"; - this.btn_bootFeature.Size = new System.Drawing.Size(80, 31); - this.btn_bootFeature.TabIndex = 6; - this.btn_bootFeature.Text = "开机特性"; - this.btn_bootFeature.UseVisualStyleBackColor = true; - // - // btn_accurary - // - this.btn_accurary.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_accurary.Location = new System.Drawing.Point(83, 446); - this.btn_accurary.Name = "btn_accurary"; - this.btn_accurary.Size = new System.Drawing.Size(79, 31); - this.btn_accurary.TabIndex = 5; - this.btn_accurary.Text = "频率准确度"; - this.btn_accurary.UseVisualStyleBackColor = true; - // - // btn_stability - // - this.btn_stability.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btn_stability.Location = new System.Drawing.Point(4, 446); - this.btn_stability.Name = "btn_stability"; - this.btn_stability.Size = new System.Drawing.Size(80, 31); - this.btn_stability.TabIndex = 4; - this.btn_stability.Text = "频率稳定度"; - this.btn_stability.UseVisualStyleBackColor = true; - // - // dataGridView_Data - // - this.dataGridView_Data.AllowUserToAddRows = false; - this.dataGridView_Data.AllowUserToDeleteRows = false; - this.dataGridView_Data.AllowUserToResizeColumns = false; - this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.dataGridView_Data.ColumnHeadersHeight = 40; - this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.dataGridView_Data.Location = new System.Drawing.Point(6, 14); - this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); - this.dataGridView_Data.Name = "dataGridView_Data"; - this.dataGridView_Data.ReadOnly = true; - this.dataGridView_Data.RowHeadersVisible = false; - this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridView_Data.RowTemplate.Height = 44; - this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); - this.dataGridView_Data.TabIndex = 3; - // // groupBox2 // this.groupBox2.Controls.Add(this.label_customerComp); @@ -249,9 +149,10 @@ this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(453, 39); + this.groupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox2.Location = new System.Drawing.Point(464, 50); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(433, 105); + this.groupBox2.Size = new System.Drawing.Size(425, 100); this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "仪器基本信息"; @@ -260,10 +161,11 @@ // this.label_customerComp.BackColor = System.Drawing.Color.Transparent; this.label_customerComp.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerComp.Location = new System.Drawing.Point(319, 64); + this.label_customerComp.ForeColor = System.Drawing.Color.Gray; + this.label_customerComp.Location = new System.Drawing.Point(310, 64); this.label_customerComp.Margin = new System.Windows.Forms.Padding(0); this.label_customerComp.Name = "label_customerComp"; - this.label_customerComp.Size = new System.Drawing.Size(111, 27); + this.label_customerComp.Size = new System.Drawing.Size(120, 27); this.label_customerComp.TabIndex = 80; this.label_customerComp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -271,10 +173,11 @@ // this.label_devCode.BackColor = System.Drawing.Color.Transparent; this.label_devCode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devCode.Location = new System.Drawing.Point(319, 30); + this.label_devCode.ForeColor = System.Drawing.Color.Gray; + this.label_devCode.Location = new System.Drawing.Point(310, 30); this.label_devCode.Margin = new System.Windows.Forms.Padding(0); this.label_devCode.Name = "label_devCode"; - this.label_devCode.Size = new System.Drawing.Size(111, 27); + this.label_devCode.Size = new System.Drawing.Size(120, 27); this.label_devCode.TabIndex = 79; this.label_devCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -282,6 +185,7 @@ // this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_customerName.ForeColor = System.Drawing.Color.Gray; this.label_customerName.Location = new System.Drawing.Point(98, 62); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; @@ -293,6 +197,7 @@ // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.Color.Gray; this.label_devModel.Location = new System.Drawing.Point(98, 30); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; @@ -304,6 +209,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label2.Location = new System.Drawing.Point(18, 62); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; @@ -316,7 +222,8 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(234, 64); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label1.Location = new System.Drawing.Point(225, 64); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(85, 27); @@ -328,6 +235,7 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label9.Location = new System.Drawing.Point(11, 30); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; @@ -340,7 +248,8 @@ // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(238, 30); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label8.Location = new System.Drawing.Point(229, 30); this.label8.Margin = new System.Windows.Forms.Padding(0); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(81, 27); @@ -350,63 +259,43 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.panel2); + this.groupBox3.Controls.Add(this.panel_result); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(453, 288); + this.groupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox3.Location = new System.Drawing.Point(464, 292); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(433, 244); + this.groupBox3.Size = new System.Drawing.Size(425, 278); this.groupBox3.TabIndex = 19; this.groupBox3.TabStop = false; this.groupBox3.Text = "频率稳定度"; // - // panel2 + // panel_result // - this.panel2.Location = new System.Drawing.Point(14, 29); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(405, 199); - this.panel2.TabIndex = 0; + this.panel_result.BackColor = System.Drawing.Color.White; + this.panel_result.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.panel_result.Location = new System.Drawing.Point(11, 26); + this.panel_result.Name = "panel_result"; + this.panel_result.Size = new System.Drawing.Size(405, 246); + this.panel_result.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.label_noTimes); this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(453, 150); + this.groupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox4.Location = new System.Drawing.Point(464, 154); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(433, 132); + this.groupBox4.Size = new System.Drawing.Size(425, 132); this.groupBox4.TabIndex = 81; this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView_times - // - this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; - this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView_times.Location = new System.Drawing.Point(12, 24); - this.dataGridView_times.Name = "dataGridView_times"; - this.dataGridView_times.RowTemplate.Height = 23; - this.dataGridView_times.Size = new System.Drawing.Size(407, 101); - this.dataGridView_times.TabIndex = 0; - // - // label_noData - // - this.label_noData.BackColor = System.Drawing.Color.White; - this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_noData.Location = new System.Drawing.Point(6, 111); - this.label_noData.Margin = new System.Windows.Forms.Padding(0); - this.label_noData.Name = "label_noData"; - this.label_noData.Size = new System.Drawing.Size(425, 27); - this.label_noData.TabIndex = 73; - this.label_noData.Text = "无原始数据"; - this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label_noData.Visible = false; - // // label_noTimes // this.label_noTimes.BackColor = System.Drawing.Color.White; this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.label_noTimes.Location = new System.Drawing.Point(15, 56); this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); this.label_noTimes.Name = "label_noTimes"; @@ -416,28 +305,218 @@ this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label_noTimes.Visible = false; // + // dataGridView_times + // + this.dataGridView_times.AllowUserToAddRows = false; + this.dataGridView_times.AllowUserToDeleteRows = false; + this.dataGridView_times.AllowUserToResizeColumns = false; + this.dataGridView_times.AllowUserToResizeRows = false; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_times.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_times.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView_times.ColumnHeadersHeight = 28; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_times.GridColor = System.Drawing.Color.White; + this.dataGridView_times.Location = new System.Drawing.Point(12, 31); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowHeadersVisible = false; + this.dataGridView_times.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dataGridView_times.RowsDefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.dataGridView_times.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_times.Size = new System.Drawing.Size(404, 91); + this.dataGridView_times.TabIndex = 0; + this.dataGridView_times.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_times_CellClick); + // + // label_noData + // + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.label_noData.Location = new System.Drawing.Point(12, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(420, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl1.Controls.Add(this.tab_stability); + this.tabControl1.Controls.Add(this.tab_accuracy); + this.tabControl1.Controls.Add(this.tab_bootFeature); + this.tabControl1.Controls.Add(this.tab_ageRate); + this.tabControl1.Controls.Add(this.tab_count); + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.HotTrack = true; + this.tabControl1.Location = new System.Drawing.Point(0, 460); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(441, 52); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight; + this.tabControl1.TabIndex = 74; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tab_stability + // + this.tab_stability.BackColor = System.Drawing.Color.White; + this.tab_stability.ForeColor = System.Drawing.Color.Black; + this.tab_stability.Location = new System.Drawing.Point(4, 4); + this.tab_stability.Margin = new System.Windows.Forms.Padding(0); + this.tab_stability.Name = "tab_stability"; + this.tab_stability.Padding = new System.Windows.Forms.Padding(3); + this.tab_stability.Size = new System.Drawing.Size(433, 19); + this.tab_stability.TabIndex = 0; + this.tab_stability.Text = "频率稳定度"; + // + // tab_accuracy + // + this.tab_accuracy.Location = new System.Drawing.Point(4, 4); + this.tab_accuracy.Name = "tab_accuracy"; + this.tab_accuracy.Padding = new System.Windows.Forms.Padding(3); + this.tab_accuracy.Size = new System.Drawing.Size(433, 19); + this.tab_accuracy.TabIndex = 1; + this.tab_accuracy.Text = "频率准确度"; + this.tab_accuracy.UseVisualStyleBackColor = true; + // + // tab_bootFeature + // + this.tab_bootFeature.Location = new System.Drawing.Point(4, 4); + this.tab_bootFeature.Name = "tab_bootFeature"; + this.tab_bootFeature.Padding = new System.Windows.Forms.Padding(3); + this.tab_bootFeature.Size = new System.Drawing.Size(433, 19); + this.tab_bootFeature.TabIndex = 2; + this.tab_bootFeature.Text = "开机特性"; + this.tab_bootFeature.UseVisualStyleBackColor = true; + // + // tab_ageRate + // + this.tab_ageRate.Location = new System.Drawing.Point(4, 4); + this.tab_ageRate.Name = "tab_ageRate"; + this.tab_ageRate.Padding = new System.Windows.Forms.Padding(3); + this.tab_ageRate.Size = new System.Drawing.Size(433, 19); + this.tab_ageRate.TabIndex = 3; + this.tab_ageRate.Text = "日老化率"; + this.tab_ageRate.UseVisualStyleBackColor = true; + // + // tab_count + // + this.tab_count.Location = new System.Drawing.Point(4, 4); + this.tab_count.Name = "tab_count"; + this.tab_count.Padding = new System.Windows.Forms.Padding(3); + this.tab_count.Size = new System.Drawing.Size(433, 19); + this.tab_count.TabIndex = 4; + this.tab_count.Text = "计数器范围及灵敏度"; + this.tab_count.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label_noData); + this.groupBox1.Controls.Add(this.dataGridView_Data); + this.groupBox1.Controls.Add(this.tabControl1); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); + this.groupBox1.Location = new System.Drawing.Point(12, 50); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(441, 520); + this.groupBox1.TabIndex = 20; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "原始测量数据"; + // + // dataGridView_Data + // + this.dataGridView_Data.AllowUserToAddRows = false; + this.dataGridView_Data.AllowUserToDeleteRows = false; + this.dataGridView_Data.AllowUserToResizeColumns = false; + this.dataGridView_Data.AllowUserToResizeRows = false; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView_Data.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dataGridView_Data.ColumnHeadersHeight = 28; + this.dataGridView_Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView_Data.GridColor = System.Drawing.Color.White; + this.dataGridView_Data.Location = new System.Drawing.Point(7, 30); + this.dataGridView_Data.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView_Data.Name = "dataGridView_Data"; + this.dataGridView_Data.ReadOnly = true; + this.dataGridView_Data.RowHeadersVisible = false; + this.dataGridView_Data.RowHeadersWidth = 30; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.NullValue = "-"; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.LightGray; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dataGridView_Data.RowTemplate.Height = 26; + this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridView_Data.Size = new System.Drawing.Size(431, 447); + this.dataGridView_Data.TabIndex = 3; + // // DetailDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(898, 546); + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(898, 587); this.ControlBox = false; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "DetailDlg"; this.Text = "添加检测设备"; this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); this.panel1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).EndInit(); this.ResumeLayout(false); } @@ -451,11 +530,6 @@ private DevComponents.Editors.ComboItem channel3; private DevComponents.Editors.ComboItem channel4; private DevComponents.Editors.ComboItem channel5; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btn_ageRate; - private System.Windows.Forms.Button btn_bootFeature; - private System.Windows.Forms.Button btn_accurary; - private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label_customerComp; private System.Windows.Forms.Label label_devCode; @@ -466,12 +540,18 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button btn_stability; + private System.Windows.Forms.Panel panel_result; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.DataGridView dataGridView_times; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView_Data; private System.Windows.Forms.Label label_noData; private System.Windows.Forms.Label label_noTimes; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tab_stability; + private System.Windows.Forms.TabPage tab_accuracy; + private System.Windows.Forms.TabPage tab_bootFeature; + private System.Windows.Forms.TabPage tab_ageRate; + private System.Windows.Forms.TabPage tab_count; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index 7ef668c..d86b8b9 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -46,6 +46,9 @@ DataTable tableTimes = new DataTable(); DetectionService detectionService = new DetectionServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + long deviceId = -1; + string startTime = ""; + string endTime = ""; public Action HideMaskAction { @@ -57,8 +60,18 @@ { InitializeComponent(); - InitDataGridView_times(); + this.deviceId = deviceId; LoadTimes(deviceId); + + if (tableTimes.Rows.Count > 0) + { + startTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[0].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + LoadData(deviceId, "1", startTime, endTime); + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + } } // 关闭对话框 @@ -69,13 +82,6 @@ // 数据列表 - private void InitDataGridView_Data() - { - dataGridView_Data.Columns.Clear(); - dataGridView_Data.Rows.Clear(); - - } - private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) { tableOriginData = new DataTable(); @@ -88,8 +94,7 @@ // 获取当前页的数据 List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); if (null != queryList && queryList.Count > 0) - { - + { int index = 1; foreach (DetectionDto detection in queryList) { @@ -98,36 +103,36 @@ } label_noData.Visible = false; + + dataGridView_Data.DataSource = tableOriginData; + + // width=425px + dataGridView_Data.Columns[0].Width = 60; + dataGridView_Data.Columns[1].Width = 185; + dataGridView_Data.Columns[2].Width = 180; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + dataGridView_Data.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_Data.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_Data.DataSource = null; label_noData.Visible = true; } - - dataGridView_Data.DataSource = tableOriginData; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } // 检测记录列表 - private void InitDataGridView_times() + private void LoadTimes(long deviceId) { dataGridView_times.Columns.Clear(); dataGridView_times.Rows.Clear(); - } - - private void LoadTimes(long deviceId) - { tableTimes = new DataTable(); // 设置表格的列 @@ -136,36 +141,102 @@ tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); // 获取当前页的数据 - List queryList = detectionItemService.serach(deviceId); + List queryList = detectionItemService.search(deviceId, false); if (null != queryList && queryList.Count > 0) { int index = 1; foreach (DetectionItem detection in queryList) { - tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + tableTimes.Rows.Add(index, detection.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), detection.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); index++; } label_noTimes.Visible = false; + + dataGridView_times.DataSource = tableTimes; + + // width=407px + dataGridView_times.Columns[0].Width = 47; + dataGridView_times.Columns[1].Width = 180; + dataGridView_times.Columns[2].Width = 180; + + + dataGridView_times.Columns[0].ReadOnly = true; + dataGridView_times.Columns[1].ReadOnly = true; + dataGridView_times.Columns[2].ReadOnly = true; + + dataGridView_times.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; + dataGridView_times.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; } else { + dataGridView_times.DataSource = null; label_noTimes.Visible = true; + } + + } + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + string tabPageName = tabControl1.SelectedTab.Name; + tabPageEvent(tabPageName); + } + + private void dataGridView_times_CellClick(object sender, DataGridViewCellEventArgs e) + { + int rowIndex = e.RowIndex; + startTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[1].Value).ToString("yyyy-MM-dd HH:mm:ss"); + endTime = Convert.ToDateTime(dataGridView_times.Rows[rowIndex].Cells[2].Value).ToString("yyyy-MM-dd HH:mm:ss"); + tabPageEvent(tabControl1.SelectedTab.Name); + } + + private void tabPageEvent(string tabPageName) + { + panel_result.Controls.Clear(); + switch (tabPageName) + { + case "tab_stability": + { + LoadData(deviceId, "1", startTime, endTime); + groupBox3.Text = "频率稳定度"; + stability result = new stability(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_accuracy": + { + LoadData(deviceId, "2", startTime, endTime); + groupBox3.Text = "频率准确度"; + accuracy result = new accuracy(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_bootFeature": + { + LoadData(deviceId, "3", startTime, endTime); + groupBox3.Text = "开机特性"; + bootFeature result = new bootFeature(); + result.Show(); + panel_result.Controls.Add(result); + break; + } + case "tab_ageRate": + { + LoadData(deviceId, "4", startTime, endTime); + groupBox3.Text = "日老化率"; + ageRate result = new ageRate(tableOriginData); + result.Show(); + panel_result.Controls.Add(result); + break; + } + default: break; + } - - dataGridView_times.DataSource = tableTimes; - - // width=964px - dataGridView_Data.Columns[0].Width = 80; - dataGridView_Data.Columns[1].Width = 164; - dataGridView_Data.Columns[2].Width = 120; - - - dataGridView_Data.Columns[0].ReadOnly = true; - dataGridView_Data.Columns[1].ReadOnly = true; - dataGridView_Data.Columns[2].ReadOnly = true; - } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 0f08cf1..61d2987 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -1,4 +1,5 @@ using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using DevComponents.DotNetBar.Controls; @@ -197,7 +198,7 @@ devList.Columns.Add("customName", Type.GetType("System.String")); devList.Columns.Add("status", Type.GetType("System.String")); devList.Columns.Add("channelNo", Type.GetType("System.String")); - devList.Columns.Add("id", Type.GetType("System.Int32")); + devList.Columns.Add("id", Type.GetType("System.Int64")); devList.Columns.Add("customerDev", Type.GetType("System.String")); // 分页查询数据库 @@ -345,7 +346,7 @@ DateTimeInput startTimeInput = (DateTimeInput) addDevDlg.Controls.Find("startTime", true)[0]; startTimeInput.Value = DateTime.Now; - DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTimeEst", true)[0]; + DateTimeInput endTimeInput = (DateTimeInput)addDevDlg.Controls.Find("endTime", true)[0]; endTimeInput.Value = DateTime.Now.AddDays(1); addDevDlg.ShowDialog(); @@ -465,13 +466,13 @@ private void btnEdit_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; string devName = (string)dataGridView_DevList.Rows[rowIndex].Cells[2].Value; string devModel = (string)dataGridView_DevList.Rows[rowIndex].Cells[3].Value; string devCode = (string)dataGridView_DevList.Rows[rowIndex].Cells[4].Value; AddDevDlg editDlg = new AddDevDlg(); - editDlg.Controls.Find("labelTitle", true)[0].Text = "修改仪器"; + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改"; editDlg.Controls.Find("inputDevName", true)[0].Text = devName; editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; @@ -484,6 +485,19 @@ { editDlg.btn_downChannelList.Enabled = false; editDlg.text_channelNo.ReadOnly = true; + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + DetectionItem detectionItem = (detectionItemService.search(id, true))[0]; + editDlg.groupBox1.Enabled = false; + editDlg.groupBox2.Enabled = false; + if (!detectionItem.Accuracy.Equals("-3")) editDlg.checkBox_accuracy.Checked = true; + + if (!detectionItem.Stability.Equals("-3")) + { + editDlg.checkBox_stability.Checked = true; + ((RadioButton)editDlg.Controls.Find("radio_" + detectionItem.Interval + "s", true)[0]).Checked = true; + } + if (!detectionItem.BootFeature.Equals("-3")) editDlg.checkBox_bootFeature.Checked = true; + if (!detectionItem.AgeRate.Equals("-3")) editDlg.checkBox_ageRate.Checked = true; } editDlg.HideMaskAction += () => { diff --git a/RbFreqStandMeasure/info/accuracy.cs b/RbFreqStandMeasure/info/accuracy.cs index 2af2701..4fdbccc 100644 --- a/RbFreqStandMeasure/info/accuracy.cs +++ b/RbFreqStandMeasure/info/accuracy.cs @@ -1,239 +1,19 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; using System.Windows.Forms; -using System.Drawing.Drawing2D; -using Casic.Birmm.RbFreqStandMeasure.Properties; -using System.Windows.Forms.DataVisualization.Charting; -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { public partial class accuracy : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - public accuracy() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); } } } diff --git a/RbFreqStandMeasure/info/accuracy.designer.cs b/RbFreqStandMeasure/info/accuracy.designer.cs index 7757edf..7f9c9c9 100644 --- a/RbFreqStandMeasure/info/accuracy.designer.cs +++ b/RbFreqStandMeasure/info/accuracy.designer.cs @@ -1,4 +1,4 @@ -namespace Casic.Birmm.RbFreqStandMeasure +namespace Casic.Birmm.RbFreqStandMeasure.info { partial class accuracy { @@ -28,57 +28,22 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label_endTime = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label_customerName = new System.Windows.Forms.Label(); this.label_devModel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // - // label5 - // - this.label5.BackColor = System.Drawing.Color.Transparent; - this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label5.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label5.Location = new System.Drawing.Point(473, 43); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(83, 27); - this.label5.TabIndex = 98; - this.label5.Text = "1111"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.Transparent; - this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(373, 43); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 27); - this.label6.TabIndex = 97; - this.label6.Text = "测量值A3:"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 11); + this.label1.Location = new System.Drawing.Point(206, 110); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); - this.label1.TabIndex = 96; + this.label1.TabIndex = 100; this.label1.Text = "仪:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -86,142 +51,58 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 11); + this.label4.Location = new System.Drawing.Point(102, 110); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 27); - this.label4.TabIndex = 95; - this.label4.Text = "A:"; + this.label4.Size = new System.Drawing.Size(104, 27); + this.label4.TabIndex = 99; + this.label4.Text = "测量结果A:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label_endTime - // - this.label_endTime.BackColor = System.Drawing.Color.Transparent; - this.label_endTime.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_endTime.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_endTime.Location = new System.Drawing.Point(296, 43); - this.label_endTime.Margin = new System.Windows.Forms.Padding(0); - this.label_endTime.Name = "label_endTime"; - this.label_endTime.Size = new System.Drawing.Size(83, 27); - this.label_endTime.TabIndex = 94; - this.label_endTime.Text = "11"; - this.label_endTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(196, 43); - this.label3.Margin = new System.Windows.Forms.Padding(0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 27); - this.label3.TabIndex = 93; - this.label3.Text = "测量值A2:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label_customerName - // - this.label_customerName.BackColor = System.Drawing.Color.Transparent; - this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(136, 43); - this.label_customerName.Margin = new System.Windows.Forms.Padding(0); - this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); - this.label_customerName.TabIndex = 92; - this.label_customerName.Text = "111"; - this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label_devModel // this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 11); + this.label_devModel.Location = new System.Drawing.Point(206, 61); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 91; + this.label_devModel.Size = new System.Drawing.Size(83, 27); + this.label_devModel.TabIndex = 98; this.label_devModel.Text = "仪:"; this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label2 - // - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(49, 43); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(87, 27); - this.label2.TabIndex = 90; - this.label2.Text = "测量值A1:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label9 // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 11); + this.label9.Location = new System.Drawing.Point(70, 61); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 89; + this.label9.TabIndex = 97; this.label9.Text = "标称频率(MHz):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // chart1 - // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 76); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; - series1.IsVisibleInLegend = false; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 244); - this.chart1.TabIndex = 99; - this.chart1.Text = "chart1"; - // // accuracy // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.chart1); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); this.Controls.Add(this.label1); this.Controls.Add(this.label4); - this.Controls.Add(this.label_endTime); - this.Controls.Add(this.label3); - this.Controls.Add(this.label_customerName); this.Controls.Add(this.label_devModel); - this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "accuracy"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label_endTime; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label_customerName; private System.Windows.Forms.Label label_devModel; - private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label9; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; } } diff --git a/RbFreqStandMeasure/info/ageRate.cs b/RbFreqStandMeasure/info/ageRate.cs index 486f4a6..7529830 100644 --- a/RbFreqStandMeasure/info/ageRate.cs +++ b/RbFreqStandMeasure/info/ageRate.cs @@ -4,235 +4,28 @@ using System.Windows.Forms; using System.Drawing.Drawing2D; using Casic.Birmm.RbFreqStandMeasure.Properties; +using System.Data; +using System.Windows.Forms.DataVisualization.Charting; namespace Casic.Birmm.RbFreqStandMeasure { public partial class ageRate : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - - public ageRate() + + public ageRate(DataTable originData) { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - InitialCanvas(); + chart1.Series["Series1"].XValueMember = "时间"; + chart1.Series["Series1"].YValueMembers = "相对频率偏差"; + + //chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle; //线条上的数据点标志类型 + //chart1.Series["Series1"].MarkerSize = 3; //标志大小 + Series Series1 = new Series(); + chart1.Series.Add(Series1);//加入你的chart1 + chart1.DataSource = originData; + } - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/ageRate.designer.cs b/RbFreqStandMeasure/info/ageRate.designer.cs index 9c376de..3a62610 100644 --- a/RbFreqStandMeasure/info/ageRate.designer.cs +++ b/RbFreqStandMeasure/info/ageRate.designer.cs @@ -34,26 +34,31 @@ this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label_customerName = new System.Windows.Forms.Label(); - this.label_devModel = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label_devModel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); this.SuspendLayout(); // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(13, 81); + this.chart1.Location = new System.Drawing.Point(3, 67); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 238); + this.chart1.Size = new System.Drawing.Size(402, 176); this.chart1.TabIndex = 117; this.chart1.Text = "chart1"; // @@ -62,7 +67,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(380, 10); + this.label1.Location = new System.Drawing.Point(316, 8); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -74,7 +79,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(261, 10); + this.label4.Location = new System.Drawing.Point(197, 8); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(119, 27); @@ -87,32 +92,19 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(146, 42); + this.label_customerName.Location = new System.Drawing.Point(100, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; - this.label_customerName.Size = new System.Drawing.Size(83, 27); + this.label_customerName.Size = new System.Drawing.Size(57, 27); this.label_customerName.TabIndex = 114; this.label_customerName.Text = "111"; this.label_customerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // label_devModel - // - this.label_devModel.BackColor = System.Drawing.Color.Transparent; - this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(146, 10); - this.label_devModel.Margin = new System.Windows.Forms.Padding(0); - this.label_devModel.Name = "label_devModel"; - this.label_devModel.Size = new System.Drawing.Size(67, 27); - this.label_devModel.TabIndex = 113; - this.label_devModel.Text = "仪:"; - this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(59, 42); + this.label2.Location = new System.Drawing.Point(13, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -120,24 +112,12 @@ this.label2.Text = "测量结果:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label9 - // - this.label9.BackColor = System.Drawing.Color.Transparent; - this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(10, 10); - this.label9.Margin = new System.Windows.Forms.Padding(0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); - this.label9.TabIndex = 111; - this.label9.Text = "预热天数:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label3.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label3.Location = new System.Drawing.Point(380, 42); + this.label3.Location = new System.Drawing.Point(316, 35); this.label3.Margin = new System.Windows.Forms.Padding(0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(83, 27); @@ -149,7 +129,7 @@ // this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(293, 42); + this.label5.Location = new System.Drawing.Point(229, 35); this.label5.Margin = new System.Windows.Forms.Padding(0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(87, 27); @@ -157,10 +137,34 @@ this.label5.Text = "标准偏差:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // label9 + // + this.label9.BackColor = System.Drawing.Color.Transparent; + this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(17, 8); + this.label9.Margin = new System.Windows.Forms.Padding(0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(83, 27); + this.label9.TabIndex = 111; + this.label9.Text = "预热天数:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label_devModel + // + this.label_devModel.BackColor = System.Drawing.Color.Transparent; + this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; + this.label_devModel.Location = new System.Drawing.Point(100, 8); + this.label_devModel.Margin = new System.Windows.Forms.Padding(0); + this.label_devModel.Name = "label_devModel"; + this.label_devModel.Size = new System.Drawing.Size(67, 27); + this.label_devModel.TabIndex = 113; + this.label_devModel.Text = "仪:"; + this.label_devModel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // ageRate // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.label3); this.Controls.Add(this.label5); @@ -172,10 +176,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "ageRate"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); @@ -187,10 +188,10 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label_customerName; - private System.Windows.Forms.Label label_devModel; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label_devModel; } } diff --git a/RbFreqStandMeasure/info/bootFeature.cs b/RbFreqStandMeasure/info/bootFeature.cs index 4063048..2cec888 100644 --- a/RbFreqStandMeasure/info/bootFeature.cs +++ b/RbFreqStandMeasure/info/bootFeature.cs @@ -9,230 +9,15 @@ { public partial class bootFeature : UserControl { - private int x = 0; - private int y = 0; - - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } public bootFeature() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); - //设置背景颜色为透明 - this.BackColor = Color.Transparent; - - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - + //设置背景颜色为透明 + this.BackColor = Color.Transparent; } + - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } } } diff --git a/RbFreqStandMeasure/info/bootFeature.designer.cs b/RbFreqStandMeasure/info/bootFeature.designer.cs index a1fa758..133d6b5 100644 --- a/RbFreqStandMeasure/info/bootFeature.designer.cs +++ b/RbFreqStandMeasure/info/bootFeature.designer.cs @@ -42,16 +42,22 @@ // // chart1 // + chartArea1.AxisX.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisX.MajorGrid.Enabled = false; + chartArea1.AxisY.LabelAutoFitMaxFontSize = 9; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver; chartArea1.Name = "ChartArea1"; this.chart1.ChartAreas.Add(chartArea1); - this.chart1.Location = new System.Drawing.Point(3, 50); + this.chart1.Location = new System.Drawing.Point(3, 65); this.chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; series1.IsVisibleInLegend = false; + series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; series1.Name = "Series1"; + series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.DateTime; this.chart1.Series.Add(series1); - this.chart1.Size = new System.Drawing.Size(530, 265); + this.chart1.Size = new System.Drawing.Size(399, 178); this.chart1.TabIndex = 110; this.chart1.Text = "chart1"; // @@ -60,7 +66,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(296, 6); + this.label1.Location = new System.Drawing.Point(294, 6); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -72,7 +78,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(209, 6); + this.label4.Location = new System.Drawing.Point(207, 6); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -85,7 +91,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(455, 6); + this.label_customerName.Location = new System.Drawing.Point(106, 35); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -98,7 +104,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(136, 6); + this.label_devModel.Location = new System.Drawing.Point(106, 6); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -110,7 +116,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(368, 6); + this.label2.Location = new System.Drawing.Point(19, 35); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -122,18 +128,17 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 6); + this.label9.Location = new System.Drawing.Point(22, 6); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(136, 27); + this.label9.Size = new System.Drawing.Size(84, 27); this.label9.TabIndex = 100; this.label9.Text = "y(t)-Min:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // bootFeature // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.chart1); this.Controls.Add(this.label1); @@ -143,10 +148,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "bootFeature"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); + this.Size = new System.Drawing.Size(405, 246); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); this.ResumeLayout(false); diff --git a/RbFreqStandMeasure/info/stability.cs b/RbFreqStandMeasure/info/stability.cs index e42c91f..22e26df 100644 --- a/RbFreqStandMeasure/info/stability.cs +++ b/RbFreqStandMeasure/info/stability.cs @@ -12,227 +12,15 @@ private int x = 0; private int y = 0; - private int padding = 20; // 坐标轴距离画布的边距 - - [Description("角度值")] - private int valueNow = 0; - public int Value - { - get - { - return valueNow; - } - set - { - valueNow = value; - } - } - - /// - /// 定义轴线长度 - /// - private float diameter; - - /// - /// 每个间隔值 - /// - private int intervalValue; - - /// - /// 仪表盘显示的最小值,默认为0 - /// - private float minValue = 0; - - /// - /// 仪表盘显示的最小值 - /// - [Description("仪表盘显示的最小值")] - public float MinValue - { - get - { - return minValue; - } - set - { - if (value >= MaxValue) - { - MessageBox.Show("最小值不能超过最大值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - minValue = 0; - } - else - { - minValue = value; - //drawBackImage(); - } - } - - } - - /// - /// 仪表盘上显示的最大值,默认123。 - /// - private float maxValue = 123; - - /// - /// 仪表盘上显示的最大值 - /// - [Description("仪表盘上显示的最大值")] - public float MaxValue - { - get - { - return maxValue; - } - set - { - if (value <= MinValue) - { - MessageBox.Show("最大值不能低于最小值!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - maxValue = 123; - } - else - { - maxValue = value; - //drawBackImage(); - } - } - } - - // - /// 仪表盘变换的值,默认为0; - /// - private float changeValue = 0; - - /// - /// 仪表盘变换的值 - /// - public float ChangeValue - { - get - { - return changeValue; - } - set - { - changeValue = value; - } - } - - /// - /// 指针颜色 - /// - private Color pinColor = Color.FromArgb(191, 148, 28); - - public Color PinColor - { - get - { - return pinColor; - } - set - { - pinColor = value; - } - } - - public int X { get => x; set => x = value; } - public int Y { get => y; set => y = value; } - + public stability() { InitializeComponent(); - //双缓存防止屏幕抖动 - this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.UpdateStyles(); + //设置背景颜色为透明 this.BackColor = Color.Transparent; - InitialCanvas(); - } - - //private int uintfontsize = 40; - /// - /// 初始化仪表盘画布 - /// - public void InitialCanvas() - { - //对比控件的长高,以最小值为轴线长度 - if (this.Width > this.Height) - { - diameter = this.Height - 30; - } - else - { - diameter = this.Width - 30; - } - - intervalValue = (int)(diameter / 3);//计算每个间隔之间的值 - - - } - - /// - /// 画图 - /// - /// - public void DrawPin(Graphics g) - { - Bitmap bit = new Bitmap(this.Width, this.Height); - Graphics gp = Graphics.FromImage(bit); - gp.SmoothingMode = SmoothingMode.HighQuality; - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)) { DashStyle = DashStyle.Custom }, new Point(padding, this.Height / 2), new Point(this.Width - padding, this.Height / 2)); - - gp.DrawLine(new Pen(Color.FromArgb(139, 129, 76)), new Point(this.Width / 2, padding), new Point(this.Width / 2 - 5, this.Height - padding)); - - //Color color = Color.FromArgb(139, 129, 76); - Color color = Color.RoyalBlue; - SolidBrush brush = new SolidBrush(color); - Font scaleFont = new Font(new FontFamily("微软雅黑"), 9, FontStyle.Regular); - gp.DrawString("W", scaleFont, brush, new Point(0, this.Height / 2 - 9)); - gp.DrawString("N", scaleFont, brush, new Point(this.Width / 2 - 7, 2)); - gp.DrawString("E", scaleFont, brush, new Point(this.Width - padding + 2 , this.Height / 2 - 8)); - gp.DrawString("S", scaleFont, brush, new Point(this.Width / 2 - 10, this.Height - padding)); - - int inter = 50; // 圆圈之间的间隔 - Pen dashPen = new Pen(Color.Red, 2) - { - DashStyle = DashStyle.Custom, - DashPattern = new float[] { 3f, 1f } - }; - int offset = padding + 5; - gp.DrawEllipse(dashPen, offset, offset, this.Width - offset * 2, this.Width - offset * 2);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter, offset + inter, this.Width - offset * 2 - 2* inter, this.Width - offset * 2 - 2 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - gp.DrawEllipse(new Pen(Color.FromArgb(139, 129, 76)), offset + inter * 2, offset + inter*2, this.Width - offset * 2 - 4 * inter, this.Width - offset * 2 - 4 * inter);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 - - // 画点 - X = 100; - Y = 100; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("USA"), X, Y); - - X = 200; - Y = 300; - gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject("CHN"), X, Y); - - g.DrawImage(bit, 0, 0); - gp.Dispose(); - } - - private void CoordinateUc_Load(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Resize(object sender, EventArgs e) - { - InitialCanvas(); - } - - private void CoordinateUc_Paint(object sender, PaintEventArgs e) - { - DrawPin(e.Graphics); - } + } + } } diff --git a/RbFreqStandMeasure/info/stability.designer.cs b/RbFreqStandMeasure/info/stability.designer.cs index c8db121..0a6b17e 100644 --- a/RbFreqStandMeasure/info/stability.designer.cs +++ b/RbFreqStandMeasure/info/stability.designer.cs @@ -34,8 +34,6 @@ this.label9 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); // // label_customerName @@ -43,7 +41,7 @@ this.label_customerName.BackColor = System.Drawing.Color.Transparent; this.label_customerName.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_customerName.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_customerName.Location = new System.Drawing.Point(452, 11); + this.label_customerName.Location = new System.Drawing.Point(197, 126); this.label_customerName.Margin = new System.Windows.Forms.Padding(0); this.label_customerName.Name = "label_customerName"; this.label_customerName.Size = new System.Drawing.Size(83, 27); @@ -56,7 +54,7 @@ this.label_devModel.BackColor = System.Drawing.Color.Transparent; this.label_devModel.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label_devModel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label_devModel.Location = new System.Drawing.Point(122, 11); + this.label_devModel.Location = new System.Drawing.Point(197, 38); this.label_devModel.Margin = new System.Windows.Forms.Padding(0); this.label_devModel.Name = "label_devModel"; this.label_devModel.Size = new System.Drawing.Size(67, 27); @@ -68,7 +66,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(365, 11); + this.label2.Location = new System.Drawing.Point(110, 126); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 27); @@ -80,10 +78,10 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(5, 11); + this.label9.Location = new System.Drawing.Point(114, 38); this.label9.Margin = new System.Windows.Forms.Padding(0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(117, 27); + this.label9.Size = new System.Drawing.Size(83, 27); this.label9.TabIndex = 79; this.label9.Text = "测量结果:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -93,7 +91,7 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); this.label1.ForeColor = System.Drawing.SystemColors.ControlDark; - this.label1.Location = new System.Drawing.Point(282, 11); + this.label1.Location = new System.Drawing.Point(197, 82); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(83, 27); @@ -105,7 +103,7 @@ // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(195, 11); + this.label4.Location = new System.Drawing.Point(110, 82); this.label4.Margin = new System.Windows.Forms.Padding(0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(87, 27); @@ -113,21 +111,10 @@ this.label4.Text = "标准偏差:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // dataGridView1 - // - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(16, 51); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(517, 261); - this.dataGridView1.TabIndex = 89; - // // stability // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.dataGridView1); this.Controls.Add(this.label1); this.Controls.Add(this.label4); this.Controls.Add(this.label_customerName); @@ -135,11 +122,7 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label9); this.Name = "stability"; - this.Size = new System.Drawing.Size(558, 328); - this.Load += new System.EventHandler(this.CoordinateUc_Load); - this.Paint += new System.Windows.Forms.PaintEventHandler(this.CoordinateUc_Paint); - this.Resize += new System.EventHandler(this.CoordinateUc_Resize); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.Size = new System.Drawing.Size(405, 229); this.ResumeLayout(false); } @@ -151,6 +134,5 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; - private System.Windows.Forms.DataGridView dataGridView1; } } diff --git a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs index cb453d7..d67b5a2 100644 --- a/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/setting/SettingCtrlForm.Designer.cs @@ -30,50 +30,50 @@ private void InitializeComponent() { this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.textBoxX2 = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.textBoxX3 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_generatorIp = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label4 = new System.Windows.Forms.Label(); - this.textBoxX4 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_exportPath = new DevComponents.DotNetBar.Controls.TextBoxX(); this.button1 = new System.Windows.Forms.Button(); - this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); - this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.label12 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); - this.textBoxX8 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label20 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); - this.textBoxX12 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label22 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); - this.textBoxX13 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_cycThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label13 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); - this.textBoxX9 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label16 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); - this.textBoxX10 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freThreshold2 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label18 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); - this.textBoxX11 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_freThreshold1 = new DevComponents.DotNetBar.Controls.TextBoxX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label11 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.textBoxX7 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleAlarm = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label8 = new System.Windows.Forms.Label(); - this.textBoxX6 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleAddValue = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); - this.textBoxX5 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soEleFrequency = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label5 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.text_soOutDelay = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btnCancel = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.btnSave = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); + this.roundButton2 = new Casic.Birmm.RbFreqStandMeasure.RoundButton(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -86,79 +86,53 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(247, 177); + this.label2.Location = new System.Drawing.Point(244, 243); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(150, 30); this.label2.TabIndex = 4; - this.label2.Text = "频率发生器IP:"; + this.label2.Text = "计数器IP:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // label3 - // - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(247, 237); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(150, 30); - this.label3.TabIndex = 4; - this.label3.Text = "频率信号源IP:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // textBoxX2 + // text_generatorIp // // // // - this.textBoxX2.Border.Class = "TextBoxBorder"; - this.textBoxX2.Border.CornerDiameter = 5; - this.textBoxX2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX2.Location = new System.Drawing.Point(437, 177); - this.textBoxX2.Name = "textBoxX2"; - this.textBoxX2.PreventEnterBeep = true; - this.textBoxX2.Size = new System.Drawing.Size(250, 29); - this.textBoxX2.TabIndex = 5; - // - // textBoxX3 - // - // - // - // - this.textBoxX3.Border.Class = "TextBoxBorder"; - this.textBoxX3.Border.CornerDiameter = 5; - this.textBoxX3.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX3.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX3.Location = new System.Drawing.Point(437, 237); - this.textBoxX3.Name = "textBoxX3"; - this.textBoxX3.PreventEnterBeep = true; - this.textBoxX3.Size = new System.Drawing.Size(250, 29); - this.textBoxX3.TabIndex = 6; + this.text_generatorIp.Border.Class = "TextBoxBorder"; + this.text_generatorIp.Border.CornerDiameter = 5; + this.text_generatorIp.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_generatorIp.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_generatorIp.Location = new System.Drawing.Point(400, 243); + this.text_generatorIp.Name = "text_generatorIp"; + this.text_generatorIp.PreventEnterBeep = true; + this.text_generatorIp.Size = new System.Drawing.Size(326, 29); + this.text_generatorIp.TabIndex = 5; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(221, 121); + this.label4.Location = new System.Drawing.Point(218, 153); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(176, 30); this.label4.TabIndex = 4; - this.label4.Text = "数据默认存放路径:"; + this.label4.Text = "数据默认导出路径:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX4 + // text_exportPath // // // // - this.textBoxX4.Border.Class = "TextBoxBorder"; - this.textBoxX4.Border.CornerDiameter = 5; - this.textBoxX4.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX4.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX4.Location = new System.Drawing.Point(437, 121); - this.textBoxX4.Name = "textBoxX4"; - this.textBoxX4.PreventEnterBeep = true; - this.textBoxX4.Size = new System.Drawing.Size(250, 29); - this.textBoxX4.TabIndex = 2; + this.text_exportPath.Border.Class = "TextBoxBorder"; + this.text_exportPath.Border.CornerDiameter = 5; + this.text_exportPath.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_exportPath.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_exportPath.Location = new System.Drawing.Point(400, 153); + this.text_exportPath.Name = "text_exportPath"; + this.text_exportPath.PreventEnterBeep = true; + this.text_exportPath.Size = new System.Drawing.Size(326, 29); + this.text_exportPath.TabIndex = 2; // // button1 // @@ -166,56 +140,12 @@ this.button1.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.path; this.button1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Location = new System.Drawing.Point(691, 121); + this.button1.Location = new System.Drawing.Point(739, 153); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(35, 28); this.button1.TabIndex = 7; this.button1.UseVisualStyleBackColor = false; // - // btnSave - // - this.btnSave.EnterBackColor = System.Drawing.Color.Blue; - this.btnSave.EnterForeColor = System.Drawing.Color.White; - this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnSave.FlatAppearance.BorderSize = 0; - this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); - this.btnSave.HoverForeColor = System.Drawing.Color.White; - this.btnSave.Location = new System.Drawing.Point(504, 377); - this.btnSave.Name = "btnSave"; - this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnSave.PressForeColor = System.Drawing.Color.White; - this.btnSave.Radius = 5; - this.btnSave.Size = new System.Drawing.Size(150, 30); - this.btnSave.TabIndex = 0; - this.btnSave.Text = "保存设置"; - this.btnSave.UseVisualStyleBackColor = true; - // - // btnCancel - // - this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; - this.btnCancel.EnterForeColor = System.Drawing.Color.White; - this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.btnCancel.FlatAppearance.BorderSize = 0; - this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; - this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - this.btnCancel.HoverForeColor = System.Drawing.Color.White; - this.btnCancel.Location = new System.Drawing.Point(314, 377); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; - this.btnCancel.PressForeColor = System.Drawing.Color.White; - this.btnCancel.Radius = 5; - this.btnCancel.Size = new System.Drawing.Size(150, 30); - this.btnCancel.TabIndex = 0; - this.btnCancel.Text = "放弃修改"; - this.btnCancel.UseVisualStyleBackColor = true; - // // tabControl1 // this.tabControl1.Controls.Add(this.tabPage1); @@ -232,11 +162,9 @@ this.tabPage1.Controls.Add(this.label4); this.tabPage1.Controls.Add(this.button1); this.tabPage1.Controls.Add(this.btnCancel); - this.tabPage1.Controls.Add(this.textBoxX3); this.tabPage1.Controls.Add(this.btnSave); - this.tabPage1.Controls.Add(this.textBoxX2); - this.tabPage1.Controls.Add(this.textBoxX4); - this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.text_generatorIp); + this.tabPage1.Controls.Add(this.text_exportPath); this.tabPage1.Controls.Add(this.label2); this.tabPage1.Location = new System.Drawing.Point(4, 29); this.tabPage1.Name = "tabPage1"; @@ -248,6 +176,8 @@ // // tabPage2 // + this.tabPage2.Controls.Add(this.roundButton1); + this.tabPage2.Controls.Add(this.roundButton2); this.tabPage2.Controls.Add(this.groupBox3); this.tabPage2.Controls.Add(this.groupBox2); this.tabPage2.Controls.Add(this.groupBox1); @@ -263,16 +193,16 @@ // this.groupBox3.Controls.Add(this.label12); this.groupBox3.Controls.Add(this.label14); - this.groupBox3.Controls.Add(this.textBoxX8); + this.groupBox3.Controls.Add(this.text_cycEleAddValue); this.groupBox3.Controls.Add(this.label20); this.groupBox3.Controls.Add(this.label21); - this.groupBox3.Controls.Add(this.textBoxX12); + this.groupBox3.Controls.Add(this.text_cycThreshold2); this.groupBox3.Controls.Add(this.label22); this.groupBox3.Controls.Add(this.label23); - this.groupBox3.Controls.Add(this.textBoxX13); - this.groupBox3.Location = new System.Drawing.Point(31, 373); + this.groupBox3.Controls.Add(this.text_cycThreshold1); + this.groupBox3.Location = new System.Drawing.Point(31, 336); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(904, 162); + this.groupBox3.Size = new System.Drawing.Size(904, 140); this.groupBox3.TabIndex = 18; this.groupBox3.TabStop = false; this.groupBox3.Text = "周期灵敏度"; @@ -281,7 +211,7 @@ // this.label12.BackColor = System.Drawing.Color.Transparent; this.label12.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(372, 97); + this.label12.Location = new System.Drawing.Point(372, 91); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(45, 30); this.label12.TabIndex = 15; @@ -292,33 +222,33 @@ // this.label14.BackColor = System.Drawing.Color.Transparent; this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label14.Location = new System.Drawing.Point(30, 97); + this.label14.Location = new System.Drawing.Point(30, 91); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(159, 30); this.label14.TabIndex = 12; this.label14.Text = "测量误差电平增加值:"; this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX8 + // text_cycEleAddValue // // // // - this.textBoxX8.Border.Class = "TextBoxBorder"; - this.textBoxX8.Border.CornerDiameter = 5; - this.textBoxX8.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX8.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX8.Location = new System.Drawing.Point(195, 97); - this.textBoxX8.Name = "textBoxX8"; - this.textBoxX8.PreventEnterBeep = true; - this.textBoxX8.Size = new System.Drawing.Size(168, 29); - this.textBoxX8.TabIndex = 11; + this.text_cycEleAddValue.Border.Class = "TextBoxBorder"; + this.text_cycEleAddValue.Border.CornerDiameter = 5; + this.text_cycEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycEleAddValue.Location = new System.Drawing.Point(195, 91); + this.text_cycEleAddValue.Name = "text_cycEleAddValue"; + this.text_cycEleAddValue.PreventEnterBeep = true; + this.text_cycEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_cycEleAddValue.TabIndex = 11; // // label20 // this.label20.BackColor = System.Drawing.Color.Transparent; this.label20.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label20.Location = new System.Drawing.Point(786, 39); + this.label20.Location = new System.Drawing.Point(803, 39); this.label20.Name = "label20"; this.label20.Size = new System.Drawing.Size(45, 30); this.label20.TabIndex = 10; @@ -329,27 +259,27 @@ // this.label21.BackColor = System.Drawing.Color.Transparent; this.label21.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label21.Location = new System.Drawing.Point(444, 41); + this.label21.Location = new System.Drawing.Point(461, 41); this.label21.Name = "label21"; this.label21.Size = new System.Drawing.Size(159, 30); this.label21.TabIndex = 9; this.label21.Text = "周期差值>80MHz:"; this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX12 + // text_cycThreshold2 // // // // - this.textBoxX12.Border.Class = "TextBoxBorder"; - this.textBoxX12.Border.CornerDiameter = 5; - this.textBoxX12.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX12.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX12.Location = new System.Drawing.Point(609, 41); - this.textBoxX12.Name = "textBoxX12"; - this.textBoxX12.PreventEnterBeep = true; - this.textBoxX12.Size = new System.Drawing.Size(168, 29); - this.textBoxX12.TabIndex = 8; + this.text_cycThreshold2.Border.Class = "TextBoxBorder"; + this.text_cycThreshold2.Border.CornerDiameter = 5; + this.text_cycThreshold2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycThreshold2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycThreshold2.Location = new System.Drawing.Point(626, 41); + this.text_cycThreshold2.Name = "text_cycThreshold2"; + this.text_cycThreshold2.PreventEnterBeep = true; + this.text_cycThreshold2.Size = new System.Drawing.Size(168, 29); + this.text_cycThreshold2.TabIndex = 8; // // label22 // @@ -373,35 +303,35 @@ this.label23.Text = "周期差值<=80MHz:"; this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX13 + // text_cycThreshold1 // // // // - this.textBoxX13.Border.Class = "TextBoxBorder"; - this.textBoxX13.Border.CornerDiameter = 5; - this.textBoxX13.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX13.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX13.Location = new System.Drawing.Point(195, 45); - this.textBoxX13.Name = "textBoxX13"; - this.textBoxX13.PreventEnterBeep = true; - this.textBoxX13.Size = new System.Drawing.Size(168, 29); - this.textBoxX13.TabIndex = 5; + this.text_cycThreshold1.Border.Class = "TextBoxBorder"; + this.text_cycThreshold1.Border.CornerDiameter = 5; + this.text_cycThreshold1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_cycThreshold1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_cycThreshold1.Location = new System.Drawing.Point(195, 45); + this.text_cycThreshold1.Name = "text_cycThreshold1"; + this.text_cycThreshold1.PreventEnterBeep = true; + this.text_cycThreshold1.Size = new System.Drawing.Size(168, 29); + this.text_cycThreshold1.TabIndex = 5; // // groupBox2 // this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label15); - this.groupBox2.Controls.Add(this.textBoxX9); + this.groupBox2.Controls.Add(this.text_freEleAddValue); this.groupBox2.Controls.Add(this.label16); this.groupBox2.Controls.Add(this.label17); - this.groupBox2.Controls.Add(this.textBoxX10); + this.groupBox2.Controls.Add(this.text_freThreshold2); this.groupBox2.Controls.Add(this.label18); this.groupBox2.Controls.Add(this.label19); - this.groupBox2.Controls.Add(this.textBoxX11); - this.groupBox2.Location = new System.Drawing.Point(31, 194); + this.groupBox2.Controls.Add(this.text_freThreshold1); + this.groupBox2.Location = new System.Drawing.Point(31, 177); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(904, 162); + this.groupBox2.Size = new System.Drawing.Size(904, 147); this.groupBox2.TabIndex = 17; this.groupBox2.TabStop = false; this.groupBox2.Text = "频率灵敏度"; @@ -410,7 +340,7 @@ // this.label13.BackColor = System.Drawing.Color.Transparent; this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label13.Location = new System.Drawing.Point(372, 97); + this.label13.Location = new System.Drawing.Point(372, 91); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(45, 30); this.label13.TabIndex = 15; @@ -421,33 +351,33 @@ // this.label15.BackColor = System.Drawing.Color.Transparent; this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label15.Location = new System.Drawing.Point(30, 97); + this.label15.Location = new System.Drawing.Point(30, 91); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(159, 30); this.label15.TabIndex = 12; this.label15.Text = "测量误差电平增加值:"; this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX9 + // text_freEleAddValue // // // // - this.textBoxX9.Border.Class = "TextBoxBorder"; - this.textBoxX9.Border.CornerDiameter = 5; - this.textBoxX9.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX9.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX9.Location = new System.Drawing.Point(195, 97); - this.textBoxX9.Name = "textBoxX9"; - this.textBoxX9.PreventEnterBeep = true; - this.textBoxX9.Size = new System.Drawing.Size(168, 29); - this.textBoxX9.TabIndex = 11; + this.text_freEleAddValue.Border.Class = "TextBoxBorder"; + this.text_freEleAddValue.Border.CornerDiameter = 5; + this.text_freEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freEleAddValue.Location = new System.Drawing.Point(195, 91); + this.text_freEleAddValue.Name = "text_freEleAddValue"; + this.text_freEleAddValue.PreventEnterBeep = true; + this.text_freEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_freEleAddValue.TabIndex = 11; // // label16 // this.label16.BackColor = System.Drawing.Color.Transparent; this.label16.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label16.Location = new System.Drawing.Point(786, 39); + this.label16.Location = new System.Drawing.Point(801, 39); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(45, 30); this.label16.TabIndex = 10; @@ -458,27 +388,27 @@ // this.label17.BackColor = System.Drawing.Color.Transparent; this.label17.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label17.Location = new System.Drawing.Point(444, 41); + this.label17.Location = new System.Drawing.Point(459, 41); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(159, 30); this.label17.TabIndex = 9; this.label17.Text = "频率差值>80MHz:"; this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX10 + // text_freThreshold2 // // // // - this.textBoxX10.Border.Class = "TextBoxBorder"; - this.textBoxX10.Border.CornerDiameter = 5; - this.textBoxX10.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX10.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX10.Location = new System.Drawing.Point(609, 41); - this.textBoxX10.Name = "textBoxX10"; - this.textBoxX10.PreventEnterBeep = true; - this.textBoxX10.Size = new System.Drawing.Size(168, 29); - this.textBoxX10.TabIndex = 8; + this.text_freThreshold2.Border.Class = "TextBoxBorder"; + this.text_freThreshold2.Border.CornerDiameter = 5; + this.text_freThreshold2.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freThreshold2.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freThreshold2.Location = new System.Drawing.Point(624, 41); + this.text_freThreshold2.Name = "text_freThreshold2"; + this.text_freThreshold2.PreventEnterBeep = true; + this.text_freThreshold2.Size = new System.Drawing.Size(168, 29); + this.text_freThreshold2.TabIndex = 8; // // label18 // @@ -502,38 +432,38 @@ this.label19.Text = "频率差值<=80MHz:"; this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX11 + // text_freThreshold1 // // // // - this.textBoxX11.Border.Class = "TextBoxBorder"; - this.textBoxX11.Border.CornerDiameter = 5; - this.textBoxX11.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX11.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX11.Location = new System.Drawing.Point(195, 45); - this.textBoxX11.Name = "textBoxX11"; - this.textBoxX11.PreventEnterBeep = true; - this.textBoxX11.Size = new System.Drawing.Size(168, 29); - this.textBoxX11.TabIndex = 5; + this.text_freThreshold1.Border.Class = "TextBoxBorder"; + this.text_freThreshold1.Border.CornerDiameter = 5; + this.text_freThreshold1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_freThreshold1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_freThreshold1.Location = new System.Drawing.Point(195, 45); + this.text_freThreshold1.Name = "text_freThreshold1"; + this.text_freThreshold1.PreventEnterBeep = true; + this.text_freThreshold1.Size = new System.Drawing.Size(168, 29); + this.text_freThreshold1.TabIndex = 5; // // groupBox1 // this.groupBox1.Controls.Add(this.label11); this.groupBox1.Controls.Add(this.label10); this.groupBox1.Controls.Add(this.label9); - this.groupBox1.Controls.Add(this.textBoxX7); + this.groupBox1.Controls.Add(this.text_soEleAlarm); this.groupBox1.Controls.Add(this.label8); - this.groupBox1.Controls.Add(this.textBoxX6); + this.groupBox1.Controls.Add(this.text_soEleAddValue); this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label7); - this.groupBox1.Controls.Add(this.textBoxX5); + this.groupBox1.Controls.Add(this.text_soEleFrequency); this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Controls.Add(this.textBoxX1); + this.groupBox1.Controls.Add(this.text_soOutDelay); this.groupBox1.Location = new System.Drawing.Point(31, 18); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(904, 162); + this.groupBox1.Size = new System.Drawing.Size(904, 145); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "电平参数"; @@ -542,7 +472,7 @@ // this.label11.BackColor = System.Drawing.Color.Transparent; this.label11.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label11.Location = new System.Drawing.Point(786, 97); + this.label11.Location = new System.Drawing.Point(801, 89); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(45, 30); this.label11.TabIndex = 16; @@ -553,7 +483,7 @@ // this.label10.BackColor = System.Drawing.Color.Transparent; this.label10.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label10.Location = new System.Drawing.Point(372, 97); + this.label10.Location = new System.Drawing.Point(372, 89); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(45, 30); this.label10.TabIndex = 15; @@ -564,59 +494,59 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(444, 97); + this.label9.Location = new System.Drawing.Point(459, 89); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(159, 30); this.label9.TabIndex = 14; this.label9.Text = "输出电平警告值:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX7 + // text_soEleAlarm // // // // - this.textBoxX7.Border.Class = "TextBoxBorder"; - this.textBoxX7.Border.CornerDiameter = 5; - this.textBoxX7.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX7.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX7.Location = new System.Drawing.Point(609, 97); - this.textBoxX7.Name = "textBoxX7"; - this.textBoxX7.PreventEnterBeep = true; - this.textBoxX7.Size = new System.Drawing.Size(168, 29); - this.textBoxX7.TabIndex = 13; + this.text_soEleAlarm.Border.Class = "TextBoxBorder"; + this.text_soEleAlarm.Border.CornerDiameter = 5; + this.text_soEleAlarm.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleAlarm.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleAlarm.Location = new System.Drawing.Point(624, 89); + this.text_soEleAlarm.Name = "text_soEleAlarm"; + this.text_soEleAlarm.PreventEnterBeep = true; + this.text_soEleAlarm.Size = new System.Drawing.Size(168, 29); + this.text_soEleAlarm.TabIndex = 13; // // label8 // this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(30, 97); + this.label8.Location = new System.Drawing.Point(30, 89); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(159, 30); this.label8.TabIndex = 12; this.label8.Text = "信号源电平增加值:"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX6 + // text_soEleAddValue // // // // - this.textBoxX6.Border.Class = "TextBoxBorder"; - this.textBoxX6.Border.CornerDiameter = 5; - this.textBoxX6.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX6.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX6.Location = new System.Drawing.Point(195, 97); - this.textBoxX6.Name = "textBoxX6"; - this.textBoxX6.PreventEnterBeep = true; - this.textBoxX6.Size = new System.Drawing.Size(168, 29); - this.textBoxX6.TabIndex = 11; + this.text_soEleAddValue.Border.Class = "TextBoxBorder"; + this.text_soEleAddValue.Border.CornerDiameter = 5; + this.text_soEleAddValue.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleAddValue.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleAddValue.Location = new System.Drawing.Point(195, 89); + this.text_soEleAddValue.Name = "text_soEleAddValue"; + this.text_soEleAddValue.PreventEnterBeep = true; + this.text_soEleAddValue.Size = new System.Drawing.Size(168, 29); + this.text_soEleAddValue.TabIndex = 11; // // label6 // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(786, 39); + this.label6.Location = new System.Drawing.Point(801, 39); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(45, 30); this.label6.TabIndex = 10; @@ -627,27 +557,27 @@ // this.label7.BackColor = System.Drawing.Color.Transparent; this.label7.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(444, 41); + this.label7.Location = new System.Drawing.Point(459, 41); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(159, 30); this.label7.TabIndex = 9; this.label7.Text = "信号源初始电平:"; this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX5 + // text_soEleFrequency // // // // - this.textBoxX5.Border.Class = "TextBoxBorder"; - this.textBoxX5.Border.CornerDiameter = 5; - this.textBoxX5.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX5.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX5.Location = new System.Drawing.Point(609, 41); - this.textBoxX5.Name = "textBoxX5"; - this.textBoxX5.PreventEnterBeep = true; - this.textBoxX5.Size = new System.Drawing.Size(168, 29); - this.textBoxX5.TabIndex = 8; + this.text_soEleFrequency.Border.Class = "TextBoxBorder"; + this.text_soEleFrequency.Border.CornerDiameter = 5; + this.text_soEleFrequency.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soEleFrequency.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soEleFrequency.Location = new System.Drawing.Point(624, 41); + this.text_soEleFrequency.Name = "text_soEleFrequency"; + this.text_soEleFrequency.PreventEnterBeep = true; + this.text_soEleFrequency.Size = new System.Drawing.Size(168, 29); + this.text_soEleFrequency.TabIndex = 8; // // label5 // @@ -671,20 +601,112 @@ this.label1.Text = "信号源输出延时:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // textBoxX1 + // text_soOutDelay // // // // - this.textBoxX1.Border.Class = "TextBoxBorder"; - this.textBoxX1.Border.CornerDiameter = 5; - this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.textBoxX1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.textBoxX1.Location = new System.Drawing.Point(195, 45); - this.textBoxX1.Name = "textBoxX1"; - this.textBoxX1.PreventEnterBeep = true; - this.textBoxX1.Size = new System.Drawing.Size(168, 29); - this.textBoxX1.TabIndex = 5; + this.text_soOutDelay.Border.Class = "TextBoxBorder"; + this.text_soOutDelay.Border.CornerDiameter = 5; + this.text_soOutDelay.Border.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.text_soOutDelay.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.text_soOutDelay.Location = new System.Drawing.Point(195, 45); + this.text_soOutDelay.Name = "text_soOutDelay"; + this.text_soOutDelay.PreventEnterBeep = true; + this.text_soOutDelay.Size = new System.Drawing.Size(168, 29); + this.text_soOutDelay.TabIndex = 5; + // + // btnCancel + // + this.btnCancel.EnterBackColor = System.Drawing.Color.Blue; + this.btnCancel.EnterForeColor = System.Drawing.Color.White; + this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnCancel.FlatAppearance.BorderSize = 0; + this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCancel.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.btnCancel.HoverForeColor = System.Drawing.Color.White; + this.btnCancel.Location = new System.Drawing.Point(314, 396); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnCancel.PressForeColor = System.Drawing.Color.White; + this.btnCancel.Radius = 5; + this.btnCancel.Size = new System.Drawing.Size(150, 30); + this.btnCancel.TabIndex = 0; + this.btnCancel.Text = "放弃修改"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnSave + // + this.btnSave.EnterBackColor = System.Drawing.Color.Blue; + this.btnSave.EnterForeColor = System.Drawing.Color.White; + this.btnSave.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnSave.FlatAppearance.BorderSize = 0; + this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.btnSave.HoverForeColor = System.Drawing.Color.White; + this.btnSave.Location = new System.Drawing.Point(504, 396); + this.btnSave.Name = "btnSave"; + this.btnSave.PressBackColor = System.Drawing.Color.DarkBlue; + this.btnSave.PressForeColor = System.Drawing.Color.White; + this.btnSave.Radius = 5; + this.btnSave.Size = new System.Drawing.Size(150, 30); + this.btnSave.TabIndex = 0; + this.btnSave.Text = "保存设置"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // roundButton1 + // + this.roundButton1.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton1.EnterForeColor = System.Drawing.Color.White; + this.roundButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton1.FlatAppearance.BorderSize = 0; + this.roundButton1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton1.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton1.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + this.roundButton1.HoverForeColor = System.Drawing.Color.White; + this.roundButton1.Location = new System.Drawing.Point(337, 510); + this.roundButton1.Name = "roundButton1"; + this.roundButton1.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton1.PressForeColor = System.Drawing.Color.White; + this.roundButton1.Radius = 5; + this.roundButton1.Size = new System.Drawing.Size(150, 30); + this.roundButton1.TabIndex = 19; + this.roundButton1.Text = "放弃修改"; + this.roundButton1.UseVisualStyleBackColor = true; + this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click); + // + // roundButton2 + // + this.roundButton2.EnterBackColor = System.Drawing.Color.Blue; + this.roundButton2.EnterForeColor = System.Drawing.Color.White; + this.roundButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.roundButton2.FlatAppearance.BorderSize = 0; + this.roundButton2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.roundButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.roundButton2.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.roundButton2.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198))))); + this.roundButton2.HoverForeColor = System.Drawing.Color.White; + this.roundButton2.Location = new System.Drawing.Point(527, 510); + this.roundButton2.Name = "roundButton2"; + this.roundButton2.PressBackColor = System.Drawing.Color.DarkBlue; + this.roundButton2.PressForeColor = System.Drawing.Color.White; + this.roundButton2.Radius = 5; + this.roundButton2.Size = new System.Drawing.Size(150, 30); + this.roundButton2.TabIndex = 20; + this.roundButton2.Text = "保存设置"; + this.roundButton2.UseVisualStyleBackColor = true; + this.roundButton2.Click += new System.EventHandler(this.roundButton2_Click); // // SettingCtrlForm // @@ -713,11 +735,9 @@ private RoundButton btnCancel; private RoundButton btnSave; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX2; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX3; + private DevComponents.DotNetBar.Controls.TextBoxX text_generatorIp; private System.Windows.Forms.Label label4; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX4; + private DevComponents.DotNetBar.Controls.TextBoxX text_exportPath; private System.Windows.Forms.Button button1; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; @@ -725,35 +745,37 @@ private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label14; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX8; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycEleAddValue; private System.Windows.Forms.Label label20; private System.Windows.Forms.Label label21; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX12; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold2; private System.Windows.Forms.Label label22; private System.Windows.Forms.Label label23; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX13; + private DevComponents.DotNetBar.Controls.TextBoxX text_cycThreshold1; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label15; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX9; + private DevComponents.DotNetBar.Controls.TextBoxX text_freEleAddValue; private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label17; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX10; + private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold2; private System.Windows.Forms.Label label18; private System.Windows.Forms.Label label19; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX11; + private DevComponents.DotNetBar.Controls.TextBoxX text_freThreshold1; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label9; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX7; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleAlarm; private System.Windows.Forms.Label label8; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX6; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleAddValue; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label7; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX5; + private DevComponents.DotNetBar.Controls.TextBoxX text_soEleFrequency; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label1; - private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1; + private DevComponents.DotNetBar.Controls.TextBoxX text_soOutDelay; + private RoundButton roundButton1; + private RoundButton roundButton2; } } diff --git a/RbFreqStandMeasure/setting/SettingCtrlForm.cs b/RbFreqStandMeasure/setting/SettingCtrlForm.cs index 11b3bba..220e58e 100644 --- a/RbFreqStandMeasure/setting/SettingCtrlForm.cs +++ b/RbFreqStandMeasure/setting/SettingCtrlForm.cs @@ -1,9 +1,14 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; +using System.Reflection; using System.Text; using System.Windows.Forms; @@ -11,9 +16,92 @@ { public partial class SettingCtrlForm : UserControl { + DictService dictService = new DictServiceImpl(); + //CounterParam + public SettingCtrlForm() { InitializeComponent(); + + CounterParam counterParam = dictService.getCounterParam(); + text_generatorIp.Text = counterParam.GeneratorIp; + text_exportPath.Text = ConfigHelper.GetAppConfig("exportPath").ToString().Trim() ; + initCheckParam(); + } + + private void initCheckParam() + { + CounterCheckParam counterCheckParam = dictService.getCounterCheckParam(); + text_soOutDelay.Text = counterCheckParam.SoOutDelay; + text_soEleFrequency.Text = counterCheckParam.SoEleFrequency; + text_soEleAlarm.Text = counterCheckParam.SoEleAlarm; + text_soEleAddValue.Text = counterCheckParam.SoEleAddValue; + + text_freThreshold1.Text = counterCheckParam.FreThreshold1; + text_freThreshold2.Text = counterCheckParam.FreThreshold2; + text_freEleAddValue.Text = counterCheckParam.FreEleAddValue; + + text_cycThreshold1.Text = counterCheckParam.CycThreshold1; + text_cycThreshold2.Text = counterCheckParam.CycThreshold2; + text_cycEleAddValue.Text = counterCheckParam.CycEleAddValue; + + } + + private void btnSave_Click(object sender, EventArgs e) + { + try + { + if (text_generatorIp.Text.Trim().Equals("")) + { + MessageBox.Show("请输入计数器IP"); + return; + } + if (text_exportPath.Text.Trim().Equals("")) + { + MessageBox.Show("请输入数据导出默认路径"); + return; + } + ConfigHelper.UpdateAppConfig("exportPath", text_exportPath.Text.Trim()); + dictService.updateCounterIp(text_generatorIp.Text.Trim()); + + MessageBox.Show("保存成功!"); + } + catch(Exception ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "保存失败:"+ ex.Message); + MessageBox.Show("保存失败!"); + } + } + + private void btnCancel_Click(object sender, EventArgs e) + { + CounterParam counterParam = dictService.getCounterParam(); + text_generatorIp.Text = counterParam.GeneratorIp; + text_exportPath.Text = ConfigHelper.GetAppConfig("exportPath").ToString().Trim(); + } + + private void roundButton1_Click(object sender, EventArgs e) + { + initCheckParam(); + } + + private void roundButton2_Click(object sender, EventArgs e) + { + CounterCheckParam counterCheckParam = new CounterCheckParam(); + counterCheckParam.SoOutDelay = text_soOutDelay.Text; + counterCheckParam.SoEleFrequency = text_soEleFrequency.Text; + counterCheckParam.SoEleAlarm = text_soEleAlarm.Text ; + counterCheckParam.SoEleAddValue = text_soEleAddValue.Text ; + + counterCheckParam.FreThreshold1= text_freThreshold1.Text ; + counterCheckParam.FreThreshold2= text_freThreshold2.Text ; + counterCheckParam.FreEleAddValue= text_freEleAddValue.Text ; + + counterCheckParam.CycThreshold1= text_cycThreshold1.Text ; + counterCheckParam.CycThreshold2= text_cycThreshold2.Text ; + counterCheckParam.CycEleAddValue= text_cycEleAddValue.Text ; + + dictService.updateCheckParam(counterCheckParam); } } } diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs index 4051656..fdb2eb6 100644 --- a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs @@ -49,11 +49,11 @@ this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.panelBase = new System.Windows.Forms.Panel(); + this.label8 = new System.Windows.Forms.Label(); + this.label_clockStatus = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.labelBase = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.label_clockStatus = new System.Windows.Forms.Label(); this.panelLocation.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); @@ -92,10 +92,10 @@ // this.label13.BackColor = System.Drawing.Color.Transparent; this.label13.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label13.Location = new System.Drawing.Point(0, 220); + this.label13.Location = new System.Drawing.Point(38, 226); this.label13.Margin = new System.Windows.Forms.Padding(0); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(75, 25); + this.label13.Size = new System.Drawing.Size(57, 25); this.label13.TabIndex = 1; this.label13.Text = "Z:"; this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -104,10 +104,10 @@ // this.label12.BackColor = System.Drawing.Color.Transparent; this.label12.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(0, 180); + this.label12.Location = new System.Drawing.Point(34, 186); this.label12.Margin = new System.Windows.Forms.Padding(0); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(75, 25); + this.label12.Size = new System.Drawing.Size(61, 25); this.label12.TabIndex = 1; this.label12.Text = "Y:"; this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -116,10 +116,10 @@ // this.label11.BackColor = System.Drawing.Color.Transparent; this.label11.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label11.Location = new System.Drawing.Point(0, 140); + this.label11.Location = new System.Drawing.Point(31, 146); this.label11.Margin = new System.Windows.Forms.Padding(0); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(75, 25); + this.label11.Size = new System.Drawing.Size(64, 25); this.label11.TabIndex = 1; this.label11.Text = "X:"; this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -128,9 +128,9 @@ // this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(0, 60); + this.label9.Location = new System.Drawing.Point(34, 66); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(75, 25); + this.label9.Size = new System.Drawing.Size(61, 25); this.label9.TabIndex = 1; this.label9.Text = "经度:"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -139,10 +139,10 @@ // this.label10.BackColor = System.Drawing.Color.Transparent; this.label10.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label10.Location = new System.Drawing.Point(0, 100); + this.label10.Location = new System.Drawing.Point(31, 106); this.label10.Margin = new System.Windows.Forms.Padding(0); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(75, 25); + this.label10.Size = new System.Drawing.Size(64, 25); this.label10.TabIndex = 1; this.label10.Text = "纬度:"; this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -211,6 +211,7 @@ // panelSite // this.panelSite.BackColor = System.Drawing.Color.Black; + this.panelSite.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelSite.Location = new System.Drawing.Point(113, 15); this.panelSite.Name = "panelSite"; this.panelSite.Size = new System.Drawing.Size(610, 610); @@ -252,7 +253,7 @@ // this.label7.BackColor = System.Drawing.Color.Transparent; this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(7, 137); + this.label7.Location = new System.Drawing.Point(20, 143); this.label7.Margin = new System.Windows.Forms.Padding(0); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(75, 25); @@ -264,7 +265,7 @@ // this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(7, 97); + this.label6.Location = new System.Drawing.Point(20, 103); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(75, 25); this.label6.TabIndex = 1; @@ -275,7 +276,7 @@ // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(7, 57); + this.label1.Location = new System.Drawing.Point(20, 63); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(75, 25); this.label1.TabIndex = 1; @@ -296,11 +297,35 @@ this.panelBase.Size = new System.Drawing.Size(220, 156); this.panelBase.TabIndex = 3; // + // label8 + // + this.label8.BackColor = System.Drawing.Color.Transparent; + this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label8.ForeColor = System.Drawing.Color.Gray; + this.label8.Location = new System.Drawing.Point(99, 100); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(67, 25); + this.label8.TabIndex = 5; + this.label8.Text = "定位有效"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label_clockStatus + // + this.label_clockStatus.BackColor = System.Drawing.Color.Transparent; + this.label_clockStatus.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_clockStatus.ForeColor = System.Drawing.Color.Gray; + this.label_clockStatus.Location = new System.Drawing.Point(100, 59); + this.label_clockStatus.Name = "label_clockStatus"; + this.label_clockStatus.Size = new System.Drawing.Size(65, 25); + this.label_clockStatus.TabIndex = 4; + this.label_clockStatus.Text = "快锁"; + this.label_clockStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(7, 100); + this.label3.Location = new System.Drawing.Point(20, 100); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(75, 25); this.label3.TabIndex = 1; @@ -311,7 +336,7 @@ // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(7, 60); + this.label2.Location = new System.Drawing.Point(20, 60); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(75, 25); this.label2.TabIndex = 1; @@ -330,30 +355,6 @@ this.labelBase.Text = "基本信息"; this.labelBase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label8 - // - this.label8.BackColor = System.Drawing.Color.Transparent; - this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label8.ForeColor = System.Drawing.Color.Gray; - this.label8.Location = new System.Drawing.Point(86, 100); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(67, 25); - this.label8.TabIndex = 5; - this.label8.Text = "定位有效"; - this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label_clockStatus - // - this.label_clockStatus.BackColor = System.Drawing.Color.Transparent; - this.label_clockStatus.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label_clockStatus.ForeColor = System.Drawing.Color.Gray; - this.label_clockStatus.Location = new System.Drawing.Point(87, 59); - this.label_clockStatus.Name = "label_clockStatus"; - this.label_clockStatus.Size = new System.Drawing.Size(65, 25); - this.label_clockStatus.TabIndex = 4; - this.label_clockStatus.Text = "快锁"; - this.label_clockStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // StatusCtrlForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.cs b/RbFreqStandMeasure/status/StatusCtrlForm.cs index 2c9cd2c..2337d58 100644 --- a/RbFreqStandMeasure/status/StatusCtrlForm.cs +++ b/RbFreqStandMeasure/status/StatusCtrlForm.cs @@ -15,9 +15,10 @@ { InitializeComponent(); - Coordinate coo = new Coordinate(); - panelSite.Controls.Add(coo); - coo.Show(); + //panelSite.BackgroundImage = Properties.Resources.地球; + //Coordinate coo = new Coordinate(); + //panelSite.Controls.Add(coo); + //coo.Show(); } } } diff --git a/RbFreqStandMeasure/tools/DataHelper.cs b/RbFreqStandMeasure/tools/DataHelper.cs index 9a044d5..3d25f18 100644 --- a/RbFreqStandMeasure/tools/DataHelper.cs +++ b/RbFreqStandMeasure/tools/DataHelper.cs @@ -1,6 +1,9 @@ -using System; +using Casic.Birmm.RbFreqStandMeasure.Tools; +using System; using System.Collections.Generic; using System.Data; +using System.Diagnostics; +using System.IO; using System.Linq; using System.Reflection; using System.Text; @@ -10,7 +13,140 @@ { static class DataHelper { - + /// + /// 执行Cmd命令 + /// + /// 要启动的进程的目录 + /// 要执行的命令 + public static string StartCmd(String workingDirectory, String command) + { + try + { + using (Process p = new Process()) + { + string strOutput = ""; + + //Process p = new Process(); + p.StartInfo.FileName = "cmd.exe"; + p.StartInfo.Arguments = "/C" + command;// "/c"标示执行完命令后退出 + p.StartInfo.WorkingDirectory = workingDirectory; + p.StartInfo.UseShellExecute = false;//不启用shell 启动进程 + p.StartInfo.RedirectStandardInput = true;//重定向输入 + p.StartInfo.RedirectStandardOutput = true;//重定向标准输出 + p.StartInfo.RedirectStandardError = true;//重定向错误输出 + p.StartInfo.CreateNoWindow = true;//不创建新窗口 + + //如何判断CMD语句是否执行成功??? + try + { + if (p.Start())//执行 + { + p.WaitForExit();//等待程序执行完,退出进程 + strOutput = p.StandardOutput.ReadToEnd();//获取返回值 + } + } + catch (Exception exp) + { + MessageBox.Show(exp.Message, "软件提示"); + } + finally + { + if (p != null) p.Close(); + } + return strOutput; + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + return ""; + } + } + + + /// + /// 数据库备份 + /// + /// 数据库IP + /// 数据库端口 + /// 数据库名 + /// 用户名 + /// 用户密码 + /// 本分路径 + /// 数据库数据格式 + public static void Backup(string filepath) + { + try + { + string ip = ConfigHelper.GetAppConfig("server"); + string port = ConfigHelper.GetAppConfig("databasePort"); + string dbName = ConfigHelper.GetAppConfig("databaseName"); + string userName = ConfigHelper.GetAppConfig("databaseUser"); + string userPsw = ConfigHelper.GetAppConfig("databasePassword"); + string strCmd = string.Format("mysqldump -u{0} -p{1} {2}>{3}", userName, userPsw, dbName, + filepath);//中间不能有空格 + + string strDbPath = ConfigHelper.GetAppConfig("mysqlPath");//mySql安装路径 + try + { + StartCmd(strDbPath, strCmd); + if (File.Exists(filepath)) + { + MessageBox.Show("备份成功!"); + //strFilePath = sf.FileName; + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message.ToString()); + } + } + catch (Exception ex) + { + throw new Exception("数据库备份失败!\r\n" + ex.ToString()); + } + } + + /// + /// 数据库还原 + /// + /// 数据库IP + /// 数据库端口 + /// 数据库名 + /// 用户名 + /// 用户密码 + /// 本分路径 + /// 数据库数据格式 + public static void Restore(string filepath) + { + string ip = ConfigHelper.GetAppConfig("server"); + string port = ConfigHelper.GetAppConfig("databasePort"); + string dbName = ConfigHelper.GetAppConfig("databaseName"); + string userName = ConfigHelper.GetAppConfig("databaseUser"); + string userPsw = ConfigHelper.GetAppConfig("databasePassword"); + + //string command = "mysql --port=端口号 --user=用户名 --password=密码 数据库名<还原文件所在路径"; + //在文件路径后面加上""避免空格出现异常 + string strCmd = string.Format("mysql -u{0} -p{1} {2}<{3}", userName, userPsw, dbName, filepath); + + string strDbPath = ConfigHelper.GetAppConfig("mysqlPath");//mySql安装路径 + try + { + // StartCmd(path, "create database " + Databasename.Text.ToString()+";"); + string strReturn = StartCmd(strDbPath, strCmd); + if (string.IsNullOrWhiteSpace(strReturn)) + { + MessageBox.Show("还原成功!"); + } + } + catch (Exception ex) + { + MessageBox.Show("数据库还原失败!\r\n" + ex.Message.ToString()); + } + + } + + public static T DataRowToModel(DataRow row) { T t = default(T);