diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/Resources/dot-green.png b/RbFreqStandMeasure/Resources/dot-green.png
index b507671..3663a1d 100644
--- a/RbFreqStandMeasure/Resources/dot-green.png
+++ b/RbFreqStandMeasure/Resources/dot-green.png
Binary files differ
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/Resources/dot-green.png b/RbFreqStandMeasure/Resources/dot-green.png
index b507671..3663a1d 100644
--- a/RbFreqStandMeasure/Resources/dot-green.png
+++ b/RbFreqStandMeasure/Resources/dot-green.png
Binary files differ
diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
index 10ae75c..69e3834 100644
--- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
+++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
Binary files differ
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/Resources/dot-green.png b/RbFreqStandMeasure/Resources/dot-green.png
index b507671..3663a1d 100644
--- a/RbFreqStandMeasure/Resources/dot-green.png
+++ b/RbFreqStandMeasure/Resources/dot-green.png
Binary files differ
diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
index 10ae75c..69e3834 100644
--- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
+++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
Binary files differ
diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs
index 1f3294c..024ac67 100644
--- a/RbFreqStandMeasure/home/HomeCtrlForm.cs
+++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs
@@ -58,7 +58,7 @@
lock (obj)
{
label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+ label_receiverStatus.Text = StatusCtrlForm.receiverStatus;
}
}
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/Resources/dot-green.png b/RbFreqStandMeasure/Resources/dot-green.png
index b507671..3663a1d 100644
--- a/RbFreqStandMeasure/Resources/dot-green.png
+++ b/RbFreqStandMeasure/Resources/dot-green.png
Binary files differ
diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
index 10ae75c..69e3834 100644
--- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
+++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
Binary files differ
diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs
index 1f3294c..024ac67 100644
--- a/RbFreqStandMeasure/home/HomeCtrlForm.cs
+++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs
@@ -58,7 +58,7 @@
lock (obj)
{
label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+ label_receiverStatus.Text = StatusCtrlForm.receiverStatus;
}
}
diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
index 778dbfa..66be073 100644
--- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
@@ -70,8 +70,9 @@
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.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.dataGridView_Data = new System.Windows.Forms.DataGridView();
+ this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
+ this.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -531,29 +532,6 @@
this.radio_1s.UseVisualStyleBackColor = true;
this.radio_1s.CheckedChanged += new System.EventHandler(this.radio_1s_CheckedChanged);
//
- // btn_reDetec
- //
- this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
- this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
- this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- this.btn_reDetec.FlatAppearance.BorderSize = 0;
- this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
- this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
- this.btn_reDetec.Name = "btn_reDetec";
- this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
- this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Radius = 5;
- this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
- this.btn_reDetec.TabIndex = 75;
- this.btn_reDetec.Text = "重新检测";
- this.btn_reDetec.UseVisualStyleBackColor = true;
- this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
- //
// dataGridView_Data
//
this.dataGridView_Data.AllowUserToAddRows = false;
@@ -604,6 +582,53 @@
this.dataGridView_Data.Size = new System.Drawing.Size(433, 426);
this.dataGridView_Data.TabIndex = 3;
//
+ // 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)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.roundButton1.HoverForeColor = System.Drawing.Color.White;
+ this.roundButton1.Location = new System.Drawing.Point(669, 27);
+ 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(120, 30);
+ this.roundButton1.TabIndex = 81;
+ this.roundButton1.Text = "重新检测";
+ this.roundButton1.UseVisualStyleBackColor = true;
+ this.roundButton1.Visible = false;
+ this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click_1);
+ //
+ // btn_reDetec
+ //
+ this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
+ this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ this.btn_reDetec.FlatAppearance.BorderSize = 0;
+ this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
+ this.btn_reDetec.Name = "btn_reDetec";
+ this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
+ this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Radius = 5;
+ this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
+ this.btn_reDetec.TabIndex = 75;
+ this.btn_reDetec.Text = "重新检测";
+ this.btn_reDetec.UseVisualStyleBackColor = true;
+ this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
+ //
// DetailDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -611,6 +636,7 @@
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(898, 587);
this.ControlBox = false;
+ this.Controls.Add(this.roundButton1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
@@ -673,5 +699,6 @@
private System.Windows.Forms.RadioButton radio_1s;
public System.Windows.Forms.DataGridView dataGridView_Data;
public System.Windows.Forms.Label label_reDetecting;
+ private RoundButton roundButton1;
}
}
\ No newline at end of file
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/Resources/dot-green.png b/RbFreqStandMeasure/Resources/dot-green.png
index b507671..3663a1d 100644
--- a/RbFreqStandMeasure/Resources/dot-green.png
+++ b/RbFreqStandMeasure/Resources/dot-green.png
Binary files differ
diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
index 10ae75c..69e3834 100644
--- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
+++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
Binary files differ
diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs
index 1f3294c..024ac67 100644
--- a/RbFreqStandMeasure/home/HomeCtrlForm.cs
+++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs
@@ -58,7 +58,7 @@
lock (obj)
{
label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+ label_receiverStatus.Text = StatusCtrlForm.receiverStatus;
}
}
diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
index 778dbfa..66be073 100644
--- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
@@ -70,8 +70,9 @@
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.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.dataGridView_Data = new System.Windows.Forms.DataGridView();
+ this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
+ this.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -531,29 +532,6 @@
this.radio_1s.UseVisualStyleBackColor = true;
this.radio_1s.CheckedChanged += new System.EventHandler(this.radio_1s_CheckedChanged);
//
- // btn_reDetec
- //
- this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
- this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
- this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- this.btn_reDetec.FlatAppearance.BorderSize = 0;
- this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
- this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
- this.btn_reDetec.Name = "btn_reDetec";
- this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
- this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Radius = 5;
- this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
- this.btn_reDetec.TabIndex = 75;
- this.btn_reDetec.Text = "重新检测";
- this.btn_reDetec.UseVisualStyleBackColor = true;
- this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
- //
// dataGridView_Data
//
this.dataGridView_Data.AllowUserToAddRows = false;
@@ -604,6 +582,53 @@
this.dataGridView_Data.Size = new System.Drawing.Size(433, 426);
this.dataGridView_Data.TabIndex = 3;
//
+ // 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)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.roundButton1.HoverForeColor = System.Drawing.Color.White;
+ this.roundButton1.Location = new System.Drawing.Point(669, 27);
+ 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(120, 30);
+ this.roundButton1.TabIndex = 81;
+ this.roundButton1.Text = "重新检测";
+ this.roundButton1.UseVisualStyleBackColor = true;
+ this.roundButton1.Visible = false;
+ this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click_1);
+ //
+ // btn_reDetec
+ //
+ this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
+ this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ this.btn_reDetec.FlatAppearance.BorderSize = 0;
+ this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
+ this.btn_reDetec.Name = "btn_reDetec";
+ this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
+ this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Radius = 5;
+ this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
+ this.btn_reDetec.TabIndex = 75;
+ this.btn_reDetec.Text = "重新检测";
+ this.btn_reDetec.UseVisualStyleBackColor = true;
+ this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
+ //
// DetailDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -611,6 +636,7 @@
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(898, 587);
this.ControlBox = false;
+ this.Controls.Add(this.roundButton1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
@@ -673,5 +699,6 @@
private System.Windows.Forms.RadioButton radio_1s;
public System.Windows.Forms.DataGridView dataGridView_Data;
public System.Windows.Forms.Label label_reDetecting;
+ private RoundButton roundButton1;
}
}
\ No newline at end of file
diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs
index f52da1a..7b6a643 100644
--- a/RbFreqStandMeasure/info/DetailDlg.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.cs
@@ -506,5 +506,18 @@
if (dataGridView_Data.Rows.Count == 0) btn_reDetec.Enabled = false;
}
}
+
+
+ private void roundButton1_Click_1(object sender, EventArgs e)
+ {
+ List resultAgeRate = new List();
+ foreach (DataGridViewRow row in dataGridView_Data.Rows)
+ {
+ resultAgeRate.Add(row.Cells[2].Value.ToString());
+ }
+ double r = 0.0;
+ double k = FreMath.DriftRate(resultAgeRate, out r);
+ MessageBox.Show("r=" + r + ";" + "k=" + k);
+ }
}
}
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/Resources/dot-green.png b/RbFreqStandMeasure/Resources/dot-green.png
index b507671..3663a1d 100644
--- a/RbFreqStandMeasure/Resources/dot-green.png
+++ b/RbFreqStandMeasure/Resources/dot-green.png
Binary files differ
diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
index 10ae75c..69e3834 100644
--- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
+++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
Binary files differ
diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs
index 1f3294c..024ac67 100644
--- a/RbFreqStandMeasure/home/HomeCtrlForm.cs
+++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs
@@ -58,7 +58,7 @@
lock (obj)
{
label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+ label_receiverStatus.Text = StatusCtrlForm.receiverStatus;
}
}
diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
index 778dbfa..66be073 100644
--- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
@@ -70,8 +70,9 @@
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.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.dataGridView_Data = new System.Windows.Forms.DataGridView();
+ this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
+ this.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -531,29 +532,6 @@
this.radio_1s.UseVisualStyleBackColor = true;
this.radio_1s.CheckedChanged += new System.EventHandler(this.radio_1s_CheckedChanged);
//
- // btn_reDetec
- //
- this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
- this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
- this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- this.btn_reDetec.FlatAppearance.BorderSize = 0;
- this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
- this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
- this.btn_reDetec.Name = "btn_reDetec";
- this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
- this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Radius = 5;
- this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
- this.btn_reDetec.TabIndex = 75;
- this.btn_reDetec.Text = "重新检测";
- this.btn_reDetec.UseVisualStyleBackColor = true;
- this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
- //
// dataGridView_Data
//
this.dataGridView_Data.AllowUserToAddRows = false;
@@ -604,6 +582,53 @@
this.dataGridView_Data.Size = new System.Drawing.Size(433, 426);
this.dataGridView_Data.TabIndex = 3;
//
+ // 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)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.roundButton1.HoverForeColor = System.Drawing.Color.White;
+ this.roundButton1.Location = new System.Drawing.Point(669, 27);
+ 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(120, 30);
+ this.roundButton1.TabIndex = 81;
+ this.roundButton1.Text = "重新检测";
+ this.roundButton1.UseVisualStyleBackColor = true;
+ this.roundButton1.Visible = false;
+ this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click_1);
+ //
+ // btn_reDetec
+ //
+ this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
+ this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ this.btn_reDetec.FlatAppearance.BorderSize = 0;
+ this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
+ this.btn_reDetec.Name = "btn_reDetec";
+ this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
+ this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Radius = 5;
+ this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
+ this.btn_reDetec.TabIndex = 75;
+ this.btn_reDetec.Text = "重新检测";
+ this.btn_reDetec.UseVisualStyleBackColor = true;
+ this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
+ //
// DetailDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -611,6 +636,7 @@
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(898, 587);
this.ControlBox = false;
+ this.Controls.Add(this.roundButton1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
@@ -673,5 +699,6 @@
private System.Windows.Forms.RadioButton radio_1s;
public System.Windows.Forms.DataGridView dataGridView_Data;
public System.Windows.Forms.Label label_reDetecting;
+ private RoundButton roundButton1;
}
}
\ No newline at end of file
diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs
index f52da1a..7b6a643 100644
--- a/RbFreqStandMeasure/info/DetailDlg.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.cs
@@ -506,5 +506,18 @@
if (dataGridView_Data.Rows.Count == 0) btn_reDetec.Enabled = false;
}
}
+
+
+ private void roundButton1_Click_1(object sender, EventArgs e)
+ {
+ List resultAgeRate = new List();
+ foreach (DataGridViewRow row in dataGridView_Data.Rows)
+ {
+ resultAgeRate.Add(row.Cells[2].Value.ToString());
+ }
+ double r = 0.0;
+ double k = FreMath.DriftRate(resultAgeRate, out r);
+ MessageBox.Show("r=" + r + ";" + "k=" + k);
+ }
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
index 854ecc0..16d378a 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
@@ -29,6 +29,7 @@
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.panelLocation = new System.Windows.Forms.Panel();
this.label_z = new System.Windows.Forms.Label();
this.label_y = new System.Windows.Forms.Label();
@@ -62,6 +63,7 @@
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.labelBase = new System.Windows.Forms.Label();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panelLocation.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
@@ -284,6 +286,7 @@
this.panelSite.Name = "panelSite";
this.panelSite.Size = new System.Drawing.Size(610, 610);
this.panelSite.TabIndex = 4;
+ this.panelSite.Paint += new System.Windows.Forms.PaintEventHandler(this.panelSite_Paint);
//
// panel1
//
@@ -457,6 +460,12 @@
this.labelBase.Text = "基本信息";
this.labelBase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
+ // timer1
+ //
+ this.timer1.Enabled = true;
+ this.timer1.Interval = 60000;
+ this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+ //
// StatusCtrlForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -513,5 +522,6 @@
public System.Windows.Forms.Label label_clockStatus;
public System.Windows.Forms.Label label_chnTotal;
public System.Windows.Forms.Label label_usaTotal;
+ private System.Windows.Forms.Timer timer1;
}
}
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/Resources/dot-green.png b/RbFreqStandMeasure/Resources/dot-green.png
index b507671..3663a1d 100644
--- a/RbFreqStandMeasure/Resources/dot-green.png
+++ b/RbFreqStandMeasure/Resources/dot-green.png
Binary files differ
diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
index 10ae75c..69e3834 100644
--- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
+++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
Binary files differ
diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs
index 1f3294c..024ac67 100644
--- a/RbFreqStandMeasure/home/HomeCtrlForm.cs
+++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs
@@ -58,7 +58,7 @@
lock (obj)
{
label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+ label_receiverStatus.Text = StatusCtrlForm.receiverStatus;
}
}
diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
index 778dbfa..66be073 100644
--- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
@@ -70,8 +70,9 @@
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.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.dataGridView_Data = new System.Windows.Forms.DataGridView();
+ this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
+ this.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -531,29 +532,6 @@
this.radio_1s.UseVisualStyleBackColor = true;
this.radio_1s.CheckedChanged += new System.EventHandler(this.radio_1s_CheckedChanged);
//
- // btn_reDetec
- //
- this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
- this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
- this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- this.btn_reDetec.FlatAppearance.BorderSize = 0;
- this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
- this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
- this.btn_reDetec.Name = "btn_reDetec";
- this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
- this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Radius = 5;
- this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
- this.btn_reDetec.TabIndex = 75;
- this.btn_reDetec.Text = "重新检测";
- this.btn_reDetec.UseVisualStyleBackColor = true;
- this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
- //
// dataGridView_Data
//
this.dataGridView_Data.AllowUserToAddRows = false;
@@ -604,6 +582,53 @@
this.dataGridView_Data.Size = new System.Drawing.Size(433, 426);
this.dataGridView_Data.TabIndex = 3;
//
+ // 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)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.roundButton1.HoverForeColor = System.Drawing.Color.White;
+ this.roundButton1.Location = new System.Drawing.Point(669, 27);
+ 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(120, 30);
+ this.roundButton1.TabIndex = 81;
+ this.roundButton1.Text = "重新检测";
+ this.roundButton1.UseVisualStyleBackColor = true;
+ this.roundButton1.Visible = false;
+ this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click_1);
+ //
+ // btn_reDetec
+ //
+ this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
+ this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ this.btn_reDetec.FlatAppearance.BorderSize = 0;
+ this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
+ this.btn_reDetec.Name = "btn_reDetec";
+ this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
+ this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Radius = 5;
+ this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
+ this.btn_reDetec.TabIndex = 75;
+ this.btn_reDetec.Text = "重新检测";
+ this.btn_reDetec.UseVisualStyleBackColor = true;
+ this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
+ //
// DetailDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -611,6 +636,7 @@
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(898, 587);
this.ControlBox = false;
+ this.Controls.Add(this.roundButton1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
@@ -673,5 +699,6 @@
private System.Windows.Forms.RadioButton radio_1s;
public System.Windows.Forms.DataGridView dataGridView_Data;
public System.Windows.Forms.Label label_reDetecting;
+ private RoundButton roundButton1;
}
}
\ No newline at end of file
diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs
index f52da1a..7b6a643 100644
--- a/RbFreqStandMeasure/info/DetailDlg.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.cs
@@ -506,5 +506,18 @@
if (dataGridView_Data.Rows.Count == 0) btn_reDetec.Enabled = false;
}
}
+
+
+ private void roundButton1_Click_1(object sender, EventArgs e)
+ {
+ List resultAgeRate = new List();
+ foreach (DataGridViewRow row in dataGridView_Data.Rows)
+ {
+ resultAgeRate.Add(row.Cells[2].Value.ToString());
+ }
+ double r = 0.0;
+ double k = FreMath.DriftRate(resultAgeRate, out r);
+ MessageBox.Show("r=" + r + ";" + "k=" + k);
+ }
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
index 854ecc0..16d378a 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
@@ -29,6 +29,7 @@
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.panelLocation = new System.Windows.Forms.Panel();
this.label_z = new System.Windows.Forms.Label();
this.label_y = new System.Windows.Forms.Label();
@@ -62,6 +63,7 @@
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.labelBase = new System.Windows.Forms.Label();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panelLocation.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
@@ -284,6 +286,7 @@
this.panelSite.Name = "panelSite";
this.panelSite.Size = new System.Drawing.Size(610, 610);
this.panelSite.TabIndex = 4;
+ this.panelSite.Paint += new System.Windows.Forms.PaintEventHandler(this.panelSite_Paint);
//
// panel1
//
@@ -457,6 +460,12 @@
this.labelBase.Text = "基本信息";
this.labelBase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
+ // timer1
+ //
+ this.timer1.Enabled = true;
+ this.timer1.Interval = 60000;
+ this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+ //
// StatusCtrlForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -513,5 +522,6 @@
public System.Windows.Forms.Label label_clockStatus;
public System.Windows.Forms.Label label_chnTotal;
public System.Windows.Forms.Label label_usaTotal;
+ private System.Windows.Forms.Timer timer1;
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.cs b/RbFreqStandMeasure/status/StatusCtrlForm.cs
index 93c08dc..44a5302 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.cs
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.cs
@@ -5,7 +5,9 @@
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
+using System.IO.Ports;
using System.Reflection;
+using System.Text;
using System.Threading;
using System.Windows.Forms;
@@ -18,11 +20,29 @@
private readonly object obj = new object();
public static Graphics gp;
private static bool created = false;
+ public static SerialPort portSatellite = new SerialPort();
+ public static string receiverStatus = "";
+ public static string date = "";
+ public static string time = "";
+ public static string mjd = "";
+ public static string lat = "";
+ public static string lng = "";
+ public static string x = "";
+ public static string y = "";
+ public static string z = "";
+ public static List gpList = new List();
+ public static List bdList = new List();
+ public static int totalGP = 0;
+ public static int totalBD = 0;
public StatusCtrlForm()
{
InitializeComponent();
statusCtrlForm = this;
+ this.DoubleBuffered = true;
+ // SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+
+ this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
//label_date.Text = DateTime.Now.ToString("yyyy-MM-dd");
//label_time.Text = DateTime.Now.ToString("HH:mm:ss");
@@ -35,35 +55,38 @@
panelSite.Controls.Add(coo);
coo.Show();
- //new Thread(() =>
- //{
- lock (obj)
- {
+
+
if (!FreshStatus.isStarted)
{
FreshStatus.startClockFresh();
- FreshStatus.startSatelliteFresh();
}
- Thread.Sleep(500);
- label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+
+ new Thread(() =>
+ {
+ Thread.Sleep(500);
+ lock (obj)
+ {
+ label_clockStatus.Text = FreshStatus.clockStatus;
+ label_receiverStatus.Text = receiverStatus;
- label_date.Text = FreshStatus.date;
- label_time.Text = FreshStatus.time;
- label_mjd.Text = FreshStatus.mjd;
- label_lat.Text = FreshStatus.lat;
- label_lng.Text = FreshStatus.lng;
- label_x.Text = FreshStatus.x;
- label_y.Text = FreshStatus.y;
- label_z.Text = FreshStatus.z;
- label_usaTotal.Text = FreshStatus.totalGP+"";
- label_chnTotal.Text = FreshStatus.totalBD+"";
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "界面初始化。。。。。。");
+ label_date.Text = date;
+ label_time.Text = time;
+ label_mjd.Text = mjd;
+ label_lat.Text = lat;
+ label_lng.Text = lng;
+ label_x.Text = x;
+ label_y.Text = y;
+ label_z.Text = z;
+ refreshDraw();
+ //LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "界面初始化。。。。。。");
- draw(FreshStatus.bdList, FreshStatus.gpList);
- }
+ //draw(FreshStatus.bdList, FreshStatus.gpList);
+ }
+ }).Start();
+
- //}).Start();
+
}
@@ -76,15 +99,15 @@
Invoke(new MethodInvoker(delegate ()
{
- Graphics gp = panelSite.CreateGraphics();
- gp.Clear(panelSite.BackColor);
- gp.Dispose();
- //panelSite.Controls.Clear();
- //coo = new Coordinate();
- //panelSite.Controls.Add(coo);
- //coo.Show();
- drawFunc(bdList);
- drawFunc(gpList);
+ //Graphics gp = panelSite.CreateGraphics();
+ //gp.Clear(panelSite.BackColor);
+ //gp.Dispose();
+ panelSite.Controls.Clear();
+ coo = new Coordinate();
+ panelSite.Controls.Add(coo);
+ coo.Show();
+ //drawFunc(bdList);
+ //drawFunc(gpList);
}
));
@@ -97,27 +120,25 @@
}
- private void drawFunc(List gvsList)
+ private void PaintImage(Graphics gp)
{
try
{
Invoke(new MethodInvoker(delegate ()
{
- if (gvsList.Count > 0)
- {
- Graphics gp = panelSite.CreateGraphics();
- gp.SmoothingMode = SmoothingMode.HighQuality;
-
- int gpCount = 0;
+ if (bdList.Count > 0)
+ {
int bdCount = 0;
- foreach (string gsv in gvsList)
+ foreach (string gsv in bdList)
{
string[] arr = gsv.Split(',');
int length = arr.Length;
for (int i = 4; i < arr.Length; i = i + 3)
- {
- if ((i + 3) < arr.Length)
+ {
+ if ((i + 3) < arr.Length && !arr[i + 1].Equals("") && !arr[i + 2].Equals("") && !arr[i + 3].Equals(""))
{
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, arr[i + 1] + ";" + arr[i + 2] + ";" + arr[i + 3]);
+
int Elevation = Convert.ToInt32(arr[i + 1]);
int azimuth = Convert.ToInt32(arr[i + 2]);
double cosLen = Math.Cos(Elevation * Math.PI / 180) * (575 / 2);
@@ -126,19 +147,47 @@
int x = (int)Math.Floor(600 / 2 + xCor);
int y = (int)Math.Floor(610 / 2 - yCor);
- string type = "CHN";
- if (gsv.Contains("GPGSV")) { type = "USA"; gpCount++; }
- else { bdCount++; }
+ string type = "CHN";
gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject(type), x, y);
-
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gvsList.count="+ gvsList.Count+",画了一个" +type + "x="+x+"y="+y);
-
+ bdCount++;
+
}
}
- if(gpCount>0)label_usaTotal.Text = gpCount + "";
- if (bdCount > 0) label_chnTotal.Text = bdCount + "";
+
}
- gp.Dispose();
+ if (bdCount > 0) label_chnTotal.Text = bdCount + "";
+ }
+ if (gpList.Count > 0)
+ {
+ int gpCount = 0;
+ foreach (string gsv in gpList)
+ {
+ string[] arr = gsv.Split(',');
+ int length = arr.Length;
+ for (int i = 4; i < arr.Length; i = i + 3)
+ {
+ if ((i + 3) < arr.Length && !arr[i + 1].Equals("") && !arr[i + 2].Equals("") && !arr[i + 3].Equals(""))
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, arr[i + 1] + ";" + arr[i + 2] + ";" + arr[i + 3]);
+
+ int Elevation = Convert.ToInt32(arr[i + 1]);
+ int azimuth = Convert.ToInt32(arr[i + 2]);
+ double cosLen = Math.Cos(Elevation * Math.PI / 180) * (575 / 2);
+ double xCor = Math.Cos(azimuth * Math.PI / 180) * cosLen;
+ double yCor = Math.Sin(azimuth * Math.PI / 180) * cosLen;
+
+ int x = (int)Math.Floor(600 / 2 + xCor);
+ int y = (int)Math.Floor(610 / 2 - yCor);
+ string type = "USA";
+
+ gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject(type), x, y);
+ gpCount++;
+
+ }
+ }
+
+ }
+ if (gpCount > 0) label_usaTotal.Text = gpCount + "";
}
}
));
@@ -151,5 +200,352 @@
}
}
+ private void panelSite_Paint(object sender, PaintEventArgs e)
+ {
+ try
+ {
+ if ( bdList.Count > 0 ||gpList.Count > 0)
+ {
+
+ Invoke(new MethodInvoker(delegate ()
+ {
+ Rectangle rect = e.ClipRectangle;
+ BufferedGraphicsContext currentContext = BufferedGraphicsManager.Current;
+ BufferedGraphics myBuffer = currentContext.Allocate(e.Graphics, e.ClipRectangle);
+ Graphics g = myBuffer.Graphics;
+ g.SmoothingMode = SmoothingMode.HighQuality;
+ g.PixelOffsetMode = PixelOffsetMode.HighSpeed;
+ g.Clear(panelSite.BackColor);
+ PaintImage(g);
+
+ myBuffer.Render(e.Graphics);
+ g.Dispose();
+ myBuffer.Dispose();//释放资源
+ }
+ ));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "error error:" + ex.Message);
+ }
+ }
+
+ private void timer1_Tick(object sender, EventArgs e)
+ {
+ refreshDraw();
+ }
+
+ private void refreshDraw()
+ {
+ try
+ {
+ if (!portSatellite.IsOpen)
+ {
+ string portName = ConfigHelper.GetAppConfig("satellite").Split(' ')[0];
+ int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").Split(' ')[1]);
+ portSatellite.PortName = portName;
+ portSatellite.BaudRate = bandRate;
+ portSatellite.Parity = Parity.None;
+ portSatellite.DataBits = 8;
+ portSatellite.StopBits = StopBits.One;
+ portSatellite.Handshake = Handshake.None;
+ portSatellite.ReadTimeout = -1;
+ portSatellite.WriteTimeout = 3000;
+
+ // 打开串口
+ if (!portSatellite.IsOpen) portSatellite.Open();
+ if (portSatellite.IsOpen)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口成功!" + portName);
+ }
+ else
+ {
+ MessageBox.Show("无法打开串口" + portName + ",卫星状态更新失败!");
+ return;
+ }
+ }
+
+ int bdMessCount = 0;
+ int gpMessCount = 0;
+ int count = 0;
+ while (count < 1000)
+ {
+ Thread.Sleep(100);
+ int Readlen = portSatellite.BytesToRead;
+
+ if (Readlen > 0)
+ {
+ byte[] buffer = new byte[Readlen];
+ portSatellite.Read(buffer, 0, Readlen);// 接收数据到buffer里面
+ string data = Encoding.ASCII.GetString(buffer);
+
+ string[] dataArray = data.Split('$');
+ if (dataArray.Length > 0)
+ {
+ lock (obj)
+ {
+ gpList.Clear();
+ bdList.Clear();
+ totalGP = 0;
+ totalBD = 0;
+ }
+ int index = -1;
+ bool drawed = false;
+ bool gga = false;
+ bool rmc = false;
+ foreach (string sss in dataArray)
+ {
+ index++;
+
+ if ((sss.Contains("GPGGA") || sss.Contains("GNGGA")) && sss.Contains("*"))
+ {
+ string[] resultArray = sss.Split(',');
+ if (resultArray.Length > 5)
+ {
+ gga = true;
+ try
+ {
+ lat = resultArray[2].Replace(".", "").Insert(2, ".") + resultArray[3];
+ lng = resultArray[4].Replace(".", "").Insert(3, ".") + resultArray[5];
+ x = parseGGA(sss).Split(',')[0];
+ y = parseGGA(sss).Split(',')[1];
+ z = parseGGA(sss).Split(',')[2];
+
+ lock (obj)
+ {
+ statusCtrlForm.label_lat.Text = lat;
+ statusCtrlForm.label_lng.Text = lng;
+ statusCtrlForm.label_x.Text = x;
+ statusCtrlForm.label_y.Text = y;
+ statusCtrlForm.label_z.Text = z;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "GGA error:" + ex.Message);
+ }
+ }
+ }
+ else if (sss.Contains("GNRMC") && sss.Contains("*"))
+ {
+ string[] resultArray = sss.Split(',');
+ if (resultArray.Length > 9)
+ {
+ rmc = true;
+ date = resultArray[9];
+ mjd = "";
+ if (date.Length > 5)
+ {
+ mjd = getMJD("20" + date.Substring(4, 2), date.Substring(2, 2), date.Substring(0, 2));
+ date = "20" + date.Substring(4, 2) + "-" + date.Substring(2, 2) + "-" + date.Substring(0, 2);
+
+ }
+ time = resultArray[1];
+ if (time.Length > 5)
+ {
+ int hour = Convert.ToInt32(time.Substring(0, 2));
+ if ((hour + 8) > 23) hour = hour + 8 - 24;
+ else hour = hour + 8;
+
+ time = hour + ":" + time.Substring(2, 2) + ":" + time.Substring(4);
+
+ }
+
+ if (resultArray[2] == "A") receiverStatus = "定位有效";
+ else if (resultArray[2] == "V") receiverStatus = "警告";
+
+
+ try
+ {
+ lock (obj)
+ {
+ statusCtrlForm.label_date.Text = date;
+ statusCtrlForm.label_time.Text = time;
+ statusCtrlForm.label_mjd.Text = mjd;
+ statusCtrlForm.label_receiverStatus.Text = receiverStatus;
+ HomeCtrlForm.homeCtrlForm.label_receiverStatus.Text = receiverStatus;
+ }
+
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "RMC error:" + ex.Message);
+ }
+
+ }
+
+ }
+ else if ((sss.Contains("GPGSV") || sss.Contains("BDGSV") || sss.Contains("GBGSV")) && sss.Contains("*"))
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "GSV : " + sss);
+ if (sss.Split(',').Length > 8)
+ {
+ if (sss.Contains("GPGSV"))
+ {
+ gpMessCount = Convert.ToInt32(sss.Split(',')[1]);
+ if (gpList.Count < gpMessCount)
+ {
+ gpList.Add(sss);
+ totalGP = Convert.ToInt32(sss.Split(',')[3]);
+ }
+ }
+ else
+ {
+ bdMessCount = Convert.ToInt32(sss.Split(',')[1]);
+ if (bdList.Count < bdMessCount)
+ {
+ bdList.Add(sss);
+ totalBD = Convert.ToInt32(sss.Split(',')[3]);
+ }
+ }
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gpList : " + gpList.Count + ",gp共有 :" + +gpMessCount);
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "bdList : " + bdList.Count + ",bd共有 : " + bdMessCount);
+
+ if ((gpList.Count > 0 && gpList.Count == gpMessCount) && (bdList.Count > 0) && bdList.Count == bdMessCount)
+ {
+ if (!drawed)
+ {
+ drawed = true;
+ try
+ {
+ lock (obj)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "更新更新更新更新更新画:::: : ");
+
+ panelSite.Refresh();
+ }
+
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "draw gsv error:" + ex.Message);
+ }
+ }
+ }
+ }
+
+ }
+ if (drawed && gga && rmc)
+ {
+ break;
+ }
+
+ }
+ break;
+ }
+ }
+ count++;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "exeSatellite error:" + ex.Message);
+ }
+ }
+
+ private static string getMJD(string ys, string ms, string ds)
+ {
+ try
+ {
+ int y = Convert.ToInt32(ys) - 1900;
+ int m = Convert.ToInt32(ms);
+ int d = Convert.ToInt32(ds);
+ int L = 0;
+ if (m == 1 || m == 2) L = 1;
+ int njdINT = 14956 + d + (int)((y - L) * 365.25) + (int)((m + 1 + L * 12) * 30.6001);
+ return njdINT + "";
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "getMJD error:" + ex.Message);
+ return "";
+ }
+ }
+
+ private string parseGGA(string ggaStr)
+ {
+ try
+ {
+ double f = 1 / 298.257223563; /*基准椭球体的极扁率*/
+ double a = 6378137.0; /*基准椭球体的长半径*/
+ double b = 6356752.314; /*基准椭球体的短半径*/
+ double e2 = f * (2 - f); /*基准椭球体的偏心率*/
+ double pi_180 = Math.PI / 180;
+ //$GPGGA,081918.00,3954.7889938,N,11615.5667600,E,1,28,0.68,78.6748,M,-9.7970,M,02,*7D
+ var arr = ggaStr.Split(',');
+
+ string m_pBs = parseCoord(arr[2], arr[3]);
+ string m_pLs = parseCoord(arr[4], arr[5]);
+ string m_pHs = "";
+ if (!arr[9].Equals("") && !arr[11].Equals("")) m_pHs = Convert.ToDouble(arr[9]) + Convert.ToDouble(arr[11]) + "";// add 大地水准面高度 纠正误差
+ // objBLH.b = util.parseCoord(arr[2],arr[3]);
+ // objBLH.l = util.parseCoord(arr[4],arr[5]);
+
+ // objBLH.h = parseFloat(arr[9]);
+ string X = "", Y = "", Z = "";
+ if (!m_pBs.Equals("") && !m_pLs.Equals("") && !m_pHs.Equals(""))
+ {
+ double m_pB = Convert.ToDouble(m_pBs);
+ double m_pL = Convert.ToDouble(m_pLs);
+ double m_pH = Convert.ToDouble(m_pHs);
+ double N = a / Math.Sqrt(1 - e2 * Math.Sin(m_pB * pi_180) * Math.Sin(m_pB * Math.PI));
+ X = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Cos(m_pL * Math.PI) + "";
+ Y = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Sin(m_pL * Math.PI) + "";
+ Z = (N * (1 - e2) + m_pH) * Math.Sin(m_pB * pi_180) + "";
+ }
+ return X + "," + Y + "," + Z;
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "parseGGA error:" + ex.Message);
+ return " , , ";
+ }
+ }
+ private string parseCoord(string coord, string dir)
+ {
+ //$GPGGA,081918.00,3954.7889938,N,11615.5667600,E,1,28,0.68,78.6748,M,-9.7970,M,02,*7D
+ if (coord.Equals(""))
+ return null;
+ int n = 1, sgn = 1;
+ switch (dir)
+ {
+ case "S":
+ sgn = -1; break;
+ case "N":
+ n = 2; break;
+ case "W":
+ sgn = -1; break;
+ case "E":
+ n = 3; break;
+
+ default: break;
+ }
+ return sgn * (Convert.ToDouble(coord.Substring(0, n)) + Convert.ToDouble(coord.Substring(n)) / 60) + "";
+ }
+ private string BLH2XYX(string objectBLH)
+ {
+ // var objectBLH ={l:116.259446,b:39.91314989666667,h:78.6748};//for test
+ // var N = a / Math.sqrt(1 - e2 * Math.sin(objectBLH.b * pi_180) * Math.sin(objectBLH.b * pi_180));
+ // var X = (N + objectBLH.h) * Math.cos(objectBLH.b * pi_180) * Math.cos(objectBLH.l * pi_180);
+ // var Y = (N + objectBLH.h) * Math.cos(objectBLH.b * pi_180) * Math.sin(objectBLH.l * pi_180);
+ // var Z = [N * (1 - e2 ) + objectBLH.h] * Math.sin(objectBLH.b * pi_180);
+ // var objectXYZ = {};
+ // objectXYZ.X = X;
+ // objectXYZ.Y = Y;
+ // objectXYZ.Z = Z;
+ string X = "", Y = "", Z = "";
+ double m_pB = Convert.ToDouble(objectBLH.Split(',')[0]);
+ double m_pL = Convert.ToDouble(objectBLH.Split(',')[1]);
+ double m_pH = Convert.ToDouble(objectBLH.Split(',')[2]);
+ //double N = a / Math.Sqrt(1 - e2 * Math.Sin(m_pB * pi_180) * Math.Sin(m_pB * Math.PI));
+ //X = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Cos(m_pL * Math.PI);
+ //Y = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Sin(m_pL * Math.PI);
+ //Z = [N * (1 - e2) + m_pH] * Math.Sin(m_pB * pi_180);
+
+ return X + "," + Y + "," + Z;
+ }
+
}
}
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/Resources/dot-green.png b/RbFreqStandMeasure/Resources/dot-green.png
index b507671..3663a1d 100644
--- a/RbFreqStandMeasure/Resources/dot-green.png
+++ b/RbFreqStandMeasure/Resources/dot-green.png
Binary files differ
diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
index 10ae75c..69e3834 100644
--- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
+++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
Binary files differ
diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs
index 1f3294c..024ac67 100644
--- a/RbFreqStandMeasure/home/HomeCtrlForm.cs
+++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs
@@ -58,7 +58,7 @@
lock (obj)
{
label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+ label_receiverStatus.Text = StatusCtrlForm.receiverStatus;
}
}
diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
index 778dbfa..66be073 100644
--- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
@@ -70,8 +70,9 @@
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.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.dataGridView_Data = new System.Windows.Forms.DataGridView();
+ this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
+ this.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -531,29 +532,6 @@
this.radio_1s.UseVisualStyleBackColor = true;
this.radio_1s.CheckedChanged += new System.EventHandler(this.radio_1s_CheckedChanged);
//
- // btn_reDetec
- //
- this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
- this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
- this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- this.btn_reDetec.FlatAppearance.BorderSize = 0;
- this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
- this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
- this.btn_reDetec.Name = "btn_reDetec";
- this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
- this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Radius = 5;
- this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
- this.btn_reDetec.TabIndex = 75;
- this.btn_reDetec.Text = "重新检测";
- this.btn_reDetec.UseVisualStyleBackColor = true;
- this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
- //
// dataGridView_Data
//
this.dataGridView_Data.AllowUserToAddRows = false;
@@ -604,6 +582,53 @@
this.dataGridView_Data.Size = new System.Drawing.Size(433, 426);
this.dataGridView_Data.TabIndex = 3;
//
+ // 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)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.roundButton1.HoverForeColor = System.Drawing.Color.White;
+ this.roundButton1.Location = new System.Drawing.Point(669, 27);
+ 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(120, 30);
+ this.roundButton1.TabIndex = 81;
+ this.roundButton1.Text = "重新检测";
+ this.roundButton1.UseVisualStyleBackColor = true;
+ this.roundButton1.Visible = false;
+ this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click_1);
+ //
+ // btn_reDetec
+ //
+ this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
+ this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ this.btn_reDetec.FlatAppearance.BorderSize = 0;
+ this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
+ this.btn_reDetec.Name = "btn_reDetec";
+ this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
+ this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Radius = 5;
+ this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
+ this.btn_reDetec.TabIndex = 75;
+ this.btn_reDetec.Text = "重新检测";
+ this.btn_reDetec.UseVisualStyleBackColor = true;
+ this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
+ //
// DetailDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -611,6 +636,7 @@
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(898, 587);
this.ControlBox = false;
+ this.Controls.Add(this.roundButton1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
@@ -673,5 +699,6 @@
private System.Windows.Forms.RadioButton radio_1s;
public System.Windows.Forms.DataGridView dataGridView_Data;
public System.Windows.Forms.Label label_reDetecting;
+ private RoundButton roundButton1;
}
}
\ No newline at end of file
diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs
index f52da1a..7b6a643 100644
--- a/RbFreqStandMeasure/info/DetailDlg.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.cs
@@ -506,5 +506,18 @@
if (dataGridView_Data.Rows.Count == 0) btn_reDetec.Enabled = false;
}
}
+
+
+ private void roundButton1_Click_1(object sender, EventArgs e)
+ {
+ List resultAgeRate = new List();
+ foreach (DataGridViewRow row in dataGridView_Data.Rows)
+ {
+ resultAgeRate.Add(row.Cells[2].Value.ToString());
+ }
+ double r = 0.0;
+ double k = FreMath.DriftRate(resultAgeRate, out r);
+ MessageBox.Show("r=" + r + ";" + "k=" + k);
+ }
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
index 854ecc0..16d378a 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
@@ -29,6 +29,7 @@
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.panelLocation = new System.Windows.Forms.Panel();
this.label_z = new System.Windows.Forms.Label();
this.label_y = new System.Windows.Forms.Label();
@@ -62,6 +63,7 @@
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.labelBase = new System.Windows.Forms.Label();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panelLocation.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
@@ -284,6 +286,7 @@
this.panelSite.Name = "panelSite";
this.panelSite.Size = new System.Drawing.Size(610, 610);
this.panelSite.TabIndex = 4;
+ this.panelSite.Paint += new System.Windows.Forms.PaintEventHandler(this.panelSite_Paint);
//
// panel1
//
@@ -457,6 +460,12 @@
this.labelBase.Text = "基本信息";
this.labelBase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
+ // timer1
+ //
+ this.timer1.Enabled = true;
+ this.timer1.Interval = 60000;
+ this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+ //
// StatusCtrlForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -513,5 +522,6 @@
public System.Windows.Forms.Label label_clockStatus;
public System.Windows.Forms.Label label_chnTotal;
public System.Windows.Forms.Label label_usaTotal;
+ private System.Windows.Forms.Timer timer1;
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.cs b/RbFreqStandMeasure/status/StatusCtrlForm.cs
index 93c08dc..44a5302 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.cs
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.cs
@@ -5,7 +5,9 @@
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
+using System.IO.Ports;
using System.Reflection;
+using System.Text;
using System.Threading;
using System.Windows.Forms;
@@ -18,11 +20,29 @@
private readonly object obj = new object();
public static Graphics gp;
private static bool created = false;
+ public static SerialPort portSatellite = new SerialPort();
+ public static string receiverStatus = "";
+ public static string date = "";
+ public static string time = "";
+ public static string mjd = "";
+ public static string lat = "";
+ public static string lng = "";
+ public static string x = "";
+ public static string y = "";
+ public static string z = "";
+ public static List gpList = new List();
+ public static List bdList = new List();
+ public static int totalGP = 0;
+ public static int totalBD = 0;
public StatusCtrlForm()
{
InitializeComponent();
statusCtrlForm = this;
+ this.DoubleBuffered = true;
+ // SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+
+ this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
//label_date.Text = DateTime.Now.ToString("yyyy-MM-dd");
//label_time.Text = DateTime.Now.ToString("HH:mm:ss");
@@ -35,35 +55,38 @@
panelSite.Controls.Add(coo);
coo.Show();
- //new Thread(() =>
- //{
- lock (obj)
- {
+
+
if (!FreshStatus.isStarted)
{
FreshStatus.startClockFresh();
- FreshStatus.startSatelliteFresh();
}
- Thread.Sleep(500);
- label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+
+ new Thread(() =>
+ {
+ Thread.Sleep(500);
+ lock (obj)
+ {
+ label_clockStatus.Text = FreshStatus.clockStatus;
+ label_receiverStatus.Text = receiverStatus;
- label_date.Text = FreshStatus.date;
- label_time.Text = FreshStatus.time;
- label_mjd.Text = FreshStatus.mjd;
- label_lat.Text = FreshStatus.lat;
- label_lng.Text = FreshStatus.lng;
- label_x.Text = FreshStatus.x;
- label_y.Text = FreshStatus.y;
- label_z.Text = FreshStatus.z;
- label_usaTotal.Text = FreshStatus.totalGP+"";
- label_chnTotal.Text = FreshStatus.totalBD+"";
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "界面初始化。。。。。。");
+ label_date.Text = date;
+ label_time.Text = time;
+ label_mjd.Text = mjd;
+ label_lat.Text = lat;
+ label_lng.Text = lng;
+ label_x.Text = x;
+ label_y.Text = y;
+ label_z.Text = z;
+ refreshDraw();
+ //LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "界面初始化。。。。。。");
- draw(FreshStatus.bdList, FreshStatus.gpList);
- }
+ //draw(FreshStatus.bdList, FreshStatus.gpList);
+ }
+ }).Start();
+
- //}).Start();
+
}
@@ -76,15 +99,15 @@
Invoke(new MethodInvoker(delegate ()
{
- Graphics gp = panelSite.CreateGraphics();
- gp.Clear(panelSite.BackColor);
- gp.Dispose();
- //panelSite.Controls.Clear();
- //coo = new Coordinate();
- //panelSite.Controls.Add(coo);
- //coo.Show();
- drawFunc(bdList);
- drawFunc(gpList);
+ //Graphics gp = panelSite.CreateGraphics();
+ //gp.Clear(panelSite.BackColor);
+ //gp.Dispose();
+ panelSite.Controls.Clear();
+ coo = new Coordinate();
+ panelSite.Controls.Add(coo);
+ coo.Show();
+ //drawFunc(bdList);
+ //drawFunc(gpList);
}
));
@@ -97,27 +120,25 @@
}
- private void drawFunc(List gvsList)
+ private void PaintImage(Graphics gp)
{
try
{
Invoke(new MethodInvoker(delegate ()
{
- if (gvsList.Count > 0)
- {
- Graphics gp = panelSite.CreateGraphics();
- gp.SmoothingMode = SmoothingMode.HighQuality;
-
- int gpCount = 0;
+ if (bdList.Count > 0)
+ {
int bdCount = 0;
- foreach (string gsv in gvsList)
+ foreach (string gsv in bdList)
{
string[] arr = gsv.Split(',');
int length = arr.Length;
for (int i = 4; i < arr.Length; i = i + 3)
- {
- if ((i + 3) < arr.Length)
+ {
+ if ((i + 3) < arr.Length && !arr[i + 1].Equals("") && !arr[i + 2].Equals("") && !arr[i + 3].Equals(""))
{
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, arr[i + 1] + ";" + arr[i + 2] + ";" + arr[i + 3]);
+
int Elevation = Convert.ToInt32(arr[i + 1]);
int azimuth = Convert.ToInt32(arr[i + 2]);
double cosLen = Math.Cos(Elevation * Math.PI / 180) * (575 / 2);
@@ -126,19 +147,47 @@
int x = (int)Math.Floor(600 / 2 + xCor);
int y = (int)Math.Floor(610 / 2 - yCor);
- string type = "CHN";
- if (gsv.Contains("GPGSV")) { type = "USA"; gpCount++; }
- else { bdCount++; }
+ string type = "CHN";
gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject(type), x, y);
-
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gvsList.count="+ gvsList.Count+",画了一个" +type + "x="+x+"y="+y);
-
+ bdCount++;
+
}
}
- if(gpCount>0)label_usaTotal.Text = gpCount + "";
- if (bdCount > 0) label_chnTotal.Text = bdCount + "";
+
}
- gp.Dispose();
+ if (bdCount > 0) label_chnTotal.Text = bdCount + "";
+ }
+ if (gpList.Count > 0)
+ {
+ int gpCount = 0;
+ foreach (string gsv in gpList)
+ {
+ string[] arr = gsv.Split(',');
+ int length = arr.Length;
+ for (int i = 4; i < arr.Length; i = i + 3)
+ {
+ if ((i + 3) < arr.Length && !arr[i + 1].Equals("") && !arr[i + 2].Equals("") && !arr[i + 3].Equals(""))
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, arr[i + 1] + ";" + arr[i + 2] + ";" + arr[i + 3]);
+
+ int Elevation = Convert.ToInt32(arr[i + 1]);
+ int azimuth = Convert.ToInt32(arr[i + 2]);
+ double cosLen = Math.Cos(Elevation * Math.PI / 180) * (575 / 2);
+ double xCor = Math.Cos(azimuth * Math.PI / 180) * cosLen;
+ double yCor = Math.Sin(azimuth * Math.PI / 180) * cosLen;
+
+ int x = (int)Math.Floor(600 / 2 + xCor);
+ int y = (int)Math.Floor(610 / 2 - yCor);
+ string type = "USA";
+
+ gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject(type), x, y);
+ gpCount++;
+
+ }
+ }
+
+ }
+ if (gpCount > 0) label_usaTotal.Text = gpCount + "";
}
}
));
@@ -151,5 +200,352 @@
}
}
+ private void panelSite_Paint(object sender, PaintEventArgs e)
+ {
+ try
+ {
+ if ( bdList.Count > 0 ||gpList.Count > 0)
+ {
+
+ Invoke(new MethodInvoker(delegate ()
+ {
+ Rectangle rect = e.ClipRectangle;
+ BufferedGraphicsContext currentContext = BufferedGraphicsManager.Current;
+ BufferedGraphics myBuffer = currentContext.Allocate(e.Graphics, e.ClipRectangle);
+ Graphics g = myBuffer.Graphics;
+ g.SmoothingMode = SmoothingMode.HighQuality;
+ g.PixelOffsetMode = PixelOffsetMode.HighSpeed;
+ g.Clear(panelSite.BackColor);
+ PaintImage(g);
+
+ myBuffer.Render(e.Graphics);
+ g.Dispose();
+ myBuffer.Dispose();//释放资源
+ }
+ ));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "error error:" + ex.Message);
+ }
+ }
+
+ private void timer1_Tick(object sender, EventArgs e)
+ {
+ refreshDraw();
+ }
+
+ private void refreshDraw()
+ {
+ try
+ {
+ if (!portSatellite.IsOpen)
+ {
+ string portName = ConfigHelper.GetAppConfig("satellite").Split(' ')[0];
+ int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").Split(' ')[1]);
+ portSatellite.PortName = portName;
+ portSatellite.BaudRate = bandRate;
+ portSatellite.Parity = Parity.None;
+ portSatellite.DataBits = 8;
+ portSatellite.StopBits = StopBits.One;
+ portSatellite.Handshake = Handshake.None;
+ portSatellite.ReadTimeout = -1;
+ portSatellite.WriteTimeout = 3000;
+
+ // 打开串口
+ if (!portSatellite.IsOpen) portSatellite.Open();
+ if (portSatellite.IsOpen)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口成功!" + portName);
+ }
+ else
+ {
+ MessageBox.Show("无法打开串口" + portName + ",卫星状态更新失败!");
+ return;
+ }
+ }
+
+ int bdMessCount = 0;
+ int gpMessCount = 0;
+ int count = 0;
+ while (count < 1000)
+ {
+ Thread.Sleep(100);
+ int Readlen = portSatellite.BytesToRead;
+
+ if (Readlen > 0)
+ {
+ byte[] buffer = new byte[Readlen];
+ portSatellite.Read(buffer, 0, Readlen);// 接收数据到buffer里面
+ string data = Encoding.ASCII.GetString(buffer);
+
+ string[] dataArray = data.Split('$');
+ if (dataArray.Length > 0)
+ {
+ lock (obj)
+ {
+ gpList.Clear();
+ bdList.Clear();
+ totalGP = 0;
+ totalBD = 0;
+ }
+ int index = -1;
+ bool drawed = false;
+ bool gga = false;
+ bool rmc = false;
+ foreach (string sss in dataArray)
+ {
+ index++;
+
+ if ((sss.Contains("GPGGA") || sss.Contains("GNGGA")) && sss.Contains("*"))
+ {
+ string[] resultArray = sss.Split(',');
+ if (resultArray.Length > 5)
+ {
+ gga = true;
+ try
+ {
+ lat = resultArray[2].Replace(".", "").Insert(2, ".") + resultArray[3];
+ lng = resultArray[4].Replace(".", "").Insert(3, ".") + resultArray[5];
+ x = parseGGA(sss).Split(',')[0];
+ y = parseGGA(sss).Split(',')[1];
+ z = parseGGA(sss).Split(',')[2];
+
+ lock (obj)
+ {
+ statusCtrlForm.label_lat.Text = lat;
+ statusCtrlForm.label_lng.Text = lng;
+ statusCtrlForm.label_x.Text = x;
+ statusCtrlForm.label_y.Text = y;
+ statusCtrlForm.label_z.Text = z;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "GGA error:" + ex.Message);
+ }
+ }
+ }
+ else if (sss.Contains("GNRMC") && sss.Contains("*"))
+ {
+ string[] resultArray = sss.Split(',');
+ if (resultArray.Length > 9)
+ {
+ rmc = true;
+ date = resultArray[9];
+ mjd = "";
+ if (date.Length > 5)
+ {
+ mjd = getMJD("20" + date.Substring(4, 2), date.Substring(2, 2), date.Substring(0, 2));
+ date = "20" + date.Substring(4, 2) + "-" + date.Substring(2, 2) + "-" + date.Substring(0, 2);
+
+ }
+ time = resultArray[1];
+ if (time.Length > 5)
+ {
+ int hour = Convert.ToInt32(time.Substring(0, 2));
+ if ((hour + 8) > 23) hour = hour + 8 - 24;
+ else hour = hour + 8;
+
+ time = hour + ":" + time.Substring(2, 2) + ":" + time.Substring(4);
+
+ }
+
+ if (resultArray[2] == "A") receiverStatus = "定位有效";
+ else if (resultArray[2] == "V") receiverStatus = "警告";
+
+
+ try
+ {
+ lock (obj)
+ {
+ statusCtrlForm.label_date.Text = date;
+ statusCtrlForm.label_time.Text = time;
+ statusCtrlForm.label_mjd.Text = mjd;
+ statusCtrlForm.label_receiverStatus.Text = receiverStatus;
+ HomeCtrlForm.homeCtrlForm.label_receiverStatus.Text = receiverStatus;
+ }
+
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "RMC error:" + ex.Message);
+ }
+
+ }
+
+ }
+ else if ((sss.Contains("GPGSV") || sss.Contains("BDGSV") || sss.Contains("GBGSV")) && sss.Contains("*"))
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "GSV : " + sss);
+ if (sss.Split(',').Length > 8)
+ {
+ if (sss.Contains("GPGSV"))
+ {
+ gpMessCount = Convert.ToInt32(sss.Split(',')[1]);
+ if (gpList.Count < gpMessCount)
+ {
+ gpList.Add(sss);
+ totalGP = Convert.ToInt32(sss.Split(',')[3]);
+ }
+ }
+ else
+ {
+ bdMessCount = Convert.ToInt32(sss.Split(',')[1]);
+ if (bdList.Count < bdMessCount)
+ {
+ bdList.Add(sss);
+ totalBD = Convert.ToInt32(sss.Split(',')[3]);
+ }
+ }
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gpList : " + gpList.Count + ",gp共有 :" + +gpMessCount);
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "bdList : " + bdList.Count + ",bd共有 : " + bdMessCount);
+
+ if ((gpList.Count > 0 && gpList.Count == gpMessCount) && (bdList.Count > 0) && bdList.Count == bdMessCount)
+ {
+ if (!drawed)
+ {
+ drawed = true;
+ try
+ {
+ lock (obj)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "更新更新更新更新更新画:::: : ");
+
+ panelSite.Refresh();
+ }
+
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "draw gsv error:" + ex.Message);
+ }
+ }
+ }
+ }
+
+ }
+ if (drawed && gga && rmc)
+ {
+ break;
+ }
+
+ }
+ break;
+ }
+ }
+ count++;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "exeSatellite error:" + ex.Message);
+ }
+ }
+
+ private static string getMJD(string ys, string ms, string ds)
+ {
+ try
+ {
+ int y = Convert.ToInt32(ys) - 1900;
+ int m = Convert.ToInt32(ms);
+ int d = Convert.ToInt32(ds);
+ int L = 0;
+ if (m == 1 || m == 2) L = 1;
+ int njdINT = 14956 + d + (int)((y - L) * 365.25) + (int)((m + 1 + L * 12) * 30.6001);
+ return njdINT + "";
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "getMJD error:" + ex.Message);
+ return "";
+ }
+ }
+
+ private string parseGGA(string ggaStr)
+ {
+ try
+ {
+ double f = 1 / 298.257223563; /*基准椭球体的极扁率*/
+ double a = 6378137.0; /*基准椭球体的长半径*/
+ double b = 6356752.314; /*基准椭球体的短半径*/
+ double e2 = f * (2 - f); /*基准椭球体的偏心率*/
+ double pi_180 = Math.PI / 180;
+ //$GPGGA,081918.00,3954.7889938,N,11615.5667600,E,1,28,0.68,78.6748,M,-9.7970,M,02,*7D
+ var arr = ggaStr.Split(',');
+
+ string m_pBs = parseCoord(arr[2], arr[3]);
+ string m_pLs = parseCoord(arr[4], arr[5]);
+ string m_pHs = "";
+ if (!arr[9].Equals("") && !arr[11].Equals("")) m_pHs = Convert.ToDouble(arr[9]) + Convert.ToDouble(arr[11]) + "";// add 大地水准面高度 纠正误差
+ // objBLH.b = util.parseCoord(arr[2],arr[3]);
+ // objBLH.l = util.parseCoord(arr[4],arr[5]);
+
+ // objBLH.h = parseFloat(arr[9]);
+ string X = "", Y = "", Z = "";
+ if (!m_pBs.Equals("") && !m_pLs.Equals("") && !m_pHs.Equals(""))
+ {
+ double m_pB = Convert.ToDouble(m_pBs);
+ double m_pL = Convert.ToDouble(m_pLs);
+ double m_pH = Convert.ToDouble(m_pHs);
+ double N = a / Math.Sqrt(1 - e2 * Math.Sin(m_pB * pi_180) * Math.Sin(m_pB * Math.PI));
+ X = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Cos(m_pL * Math.PI) + "";
+ Y = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Sin(m_pL * Math.PI) + "";
+ Z = (N * (1 - e2) + m_pH) * Math.Sin(m_pB * pi_180) + "";
+ }
+ return X + "," + Y + "," + Z;
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "parseGGA error:" + ex.Message);
+ return " , , ";
+ }
+ }
+ private string parseCoord(string coord, string dir)
+ {
+ //$GPGGA,081918.00,3954.7889938,N,11615.5667600,E,1,28,0.68,78.6748,M,-9.7970,M,02,*7D
+ if (coord.Equals(""))
+ return null;
+ int n = 1, sgn = 1;
+ switch (dir)
+ {
+ case "S":
+ sgn = -1; break;
+ case "N":
+ n = 2; break;
+ case "W":
+ sgn = -1; break;
+ case "E":
+ n = 3; break;
+
+ default: break;
+ }
+ return sgn * (Convert.ToDouble(coord.Substring(0, n)) + Convert.ToDouble(coord.Substring(n)) / 60) + "";
+ }
+ private string BLH2XYX(string objectBLH)
+ {
+ // var objectBLH ={l:116.259446,b:39.91314989666667,h:78.6748};//for test
+ // var N = a / Math.sqrt(1 - e2 * Math.sin(objectBLH.b * pi_180) * Math.sin(objectBLH.b * pi_180));
+ // var X = (N + objectBLH.h) * Math.cos(objectBLH.b * pi_180) * Math.cos(objectBLH.l * pi_180);
+ // var Y = (N + objectBLH.h) * Math.cos(objectBLH.b * pi_180) * Math.sin(objectBLH.l * pi_180);
+ // var Z = [N * (1 - e2 ) + objectBLH.h] * Math.sin(objectBLH.b * pi_180);
+ // var objectXYZ = {};
+ // objectXYZ.X = X;
+ // objectXYZ.Y = Y;
+ // objectXYZ.Z = Z;
+ string X = "", Y = "", Z = "";
+ double m_pB = Convert.ToDouble(objectBLH.Split(',')[0]);
+ double m_pL = Convert.ToDouble(objectBLH.Split(',')[1]);
+ double m_pH = Convert.ToDouble(objectBLH.Split(',')[2]);
+ //double N = a / Math.Sqrt(1 - e2 * Math.Sin(m_pB * pi_180) * Math.Sin(m_pB * Math.PI));
+ //X = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Cos(m_pL * Math.PI);
+ //Y = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Sin(m_pL * Math.PI);
+ //Z = [N * (1 - e2) + m_pH] * Math.Sin(m_pB * pi_180);
+
+ return X + "," + Y + "," + Z;
+ }
+
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.resx b/RbFreqStandMeasure/status/StatusCtrlForm.resx
index 1af7de1..99df3f3 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.resx
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.resx
@@ -117,4 +117,10 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 17, 17
+
+
+ 55
+
\ No newline at end of file
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/Resources/dot-green.png b/RbFreqStandMeasure/Resources/dot-green.png
index b507671..3663a1d 100644
--- a/RbFreqStandMeasure/Resources/dot-green.png
+++ b/RbFreqStandMeasure/Resources/dot-green.png
Binary files differ
diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
index 10ae75c..69e3834 100644
--- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
+++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
Binary files differ
diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs
index 1f3294c..024ac67 100644
--- a/RbFreqStandMeasure/home/HomeCtrlForm.cs
+++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs
@@ -58,7 +58,7 @@
lock (obj)
{
label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+ label_receiverStatus.Text = StatusCtrlForm.receiverStatus;
}
}
diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
index 778dbfa..66be073 100644
--- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
@@ -70,8 +70,9 @@
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.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.dataGridView_Data = new System.Windows.Forms.DataGridView();
+ this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
+ this.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -531,29 +532,6 @@
this.radio_1s.UseVisualStyleBackColor = true;
this.radio_1s.CheckedChanged += new System.EventHandler(this.radio_1s_CheckedChanged);
//
- // btn_reDetec
- //
- this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
- this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
- this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- this.btn_reDetec.FlatAppearance.BorderSize = 0;
- this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
- this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
- this.btn_reDetec.Name = "btn_reDetec";
- this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
- this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Radius = 5;
- this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
- this.btn_reDetec.TabIndex = 75;
- this.btn_reDetec.Text = "重新检测";
- this.btn_reDetec.UseVisualStyleBackColor = true;
- this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
- //
// dataGridView_Data
//
this.dataGridView_Data.AllowUserToAddRows = false;
@@ -604,6 +582,53 @@
this.dataGridView_Data.Size = new System.Drawing.Size(433, 426);
this.dataGridView_Data.TabIndex = 3;
//
+ // 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)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.roundButton1.HoverForeColor = System.Drawing.Color.White;
+ this.roundButton1.Location = new System.Drawing.Point(669, 27);
+ 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(120, 30);
+ this.roundButton1.TabIndex = 81;
+ this.roundButton1.Text = "重新检测";
+ this.roundButton1.UseVisualStyleBackColor = true;
+ this.roundButton1.Visible = false;
+ this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click_1);
+ //
+ // btn_reDetec
+ //
+ this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
+ this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ this.btn_reDetec.FlatAppearance.BorderSize = 0;
+ this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
+ this.btn_reDetec.Name = "btn_reDetec";
+ this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
+ this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Radius = 5;
+ this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
+ this.btn_reDetec.TabIndex = 75;
+ this.btn_reDetec.Text = "重新检测";
+ this.btn_reDetec.UseVisualStyleBackColor = true;
+ this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
+ //
// DetailDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -611,6 +636,7 @@
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(898, 587);
this.ControlBox = false;
+ this.Controls.Add(this.roundButton1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
@@ -673,5 +699,6 @@
private System.Windows.Forms.RadioButton radio_1s;
public System.Windows.Forms.DataGridView dataGridView_Data;
public System.Windows.Forms.Label label_reDetecting;
+ private RoundButton roundButton1;
}
}
\ No newline at end of file
diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs
index f52da1a..7b6a643 100644
--- a/RbFreqStandMeasure/info/DetailDlg.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.cs
@@ -506,5 +506,18 @@
if (dataGridView_Data.Rows.Count == 0) btn_reDetec.Enabled = false;
}
}
+
+
+ private void roundButton1_Click_1(object sender, EventArgs e)
+ {
+ List resultAgeRate = new List();
+ foreach (DataGridViewRow row in dataGridView_Data.Rows)
+ {
+ resultAgeRate.Add(row.Cells[2].Value.ToString());
+ }
+ double r = 0.0;
+ double k = FreMath.DriftRate(resultAgeRate, out r);
+ MessageBox.Show("r=" + r + ";" + "k=" + k);
+ }
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
index 854ecc0..16d378a 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
@@ -29,6 +29,7 @@
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.panelLocation = new System.Windows.Forms.Panel();
this.label_z = new System.Windows.Forms.Label();
this.label_y = new System.Windows.Forms.Label();
@@ -62,6 +63,7 @@
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.labelBase = new System.Windows.Forms.Label();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panelLocation.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
@@ -284,6 +286,7 @@
this.panelSite.Name = "panelSite";
this.panelSite.Size = new System.Drawing.Size(610, 610);
this.panelSite.TabIndex = 4;
+ this.panelSite.Paint += new System.Windows.Forms.PaintEventHandler(this.panelSite_Paint);
//
// panel1
//
@@ -457,6 +460,12 @@
this.labelBase.Text = "基本信息";
this.labelBase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
+ // timer1
+ //
+ this.timer1.Enabled = true;
+ this.timer1.Interval = 60000;
+ this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+ //
// StatusCtrlForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -513,5 +522,6 @@
public System.Windows.Forms.Label label_clockStatus;
public System.Windows.Forms.Label label_chnTotal;
public System.Windows.Forms.Label label_usaTotal;
+ private System.Windows.Forms.Timer timer1;
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.cs b/RbFreqStandMeasure/status/StatusCtrlForm.cs
index 93c08dc..44a5302 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.cs
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.cs
@@ -5,7 +5,9 @@
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
+using System.IO.Ports;
using System.Reflection;
+using System.Text;
using System.Threading;
using System.Windows.Forms;
@@ -18,11 +20,29 @@
private readonly object obj = new object();
public static Graphics gp;
private static bool created = false;
+ public static SerialPort portSatellite = new SerialPort();
+ public static string receiverStatus = "";
+ public static string date = "";
+ public static string time = "";
+ public static string mjd = "";
+ public static string lat = "";
+ public static string lng = "";
+ public static string x = "";
+ public static string y = "";
+ public static string z = "";
+ public static List gpList = new List();
+ public static List bdList = new List();
+ public static int totalGP = 0;
+ public static int totalBD = 0;
public StatusCtrlForm()
{
InitializeComponent();
statusCtrlForm = this;
+ this.DoubleBuffered = true;
+ // SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+
+ this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
//label_date.Text = DateTime.Now.ToString("yyyy-MM-dd");
//label_time.Text = DateTime.Now.ToString("HH:mm:ss");
@@ -35,35 +55,38 @@
panelSite.Controls.Add(coo);
coo.Show();
- //new Thread(() =>
- //{
- lock (obj)
- {
+
+
if (!FreshStatus.isStarted)
{
FreshStatus.startClockFresh();
- FreshStatus.startSatelliteFresh();
}
- Thread.Sleep(500);
- label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+
+ new Thread(() =>
+ {
+ Thread.Sleep(500);
+ lock (obj)
+ {
+ label_clockStatus.Text = FreshStatus.clockStatus;
+ label_receiverStatus.Text = receiverStatus;
- label_date.Text = FreshStatus.date;
- label_time.Text = FreshStatus.time;
- label_mjd.Text = FreshStatus.mjd;
- label_lat.Text = FreshStatus.lat;
- label_lng.Text = FreshStatus.lng;
- label_x.Text = FreshStatus.x;
- label_y.Text = FreshStatus.y;
- label_z.Text = FreshStatus.z;
- label_usaTotal.Text = FreshStatus.totalGP+"";
- label_chnTotal.Text = FreshStatus.totalBD+"";
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "界面初始化。。。。。。");
+ label_date.Text = date;
+ label_time.Text = time;
+ label_mjd.Text = mjd;
+ label_lat.Text = lat;
+ label_lng.Text = lng;
+ label_x.Text = x;
+ label_y.Text = y;
+ label_z.Text = z;
+ refreshDraw();
+ //LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "界面初始化。。。。。。");
- draw(FreshStatus.bdList, FreshStatus.gpList);
- }
+ //draw(FreshStatus.bdList, FreshStatus.gpList);
+ }
+ }).Start();
+
- //}).Start();
+
}
@@ -76,15 +99,15 @@
Invoke(new MethodInvoker(delegate ()
{
- Graphics gp = panelSite.CreateGraphics();
- gp.Clear(panelSite.BackColor);
- gp.Dispose();
- //panelSite.Controls.Clear();
- //coo = new Coordinate();
- //panelSite.Controls.Add(coo);
- //coo.Show();
- drawFunc(bdList);
- drawFunc(gpList);
+ //Graphics gp = panelSite.CreateGraphics();
+ //gp.Clear(panelSite.BackColor);
+ //gp.Dispose();
+ panelSite.Controls.Clear();
+ coo = new Coordinate();
+ panelSite.Controls.Add(coo);
+ coo.Show();
+ //drawFunc(bdList);
+ //drawFunc(gpList);
}
));
@@ -97,27 +120,25 @@
}
- private void drawFunc(List gvsList)
+ private void PaintImage(Graphics gp)
{
try
{
Invoke(new MethodInvoker(delegate ()
{
- if (gvsList.Count > 0)
- {
- Graphics gp = panelSite.CreateGraphics();
- gp.SmoothingMode = SmoothingMode.HighQuality;
-
- int gpCount = 0;
+ if (bdList.Count > 0)
+ {
int bdCount = 0;
- foreach (string gsv in gvsList)
+ foreach (string gsv in bdList)
{
string[] arr = gsv.Split(',');
int length = arr.Length;
for (int i = 4; i < arr.Length; i = i + 3)
- {
- if ((i + 3) < arr.Length)
+ {
+ if ((i + 3) < arr.Length && !arr[i + 1].Equals("") && !arr[i + 2].Equals("") && !arr[i + 3].Equals(""))
{
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, arr[i + 1] + ";" + arr[i + 2] + ";" + arr[i + 3]);
+
int Elevation = Convert.ToInt32(arr[i + 1]);
int azimuth = Convert.ToInt32(arr[i + 2]);
double cosLen = Math.Cos(Elevation * Math.PI / 180) * (575 / 2);
@@ -126,19 +147,47 @@
int x = (int)Math.Floor(600 / 2 + xCor);
int y = (int)Math.Floor(610 / 2 - yCor);
- string type = "CHN";
- if (gsv.Contains("GPGSV")) { type = "USA"; gpCount++; }
- else { bdCount++; }
+ string type = "CHN";
gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject(type), x, y);
-
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gvsList.count="+ gvsList.Count+",画了一个" +type + "x="+x+"y="+y);
-
+ bdCount++;
+
}
}
- if(gpCount>0)label_usaTotal.Text = gpCount + "";
- if (bdCount > 0) label_chnTotal.Text = bdCount + "";
+
}
- gp.Dispose();
+ if (bdCount > 0) label_chnTotal.Text = bdCount + "";
+ }
+ if (gpList.Count > 0)
+ {
+ int gpCount = 0;
+ foreach (string gsv in gpList)
+ {
+ string[] arr = gsv.Split(',');
+ int length = arr.Length;
+ for (int i = 4; i < arr.Length; i = i + 3)
+ {
+ if ((i + 3) < arr.Length && !arr[i + 1].Equals("") && !arr[i + 2].Equals("") && !arr[i + 3].Equals(""))
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, arr[i + 1] + ";" + arr[i + 2] + ";" + arr[i + 3]);
+
+ int Elevation = Convert.ToInt32(arr[i + 1]);
+ int azimuth = Convert.ToInt32(arr[i + 2]);
+ double cosLen = Math.Cos(Elevation * Math.PI / 180) * (575 / 2);
+ double xCor = Math.Cos(azimuth * Math.PI / 180) * cosLen;
+ double yCor = Math.Sin(azimuth * Math.PI / 180) * cosLen;
+
+ int x = (int)Math.Floor(600 / 2 + xCor);
+ int y = (int)Math.Floor(610 / 2 - yCor);
+ string type = "USA";
+
+ gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject(type), x, y);
+ gpCount++;
+
+ }
+ }
+
+ }
+ if (gpCount > 0) label_usaTotal.Text = gpCount + "";
}
}
));
@@ -151,5 +200,352 @@
}
}
+ private void panelSite_Paint(object sender, PaintEventArgs e)
+ {
+ try
+ {
+ if ( bdList.Count > 0 ||gpList.Count > 0)
+ {
+
+ Invoke(new MethodInvoker(delegate ()
+ {
+ Rectangle rect = e.ClipRectangle;
+ BufferedGraphicsContext currentContext = BufferedGraphicsManager.Current;
+ BufferedGraphics myBuffer = currentContext.Allocate(e.Graphics, e.ClipRectangle);
+ Graphics g = myBuffer.Graphics;
+ g.SmoothingMode = SmoothingMode.HighQuality;
+ g.PixelOffsetMode = PixelOffsetMode.HighSpeed;
+ g.Clear(panelSite.BackColor);
+ PaintImage(g);
+
+ myBuffer.Render(e.Graphics);
+ g.Dispose();
+ myBuffer.Dispose();//释放资源
+ }
+ ));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "error error:" + ex.Message);
+ }
+ }
+
+ private void timer1_Tick(object sender, EventArgs e)
+ {
+ refreshDraw();
+ }
+
+ private void refreshDraw()
+ {
+ try
+ {
+ if (!portSatellite.IsOpen)
+ {
+ string portName = ConfigHelper.GetAppConfig("satellite").Split(' ')[0];
+ int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").Split(' ')[1]);
+ portSatellite.PortName = portName;
+ portSatellite.BaudRate = bandRate;
+ portSatellite.Parity = Parity.None;
+ portSatellite.DataBits = 8;
+ portSatellite.StopBits = StopBits.One;
+ portSatellite.Handshake = Handshake.None;
+ portSatellite.ReadTimeout = -1;
+ portSatellite.WriteTimeout = 3000;
+
+ // 打开串口
+ if (!portSatellite.IsOpen) portSatellite.Open();
+ if (portSatellite.IsOpen)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口成功!" + portName);
+ }
+ else
+ {
+ MessageBox.Show("无法打开串口" + portName + ",卫星状态更新失败!");
+ return;
+ }
+ }
+
+ int bdMessCount = 0;
+ int gpMessCount = 0;
+ int count = 0;
+ while (count < 1000)
+ {
+ Thread.Sleep(100);
+ int Readlen = portSatellite.BytesToRead;
+
+ if (Readlen > 0)
+ {
+ byte[] buffer = new byte[Readlen];
+ portSatellite.Read(buffer, 0, Readlen);// 接收数据到buffer里面
+ string data = Encoding.ASCII.GetString(buffer);
+
+ string[] dataArray = data.Split('$');
+ if (dataArray.Length > 0)
+ {
+ lock (obj)
+ {
+ gpList.Clear();
+ bdList.Clear();
+ totalGP = 0;
+ totalBD = 0;
+ }
+ int index = -1;
+ bool drawed = false;
+ bool gga = false;
+ bool rmc = false;
+ foreach (string sss in dataArray)
+ {
+ index++;
+
+ if ((sss.Contains("GPGGA") || sss.Contains("GNGGA")) && sss.Contains("*"))
+ {
+ string[] resultArray = sss.Split(',');
+ if (resultArray.Length > 5)
+ {
+ gga = true;
+ try
+ {
+ lat = resultArray[2].Replace(".", "").Insert(2, ".") + resultArray[3];
+ lng = resultArray[4].Replace(".", "").Insert(3, ".") + resultArray[5];
+ x = parseGGA(sss).Split(',')[0];
+ y = parseGGA(sss).Split(',')[1];
+ z = parseGGA(sss).Split(',')[2];
+
+ lock (obj)
+ {
+ statusCtrlForm.label_lat.Text = lat;
+ statusCtrlForm.label_lng.Text = lng;
+ statusCtrlForm.label_x.Text = x;
+ statusCtrlForm.label_y.Text = y;
+ statusCtrlForm.label_z.Text = z;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "GGA error:" + ex.Message);
+ }
+ }
+ }
+ else if (sss.Contains("GNRMC") && sss.Contains("*"))
+ {
+ string[] resultArray = sss.Split(',');
+ if (resultArray.Length > 9)
+ {
+ rmc = true;
+ date = resultArray[9];
+ mjd = "";
+ if (date.Length > 5)
+ {
+ mjd = getMJD("20" + date.Substring(4, 2), date.Substring(2, 2), date.Substring(0, 2));
+ date = "20" + date.Substring(4, 2) + "-" + date.Substring(2, 2) + "-" + date.Substring(0, 2);
+
+ }
+ time = resultArray[1];
+ if (time.Length > 5)
+ {
+ int hour = Convert.ToInt32(time.Substring(0, 2));
+ if ((hour + 8) > 23) hour = hour + 8 - 24;
+ else hour = hour + 8;
+
+ time = hour + ":" + time.Substring(2, 2) + ":" + time.Substring(4);
+
+ }
+
+ if (resultArray[2] == "A") receiverStatus = "定位有效";
+ else if (resultArray[2] == "V") receiverStatus = "警告";
+
+
+ try
+ {
+ lock (obj)
+ {
+ statusCtrlForm.label_date.Text = date;
+ statusCtrlForm.label_time.Text = time;
+ statusCtrlForm.label_mjd.Text = mjd;
+ statusCtrlForm.label_receiverStatus.Text = receiverStatus;
+ HomeCtrlForm.homeCtrlForm.label_receiverStatus.Text = receiverStatus;
+ }
+
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "RMC error:" + ex.Message);
+ }
+
+ }
+
+ }
+ else if ((sss.Contains("GPGSV") || sss.Contains("BDGSV") || sss.Contains("GBGSV")) && sss.Contains("*"))
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "GSV : " + sss);
+ if (sss.Split(',').Length > 8)
+ {
+ if (sss.Contains("GPGSV"))
+ {
+ gpMessCount = Convert.ToInt32(sss.Split(',')[1]);
+ if (gpList.Count < gpMessCount)
+ {
+ gpList.Add(sss);
+ totalGP = Convert.ToInt32(sss.Split(',')[3]);
+ }
+ }
+ else
+ {
+ bdMessCount = Convert.ToInt32(sss.Split(',')[1]);
+ if (bdList.Count < bdMessCount)
+ {
+ bdList.Add(sss);
+ totalBD = Convert.ToInt32(sss.Split(',')[3]);
+ }
+ }
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gpList : " + gpList.Count + ",gp共有 :" + +gpMessCount);
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "bdList : " + bdList.Count + ",bd共有 : " + bdMessCount);
+
+ if ((gpList.Count > 0 && gpList.Count == gpMessCount) && (bdList.Count > 0) && bdList.Count == bdMessCount)
+ {
+ if (!drawed)
+ {
+ drawed = true;
+ try
+ {
+ lock (obj)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "更新更新更新更新更新画:::: : ");
+
+ panelSite.Refresh();
+ }
+
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "draw gsv error:" + ex.Message);
+ }
+ }
+ }
+ }
+
+ }
+ if (drawed && gga && rmc)
+ {
+ break;
+ }
+
+ }
+ break;
+ }
+ }
+ count++;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "exeSatellite error:" + ex.Message);
+ }
+ }
+
+ private static string getMJD(string ys, string ms, string ds)
+ {
+ try
+ {
+ int y = Convert.ToInt32(ys) - 1900;
+ int m = Convert.ToInt32(ms);
+ int d = Convert.ToInt32(ds);
+ int L = 0;
+ if (m == 1 || m == 2) L = 1;
+ int njdINT = 14956 + d + (int)((y - L) * 365.25) + (int)((m + 1 + L * 12) * 30.6001);
+ return njdINT + "";
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "getMJD error:" + ex.Message);
+ return "";
+ }
+ }
+
+ private string parseGGA(string ggaStr)
+ {
+ try
+ {
+ double f = 1 / 298.257223563; /*基准椭球体的极扁率*/
+ double a = 6378137.0; /*基准椭球体的长半径*/
+ double b = 6356752.314; /*基准椭球体的短半径*/
+ double e2 = f * (2 - f); /*基准椭球体的偏心率*/
+ double pi_180 = Math.PI / 180;
+ //$GPGGA,081918.00,3954.7889938,N,11615.5667600,E,1,28,0.68,78.6748,M,-9.7970,M,02,*7D
+ var arr = ggaStr.Split(',');
+
+ string m_pBs = parseCoord(arr[2], arr[3]);
+ string m_pLs = parseCoord(arr[4], arr[5]);
+ string m_pHs = "";
+ if (!arr[9].Equals("") && !arr[11].Equals("")) m_pHs = Convert.ToDouble(arr[9]) + Convert.ToDouble(arr[11]) + "";// add 大地水准面高度 纠正误差
+ // objBLH.b = util.parseCoord(arr[2],arr[3]);
+ // objBLH.l = util.parseCoord(arr[4],arr[5]);
+
+ // objBLH.h = parseFloat(arr[9]);
+ string X = "", Y = "", Z = "";
+ if (!m_pBs.Equals("") && !m_pLs.Equals("") && !m_pHs.Equals(""))
+ {
+ double m_pB = Convert.ToDouble(m_pBs);
+ double m_pL = Convert.ToDouble(m_pLs);
+ double m_pH = Convert.ToDouble(m_pHs);
+ double N = a / Math.Sqrt(1 - e2 * Math.Sin(m_pB * pi_180) * Math.Sin(m_pB * Math.PI));
+ X = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Cos(m_pL * Math.PI) + "";
+ Y = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Sin(m_pL * Math.PI) + "";
+ Z = (N * (1 - e2) + m_pH) * Math.Sin(m_pB * pi_180) + "";
+ }
+ return X + "," + Y + "," + Z;
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "parseGGA error:" + ex.Message);
+ return " , , ";
+ }
+ }
+ private string parseCoord(string coord, string dir)
+ {
+ //$GPGGA,081918.00,3954.7889938,N,11615.5667600,E,1,28,0.68,78.6748,M,-9.7970,M,02,*7D
+ if (coord.Equals(""))
+ return null;
+ int n = 1, sgn = 1;
+ switch (dir)
+ {
+ case "S":
+ sgn = -1; break;
+ case "N":
+ n = 2; break;
+ case "W":
+ sgn = -1; break;
+ case "E":
+ n = 3; break;
+
+ default: break;
+ }
+ return sgn * (Convert.ToDouble(coord.Substring(0, n)) + Convert.ToDouble(coord.Substring(n)) / 60) + "";
+ }
+ private string BLH2XYX(string objectBLH)
+ {
+ // var objectBLH ={l:116.259446,b:39.91314989666667,h:78.6748};//for test
+ // var N = a / Math.sqrt(1 - e2 * Math.sin(objectBLH.b * pi_180) * Math.sin(objectBLH.b * pi_180));
+ // var X = (N + objectBLH.h) * Math.cos(objectBLH.b * pi_180) * Math.cos(objectBLH.l * pi_180);
+ // var Y = (N + objectBLH.h) * Math.cos(objectBLH.b * pi_180) * Math.sin(objectBLH.l * pi_180);
+ // var Z = [N * (1 - e2 ) + objectBLH.h] * Math.sin(objectBLH.b * pi_180);
+ // var objectXYZ = {};
+ // objectXYZ.X = X;
+ // objectXYZ.Y = Y;
+ // objectXYZ.Z = Z;
+ string X = "", Y = "", Z = "";
+ double m_pB = Convert.ToDouble(objectBLH.Split(',')[0]);
+ double m_pL = Convert.ToDouble(objectBLH.Split(',')[1]);
+ double m_pH = Convert.ToDouble(objectBLH.Split(',')[2]);
+ //double N = a / Math.Sqrt(1 - e2 * Math.Sin(m_pB * pi_180) * Math.Sin(m_pB * Math.PI));
+ //X = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Cos(m_pL * Math.PI);
+ //Y = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Sin(m_pL * Math.PI);
+ //Z = [N * (1 - e2) + m_pH] * Math.Sin(m_pB * pi_180);
+
+ return X + "," + Y + "," + Z;
+ }
+
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.resx b/RbFreqStandMeasure/status/StatusCtrlForm.resx
index 1af7de1..99df3f3 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.resx
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.resx
@@ -117,4 +117,10 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 17, 17
+
+
+ 55
+
\ No newline at end of file
diff --git a/RbFreqStandMeasure/tools/ConfigHelper.cs b/RbFreqStandMeasure/tools/ConfigHelper.cs
index 3f425c2..36306fc 100644
--- a/RbFreqStandMeasure/tools/ConfigHelper.cs
+++ b/RbFreqStandMeasure/tools/ConfigHelper.cs
@@ -27,8 +27,6 @@
{
try
{
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "777:" + value);
-
string file = System.Windows.Forms.Application.ExecutablePath;
Configuration config = ConfigurationManager.OpenExeConfiguration(file);
foreach (string key in config.AppSettings.Settings.AllKeys)
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/Resources/dot-green.png b/RbFreqStandMeasure/Resources/dot-green.png
index b507671..3663a1d 100644
--- a/RbFreqStandMeasure/Resources/dot-green.png
+++ b/RbFreqStandMeasure/Resources/dot-green.png
Binary files differ
diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
index 10ae75c..69e3834 100644
--- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
+++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
Binary files differ
diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs
index 1f3294c..024ac67 100644
--- a/RbFreqStandMeasure/home/HomeCtrlForm.cs
+++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs
@@ -58,7 +58,7 @@
lock (obj)
{
label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+ label_receiverStatus.Text = StatusCtrlForm.receiverStatus;
}
}
diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
index 778dbfa..66be073 100644
--- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
@@ -70,8 +70,9 @@
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.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.dataGridView_Data = new System.Windows.Forms.DataGridView();
+ this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
+ this.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -531,29 +532,6 @@
this.radio_1s.UseVisualStyleBackColor = true;
this.radio_1s.CheckedChanged += new System.EventHandler(this.radio_1s_CheckedChanged);
//
- // btn_reDetec
- //
- this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
- this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
- this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- this.btn_reDetec.FlatAppearance.BorderSize = 0;
- this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
- this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
- this.btn_reDetec.Name = "btn_reDetec";
- this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
- this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Radius = 5;
- this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
- this.btn_reDetec.TabIndex = 75;
- this.btn_reDetec.Text = "重新检测";
- this.btn_reDetec.UseVisualStyleBackColor = true;
- this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
- //
// dataGridView_Data
//
this.dataGridView_Data.AllowUserToAddRows = false;
@@ -604,6 +582,53 @@
this.dataGridView_Data.Size = new System.Drawing.Size(433, 426);
this.dataGridView_Data.TabIndex = 3;
//
+ // 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)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.roundButton1.HoverForeColor = System.Drawing.Color.White;
+ this.roundButton1.Location = new System.Drawing.Point(669, 27);
+ 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(120, 30);
+ this.roundButton1.TabIndex = 81;
+ this.roundButton1.Text = "重新检测";
+ this.roundButton1.UseVisualStyleBackColor = true;
+ this.roundButton1.Visible = false;
+ this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click_1);
+ //
+ // btn_reDetec
+ //
+ this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
+ this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ this.btn_reDetec.FlatAppearance.BorderSize = 0;
+ this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
+ this.btn_reDetec.Name = "btn_reDetec";
+ this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
+ this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Radius = 5;
+ this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
+ this.btn_reDetec.TabIndex = 75;
+ this.btn_reDetec.Text = "重新检测";
+ this.btn_reDetec.UseVisualStyleBackColor = true;
+ this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
+ //
// DetailDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -611,6 +636,7 @@
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(898, 587);
this.ControlBox = false;
+ this.Controls.Add(this.roundButton1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
@@ -673,5 +699,6 @@
private System.Windows.Forms.RadioButton radio_1s;
public System.Windows.Forms.DataGridView dataGridView_Data;
public System.Windows.Forms.Label label_reDetecting;
+ private RoundButton roundButton1;
}
}
\ No newline at end of file
diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs
index f52da1a..7b6a643 100644
--- a/RbFreqStandMeasure/info/DetailDlg.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.cs
@@ -506,5 +506,18 @@
if (dataGridView_Data.Rows.Count == 0) btn_reDetec.Enabled = false;
}
}
+
+
+ private void roundButton1_Click_1(object sender, EventArgs e)
+ {
+ List resultAgeRate = new List();
+ foreach (DataGridViewRow row in dataGridView_Data.Rows)
+ {
+ resultAgeRate.Add(row.Cells[2].Value.ToString());
+ }
+ double r = 0.0;
+ double k = FreMath.DriftRate(resultAgeRate, out r);
+ MessageBox.Show("r=" + r + ";" + "k=" + k);
+ }
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
index 854ecc0..16d378a 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
@@ -29,6 +29,7 @@
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.panelLocation = new System.Windows.Forms.Panel();
this.label_z = new System.Windows.Forms.Label();
this.label_y = new System.Windows.Forms.Label();
@@ -62,6 +63,7 @@
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.labelBase = new System.Windows.Forms.Label();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panelLocation.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
@@ -284,6 +286,7 @@
this.panelSite.Name = "panelSite";
this.panelSite.Size = new System.Drawing.Size(610, 610);
this.panelSite.TabIndex = 4;
+ this.panelSite.Paint += new System.Windows.Forms.PaintEventHandler(this.panelSite_Paint);
//
// panel1
//
@@ -457,6 +460,12 @@
this.labelBase.Text = "基本信息";
this.labelBase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
+ // timer1
+ //
+ this.timer1.Enabled = true;
+ this.timer1.Interval = 60000;
+ this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+ //
// StatusCtrlForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -513,5 +522,6 @@
public System.Windows.Forms.Label label_clockStatus;
public System.Windows.Forms.Label label_chnTotal;
public System.Windows.Forms.Label label_usaTotal;
+ private System.Windows.Forms.Timer timer1;
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.cs b/RbFreqStandMeasure/status/StatusCtrlForm.cs
index 93c08dc..44a5302 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.cs
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.cs
@@ -5,7 +5,9 @@
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
+using System.IO.Ports;
using System.Reflection;
+using System.Text;
using System.Threading;
using System.Windows.Forms;
@@ -18,11 +20,29 @@
private readonly object obj = new object();
public static Graphics gp;
private static bool created = false;
+ public static SerialPort portSatellite = new SerialPort();
+ public static string receiverStatus = "";
+ public static string date = "";
+ public static string time = "";
+ public static string mjd = "";
+ public static string lat = "";
+ public static string lng = "";
+ public static string x = "";
+ public static string y = "";
+ public static string z = "";
+ public static List gpList = new List();
+ public static List bdList = new List();
+ public static int totalGP = 0;
+ public static int totalBD = 0;
public StatusCtrlForm()
{
InitializeComponent();
statusCtrlForm = this;
+ this.DoubleBuffered = true;
+ // SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+
+ this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
//label_date.Text = DateTime.Now.ToString("yyyy-MM-dd");
//label_time.Text = DateTime.Now.ToString("HH:mm:ss");
@@ -35,35 +55,38 @@
panelSite.Controls.Add(coo);
coo.Show();
- //new Thread(() =>
- //{
- lock (obj)
- {
+
+
if (!FreshStatus.isStarted)
{
FreshStatus.startClockFresh();
- FreshStatus.startSatelliteFresh();
}
- Thread.Sleep(500);
- label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+
+ new Thread(() =>
+ {
+ Thread.Sleep(500);
+ lock (obj)
+ {
+ label_clockStatus.Text = FreshStatus.clockStatus;
+ label_receiverStatus.Text = receiverStatus;
- label_date.Text = FreshStatus.date;
- label_time.Text = FreshStatus.time;
- label_mjd.Text = FreshStatus.mjd;
- label_lat.Text = FreshStatus.lat;
- label_lng.Text = FreshStatus.lng;
- label_x.Text = FreshStatus.x;
- label_y.Text = FreshStatus.y;
- label_z.Text = FreshStatus.z;
- label_usaTotal.Text = FreshStatus.totalGP+"";
- label_chnTotal.Text = FreshStatus.totalBD+"";
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "界面初始化。。。。。。");
+ label_date.Text = date;
+ label_time.Text = time;
+ label_mjd.Text = mjd;
+ label_lat.Text = lat;
+ label_lng.Text = lng;
+ label_x.Text = x;
+ label_y.Text = y;
+ label_z.Text = z;
+ refreshDraw();
+ //LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "界面初始化。。。。。。");
- draw(FreshStatus.bdList, FreshStatus.gpList);
- }
+ //draw(FreshStatus.bdList, FreshStatus.gpList);
+ }
+ }).Start();
+
- //}).Start();
+
}
@@ -76,15 +99,15 @@
Invoke(new MethodInvoker(delegate ()
{
- Graphics gp = panelSite.CreateGraphics();
- gp.Clear(panelSite.BackColor);
- gp.Dispose();
- //panelSite.Controls.Clear();
- //coo = new Coordinate();
- //panelSite.Controls.Add(coo);
- //coo.Show();
- drawFunc(bdList);
- drawFunc(gpList);
+ //Graphics gp = panelSite.CreateGraphics();
+ //gp.Clear(panelSite.BackColor);
+ //gp.Dispose();
+ panelSite.Controls.Clear();
+ coo = new Coordinate();
+ panelSite.Controls.Add(coo);
+ coo.Show();
+ //drawFunc(bdList);
+ //drawFunc(gpList);
}
));
@@ -97,27 +120,25 @@
}
- private void drawFunc(List gvsList)
+ private void PaintImage(Graphics gp)
{
try
{
Invoke(new MethodInvoker(delegate ()
{
- if (gvsList.Count > 0)
- {
- Graphics gp = panelSite.CreateGraphics();
- gp.SmoothingMode = SmoothingMode.HighQuality;
-
- int gpCount = 0;
+ if (bdList.Count > 0)
+ {
int bdCount = 0;
- foreach (string gsv in gvsList)
+ foreach (string gsv in bdList)
{
string[] arr = gsv.Split(',');
int length = arr.Length;
for (int i = 4; i < arr.Length; i = i + 3)
- {
- if ((i + 3) < arr.Length)
+ {
+ if ((i + 3) < arr.Length && !arr[i + 1].Equals("") && !arr[i + 2].Equals("") && !arr[i + 3].Equals(""))
{
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, arr[i + 1] + ";" + arr[i + 2] + ";" + arr[i + 3]);
+
int Elevation = Convert.ToInt32(arr[i + 1]);
int azimuth = Convert.ToInt32(arr[i + 2]);
double cosLen = Math.Cos(Elevation * Math.PI / 180) * (575 / 2);
@@ -126,19 +147,47 @@
int x = (int)Math.Floor(600 / 2 + xCor);
int y = (int)Math.Floor(610 / 2 - yCor);
- string type = "CHN";
- if (gsv.Contains("GPGSV")) { type = "USA"; gpCount++; }
- else { bdCount++; }
+ string type = "CHN";
gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject(type), x, y);
-
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gvsList.count="+ gvsList.Count+",画了一个" +type + "x="+x+"y="+y);
-
+ bdCount++;
+
}
}
- if(gpCount>0)label_usaTotal.Text = gpCount + "";
- if (bdCount > 0) label_chnTotal.Text = bdCount + "";
+
}
- gp.Dispose();
+ if (bdCount > 0) label_chnTotal.Text = bdCount + "";
+ }
+ if (gpList.Count > 0)
+ {
+ int gpCount = 0;
+ foreach (string gsv in gpList)
+ {
+ string[] arr = gsv.Split(',');
+ int length = arr.Length;
+ for (int i = 4; i < arr.Length; i = i + 3)
+ {
+ if ((i + 3) < arr.Length && !arr[i + 1].Equals("") && !arr[i + 2].Equals("") && !arr[i + 3].Equals(""))
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, arr[i + 1] + ";" + arr[i + 2] + ";" + arr[i + 3]);
+
+ int Elevation = Convert.ToInt32(arr[i + 1]);
+ int azimuth = Convert.ToInt32(arr[i + 2]);
+ double cosLen = Math.Cos(Elevation * Math.PI / 180) * (575 / 2);
+ double xCor = Math.Cos(azimuth * Math.PI / 180) * cosLen;
+ double yCor = Math.Sin(azimuth * Math.PI / 180) * cosLen;
+
+ int x = (int)Math.Floor(600 / 2 + xCor);
+ int y = (int)Math.Floor(610 / 2 - yCor);
+ string type = "USA";
+
+ gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject(type), x, y);
+ gpCount++;
+
+ }
+ }
+
+ }
+ if (gpCount > 0) label_usaTotal.Text = gpCount + "";
}
}
));
@@ -151,5 +200,352 @@
}
}
+ private void panelSite_Paint(object sender, PaintEventArgs e)
+ {
+ try
+ {
+ if ( bdList.Count > 0 ||gpList.Count > 0)
+ {
+
+ Invoke(new MethodInvoker(delegate ()
+ {
+ Rectangle rect = e.ClipRectangle;
+ BufferedGraphicsContext currentContext = BufferedGraphicsManager.Current;
+ BufferedGraphics myBuffer = currentContext.Allocate(e.Graphics, e.ClipRectangle);
+ Graphics g = myBuffer.Graphics;
+ g.SmoothingMode = SmoothingMode.HighQuality;
+ g.PixelOffsetMode = PixelOffsetMode.HighSpeed;
+ g.Clear(panelSite.BackColor);
+ PaintImage(g);
+
+ myBuffer.Render(e.Graphics);
+ g.Dispose();
+ myBuffer.Dispose();//释放资源
+ }
+ ));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "error error:" + ex.Message);
+ }
+ }
+
+ private void timer1_Tick(object sender, EventArgs e)
+ {
+ refreshDraw();
+ }
+
+ private void refreshDraw()
+ {
+ try
+ {
+ if (!portSatellite.IsOpen)
+ {
+ string portName = ConfigHelper.GetAppConfig("satellite").Split(' ')[0];
+ int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").Split(' ')[1]);
+ portSatellite.PortName = portName;
+ portSatellite.BaudRate = bandRate;
+ portSatellite.Parity = Parity.None;
+ portSatellite.DataBits = 8;
+ portSatellite.StopBits = StopBits.One;
+ portSatellite.Handshake = Handshake.None;
+ portSatellite.ReadTimeout = -1;
+ portSatellite.WriteTimeout = 3000;
+
+ // 打开串口
+ if (!portSatellite.IsOpen) portSatellite.Open();
+ if (portSatellite.IsOpen)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口成功!" + portName);
+ }
+ else
+ {
+ MessageBox.Show("无法打开串口" + portName + ",卫星状态更新失败!");
+ return;
+ }
+ }
+
+ int bdMessCount = 0;
+ int gpMessCount = 0;
+ int count = 0;
+ while (count < 1000)
+ {
+ Thread.Sleep(100);
+ int Readlen = portSatellite.BytesToRead;
+
+ if (Readlen > 0)
+ {
+ byte[] buffer = new byte[Readlen];
+ portSatellite.Read(buffer, 0, Readlen);// 接收数据到buffer里面
+ string data = Encoding.ASCII.GetString(buffer);
+
+ string[] dataArray = data.Split('$');
+ if (dataArray.Length > 0)
+ {
+ lock (obj)
+ {
+ gpList.Clear();
+ bdList.Clear();
+ totalGP = 0;
+ totalBD = 0;
+ }
+ int index = -1;
+ bool drawed = false;
+ bool gga = false;
+ bool rmc = false;
+ foreach (string sss in dataArray)
+ {
+ index++;
+
+ if ((sss.Contains("GPGGA") || sss.Contains("GNGGA")) && sss.Contains("*"))
+ {
+ string[] resultArray = sss.Split(',');
+ if (resultArray.Length > 5)
+ {
+ gga = true;
+ try
+ {
+ lat = resultArray[2].Replace(".", "").Insert(2, ".") + resultArray[3];
+ lng = resultArray[4].Replace(".", "").Insert(3, ".") + resultArray[5];
+ x = parseGGA(sss).Split(',')[0];
+ y = parseGGA(sss).Split(',')[1];
+ z = parseGGA(sss).Split(',')[2];
+
+ lock (obj)
+ {
+ statusCtrlForm.label_lat.Text = lat;
+ statusCtrlForm.label_lng.Text = lng;
+ statusCtrlForm.label_x.Text = x;
+ statusCtrlForm.label_y.Text = y;
+ statusCtrlForm.label_z.Text = z;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "GGA error:" + ex.Message);
+ }
+ }
+ }
+ else if (sss.Contains("GNRMC") && sss.Contains("*"))
+ {
+ string[] resultArray = sss.Split(',');
+ if (resultArray.Length > 9)
+ {
+ rmc = true;
+ date = resultArray[9];
+ mjd = "";
+ if (date.Length > 5)
+ {
+ mjd = getMJD("20" + date.Substring(4, 2), date.Substring(2, 2), date.Substring(0, 2));
+ date = "20" + date.Substring(4, 2) + "-" + date.Substring(2, 2) + "-" + date.Substring(0, 2);
+
+ }
+ time = resultArray[1];
+ if (time.Length > 5)
+ {
+ int hour = Convert.ToInt32(time.Substring(0, 2));
+ if ((hour + 8) > 23) hour = hour + 8 - 24;
+ else hour = hour + 8;
+
+ time = hour + ":" + time.Substring(2, 2) + ":" + time.Substring(4);
+
+ }
+
+ if (resultArray[2] == "A") receiverStatus = "定位有效";
+ else if (resultArray[2] == "V") receiverStatus = "警告";
+
+
+ try
+ {
+ lock (obj)
+ {
+ statusCtrlForm.label_date.Text = date;
+ statusCtrlForm.label_time.Text = time;
+ statusCtrlForm.label_mjd.Text = mjd;
+ statusCtrlForm.label_receiverStatus.Text = receiverStatus;
+ HomeCtrlForm.homeCtrlForm.label_receiverStatus.Text = receiverStatus;
+ }
+
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "RMC error:" + ex.Message);
+ }
+
+ }
+
+ }
+ else if ((sss.Contains("GPGSV") || sss.Contains("BDGSV") || sss.Contains("GBGSV")) && sss.Contains("*"))
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "GSV : " + sss);
+ if (sss.Split(',').Length > 8)
+ {
+ if (sss.Contains("GPGSV"))
+ {
+ gpMessCount = Convert.ToInt32(sss.Split(',')[1]);
+ if (gpList.Count < gpMessCount)
+ {
+ gpList.Add(sss);
+ totalGP = Convert.ToInt32(sss.Split(',')[3]);
+ }
+ }
+ else
+ {
+ bdMessCount = Convert.ToInt32(sss.Split(',')[1]);
+ if (bdList.Count < bdMessCount)
+ {
+ bdList.Add(sss);
+ totalBD = Convert.ToInt32(sss.Split(',')[3]);
+ }
+ }
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gpList : " + gpList.Count + ",gp共有 :" + +gpMessCount);
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "bdList : " + bdList.Count + ",bd共有 : " + bdMessCount);
+
+ if ((gpList.Count > 0 && gpList.Count == gpMessCount) && (bdList.Count > 0) && bdList.Count == bdMessCount)
+ {
+ if (!drawed)
+ {
+ drawed = true;
+ try
+ {
+ lock (obj)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "更新更新更新更新更新画:::: : ");
+
+ panelSite.Refresh();
+ }
+
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "draw gsv error:" + ex.Message);
+ }
+ }
+ }
+ }
+
+ }
+ if (drawed && gga && rmc)
+ {
+ break;
+ }
+
+ }
+ break;
+ }
+ }
+ count++;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "exeSatellite error:" + ex.Message);
+ }
+ }
+
+ private static string getMJD(string ys, string ms, string ds)
+ {
+ try
+ {
+ int y = Convert.ToInt32(ys) - 1900;
+ int m = Convert.ToInt32(ms);
+ int d = Convert.ToInt32(ds);
+ int L = 0;
+ if (m == 1 || m == 2) L = 1;
+ int njdINT = 14956 + d + (int)((y - L) * 365.25) + (int)((m + 1 + L * 12) * 30.6001);
+ return njdINT + "";
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "getMJD error:" + ex.Message);
+ return "";
+ }
+ }
+
+ private string parseGGA(string ggaStr)
+ {
+ try
+ {
+ double f = 1 / 298.257223563; /*基准椭球体的极扁率*/
+ double a = 6378137.0; /*基准椭球体的长半径*/
+ double b = 6356752.314; /*基准椭球体的短半径*/
+ double e2 = f * (2 - f); /*基准椭球体的偏心率*/
+ double pi_180 = Math.PI / 180;
+ //$GPGGA,081918.00,3954.7889938,N,11615.5667600,E,1,28,0.68,78.6748,M,-9.7970,M,02,*7D
+ var arr = ggaStr.Split(',');
+
+ string m_pBs = parseCoord(arr[2], arr[3]);
+ string m_pLs = parseCoord(arr[4], arr[5]);
+ string m_pHs = "";
+ if (!arr[9].Equals("") && !arr[11].Equals("")) m_pHs = Convert.ToDouble(arr[9]) + Convert.ToDouble(arr[11]) + "";// add 大地水准面高度 纠正误差
+ // objBLH.b = util.parseCoord(arr[2],arr[3]);
+ // objBLH.l = util.parseCoord(arr[4],arr[5]);
+
+ // objBLH.h = parseFloat(arr[9]);
+ string X = "", Y = "", Z = "";
+ if (!m_pBs.Equals("") && !m_pLs.Equals("") && !m_pHs.Equals(""))
+ {
+ double m_pB = Convert.ToDouble(m_pBs);
+ double m_pL = Convert.ToDouble(m_pLs);
+ double m_pH = Convert.ToDouble(m_pHs);
+ double N = a / Math.Sqrt(1 - e2 * Math.Sin(m_pB * pi_180) * Math.Sin(m_pB * Math.PI));
+ X = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Cos(m_pL * Math.PI) + "";
+ Y = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Sin(m_pL * Math.PI) + "";
+ Z = (N * (1 - e2) + m_pH) * Math.Sin(m_pB * pi_180) + "";
+ }
+ return X + "," + Y + "," + Z;
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "parseGGA error:" + ex.Message);
+ return " , , ";
+ }
+ }
+ private string parseCoord(string coord, string dir)
+ {
+ //$GPGGA,081918.00,3954.7889938,N,11615.5667600,E,1,28,0.68,78.6748,M,-9.7970,M,02,*7D
+ if (coord.Equals(""))
+ return null;
+ int n = 1, sgn = 1;
+ switch (dir)
+ {
+ case "S":
+ sgn = -1; break;
+ case "N":
+ n = 2; break;
+ case "W":
+ sgn = -1; break;
+ case "E":
+ n = 3; break;
+
+ default: break;
+ }
+ return sgn * (Convert.ToDouble(coord.Substring(0, n)) + Convert.ToDouble(coord.Substring(n)) / 60) + "";
+ }
+ private string BLH2XYX(string objectBLH)
+ {
+ // var objectBLH ={l:116.259446,b:39.91314989666667,h:78.6748};//for test
+ // var N = a / Math.sqrt(1 - e2 * Math.sin(objectBLH.b * pi_180) * Math.sin(objectBLH.b * pi_180));
+ // var X = (N + objectBLH.h) * Math.cos(objectBLH.b * pi_180) * Math.cos(objectBLH.l * pi_180);
+ // var Y = (N + objectBLH.h) * Math.cos(objectBLH.b * pi_180) * Math.sin(objectBLH.l * pi_180);
+ // var Z = [N * (1 - e2 ) + objectBLH.h] * Math.sin(objectBLH.b * pi_180);
+ // var objectXYZ = {};
+ // objectXYZ.X = X;
+ // objectXYZ.Y = Y;
+ // objectXYZ.Z = Z;
+ string X = "", Y = "", Z = "";
+ double m_pB = Convert.ToDouble(objectBLH.Split(',')[0]);
+ double m_pL = Convert.ToDouble(objectBLH.Split(',')[1]);
+ double m_pH = Convert.ToDouble(objectBLH.Split(',')[2]);
+ //double N = a / Math.Sqrt(1 - e2 * Math.Sin(m_pB * pi_180) * Math.Sin(m_pB * Math.PI));
+ //X = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Cos(m_pL * Math.PI);
+ //Y = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Sin(m_pL * Math.PI);
+ //Z = [N * (1 - e2) + m_pH] * Math.Sin(m_pB * pi_180);
+
+ return X + "," + Y + "," + Z;
+ }
+
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.resx b/RbFreqStandMeasure/status/StatusCtrlForm.resx
index 1af7de1..99df3f3 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.resx
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.resx
@@ -117,4 +117,10 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 17, 17
+
+
+ 55
+
\ No newline at end of file
diff --git a/RbFreqStandMeasure/tools/ConfigHelper.cs b/RbFreqStandMeasure/tools/ConfigHelper.cs
index 3f425c2..36306fc 100644
--- a/RbFreqStandMeasure/tools/ConfigHelper.cs
+++ b/RbFreqStandMeasure/tools/ConfigHelper.cs
@@ -27,8 +27,6 @@
{
try
{
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "777:" + value);
-
string file = System.Windows.Forms.Application.ExecutablePath;
Configuration config = ConfigurationManager.OpenExeConfiguration(file);
foreach (string key in config.AppSettings.Settings.AllKeys)
diff --git a/RbFreqStandMeasure/tools/DetectionHelper.cs b/RbFreqStandMeasure/tools/DetectionHelper.cs
index d699915..3d32d45 100644
--- a/RbFreqStandMeasure/tools/DetectionHelper.cs
+++ b/RbFreqStandMeasure/tools/DetectionHelper.cs
@@ -86,8 +86,7 @@
delay = secondSpan.Milliseconds;
}
string[] arr = interval.Split(',');
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "interval==========="+ interval);
-
+
foreach (string inter in arr)
{
if (inter.Equals("1")) timerStability1 = new System.Threading.Timer(exeStability1, null, delay + 100, 1000);
@@ -98,7 +97,7 @@
}
private void exeStability1(Object State)
{
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "开始检测稳定度1s");
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "获取稳定度1s");
try
{
lock (obj)
@@ -108,26 +107,25 @@
string result = "";
string fre = getFrequencyData(portStability);
- if (!fre.Equals(""))
+ if (!fre.Equals("") && resultStability1.Count<101)
{
resultStability1.Add(fre);
if (!isUpdate) detectionService.add(devIdStability, fre, "1-1");
}
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "稳定度1s fre=" + fre);
if (!isUpdate)
{
if (resultStability1.Count == 101)
{
timerStability1.Dispose();
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "开始计算稳定度结果");
-
+
result = FreMath.Stable(resultStability1) + "";
resultStability1.Clear();
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "1s稳定度结果:" + result + ", devId =" + devIdStability);
- // 更新检测结果
- detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", result, "", "", "");
+ // 更新检测结果
+ detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", result, "", "", "");
LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "detectionId :" + detectionItemId);
DetectionItem detectionItem = detectionItemService.searchById(detectionItemId);
@@ -182,24 +180,24 @@
private void exeStability10(Object State)
{
lock (obj)
- {
+ {
string result = "";
string fre = getFrequencyData(portStability);
- if (!fre.Equals(""))
+ if (!fre.Equals("") && resultStability10.Count < 101)
{
resultStability10.Add(fre);
if (!isUpdate) detectionService.add(devIdStability, fre, "1-10");
}
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "稳定度10s fre=" + fre);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "稳定度10s fre=" + fre + ", devId =" + devIdStability);
if (!isUpdate)
{
if (resultStability10.Count == 101)
{
timerStability10.Dispose();
result = FreMath.Stable(resultStability10) + "";
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "10s稳定度检测结果:" + result);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "10s稳定度检测结果:" + result +", devId =" + devIdStability);
detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", "", result, "", "");
@@ -246,25 +244,26 @@
private void exeStability20(Object State)
{
lock (obj)
- {
+ {
string result = "";
string fre = getFrequencyData(portStability);
- if (!fre.Equals(""))
+ if (!fre.Equals("") && resultStability20.Count < 101)
{
resultStability20.Add(fre);
- if (isUpdate) detectionService.add(devIdStability, fre, "1-20");
+ if (!isUpdate) detectionService.add(devIdStability, fre, "1-20");
}
-
- if (isUpdate)
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "稳定度20s fre=" + fre + ", devId =" + devIdStability);
+
+ if (!isUpdate)
{
if (resultStability20.Count == 101)
{
timerStability20.Dispose();
result = FreMath.Stable(resultStability20) + "";
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "20s稳定度检测结果:" + result);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "20s稳定度检测结果:" + result + ", devId =" + devIdStability);
detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", "", "", result, "");
@@ -282,7 +281,7 @@
//更新整个仪器检测状态
if (!detectionItem.Stability.Equals("-1") && !detectionItem.Accuracy.Equals("-1") && !detectionItem.AgeRate.Equals("-1") && !detectionItem.BootFeature.Equals("-1"))
{
- deviceService.updateStatus(detectionItemId, "3", "");
+ deviceService.updateStatus(devIdStability, "3", "");
portStability.Close();
}
@@ -301,7 +300,7 @@
string result1 = FreMath.Stable(resultStability20) + "";
- detectionItemService.updateDetecStatus(devIdStability, "", "", "", "", "", "", "", result1, "");
+ detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", "", "", result1, "");
updateView(resultStability20);
stability.label_result.Text = result1;
@@ -314,21 +313,19 @@
private void exeStability100(Object State)
- {
-
+ {
lock (obj)
- {
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "开始检测稳定度");
-
+ {
string result = "";
string fre = getFrequencyData(portStability);
- if (!fre.Equals(""))
+ if (!fre.Equals("") && resultStability100.Count < 101)
{
resultStability100.Add(fre);
if (!isUpdate) detectionService.add(devIdStability, fre, "1-100");
}
-
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "稳定度100s fre=" + fre + ", devId =" + devIdStability);
+
if (!isUpdate)
{
@@ -337,7 +334,7 @@
timerStability100.Dispose();
result = FreMath.Stable(resultStability100) + "";
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "100s稳定度检测结果:" + result);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "100s稳定度检测结果:" + result + ", devId =" + devIdStability);
detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", "", "", "", result);
@@ -624,14 +621,11 @@
if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1"))
{
- int count = 0;
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "开始获取测量值1");
-
+ int count = 0;
while (count < 5000)
{
- int readLen = port.BytesToRead;
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "readLen =" + readLen);
-
+ Thread.Sleep(100);
+ int readLen = port.BytesToRead;
if (readLen > 0)
{
byte[] buffer = new byte[readLen];
@@ -645,12 +639,9 @@
received = (Convert.ToDouble(dataArray[0].Replace("$", "")) - Convert.ToDouble("0." + data.Split(' ')[1].Replace(".", "").Replace("-", "").TrimEnd('0'))) + "";
}
else received = dataArray[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0');
-
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "before received = " + received);
-
+
received = ((Convert.ToDouble(received) - 10000000) / 10000000) + "";
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "received = " + received);
-
+
break;
}
}
@@ -658,31 +649,30 @@
}
}
else
- {
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "开始获取测量值2");
-
+ {
int count = 0;
while (count < 5000)
{
- int readLen = port.BytesToRead;
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "readLen=" + readLen);
-
+ Thread.Sleep(100);
+ int readLen = port.BytesToRead;
if (readLen > 0)
{
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, port.PortName + "2 readLen="+ readLen);
+
byte[] buffer = new byte[readLen];
port.Read(buffer, 0, readLen);// 接收数据到buffer里面
string data = Encoding.ASCII.GetString(buffer);
string[] dataArray = data.Split(' ');
if (dataArray.Length >= 3)
{
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, port.PortName + "2 data =" + data);
+
foreach (string sss in dataArray)
{
if (sss.Contains("E"))
{
received = sss;
- //received = float.Parse(received)+"";
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "获取测量值2:" + received + ":" + data);
break;
}
}
diff --git a/RbFreqStandMeasure/DataBackupDlg.cs b/RbFreqStandMeasure/DataBackupDlg.cs
index a93b56d..c828d1a 100644
--- a/RbFreqStandMeasure/DataBackupDlg.cs
+++ b/RbFreqStandMeasure/DataBackupDlg.cs
@@ -30,11 +30,15 @@
private void btnExit_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_cancle_Click(object sender, EventArgs e)
{
this.HideMaskAction();
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = true;
+ RbFreqStdMeas.rbFreqStdMeas.TopMost = false;
}
private void btn_save_Click(object sender, EventArgs e)
diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
index 118a766..b6f5dc4 100644
--- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
+++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs
@@ -503,7 +503,7 @@
if (!aReader.IsDBNull(5))
{
DateTime reg = aReader.GetDateTime(5); // regTime
- deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.RegTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName
if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev
@@ -512,7 +512,7 @@
if (!aReader.IsDBNull(10))
{
DateTime reg = aReader.GetDateTime(10); // regTime
- deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
+ deviceView.StartTime = reg.ToString("yyyy-MM-dd HH:mm:ss");
}
if (!aReader.IsDBNull(11))
{
diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
index f79f77f..746f63e 100644
--- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj
+++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj
@@ -7,7 +7,7 @@
{F9A73B92-70CF-4F91-B58B-E461A180A75C}
WinExe
Casic.Birmm.RbFreqStandMeasure
- RbFreqStandMeasure1
+ RbFreqStandMeasure
v4.0
512
true
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
index 376da44..e4673ed 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.Designer.cs
@@ -31,6 +31,11 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RbFreqStdMeas));
this.panMenu = new System.Windows.Forms.Panel();
+ this.panelMain = new System.Windows.Forms.Panel();
+ this.penBanner = new System.Windows.Forms.Panel();
+ this.btnMinSys = new System.Windows.Forms.Button();
+ this.btnExitSys = new System.Windows.Forms.Button();
+ this.labTitle = new System.Windows.Forms.Label();
this.panDev = new Casic.Birmm.RbFreqStandMeasure.RoundPanel();
this.labDevText = new System.Windows.Forms.Label();
this.labDevSelected = new System.Windows.Forms.Label();
@@ -55,12 +60,8 @@
this.labCounterSelected = new System.Windows.Forms.Label();
this.labCounterText = new System.Windows.Forms.Label();
this.picIconCounter = new System.Windows.Forms.PictureBox();
- this.panelMain = new System.Windows.Forms.Panel();
- this.penBanner = new System.Windows.Forms.Panel();
- this.btnMinSys = new System.Windows.Forms.Button();
- this.btnExitSys = new System.Windows.Forms.Button();
- this.labTitle = new System.Windows.Forms.Label();
this.panMenu.SuspendLayout();
+ this.penBanner.SuspendLayout();
this.panDev.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).BeginInit();
this.panSetting.SuspendLayout();
@@ -73,7 +74,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).BeginInit();
this.panCounter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).BeginInit();
- this.penBanner.SuspendLayout();
this.SuspendLayout();
//
// panMenu
@@ -90,6 +90,72 @@
this.panMenu.Size = new System.Drawing.Size(1024, 50);
this.panMenu.TabIndex = 1;
//
+ // panelMain
+ //
+ this.panelMain.Location = new System.Drawing.Point(0, 114);
+ this.panelMain.Name = "panelMain";
+ this.panelMain.Size = new System.Drawing.Size(1024, 654);
+ this.panelMain.TabIndex = 2;
+ //
+ // penBanner
+ //
+ this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
+ this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.penBanner.Controls.Add(this.btnMinSys);
+ this.penBanner.Controls.Add(this.btnExitSys);
+ this.penBanner.Controls.Add(this.labTitle);
+ this.penBanner.Location = new System.Drawing.Point(0, 0);
+ this.penBanner.Name = "penBanner";
+ this.penBanner.Size = new System.Drawing.Size(1024, 64);
+ this.penBanner.TabIndex = 0;
+ this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
+ //
+ // btnMinSys
+ //
+ this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
+ this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnMinSys.FlatAppearance.BorderSize = 0;
+ this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnMinSys.Location = new System.Drawing.Point(944, 22);
+ this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnMinSys.Name = "btnMinSys";
+ this.btnMinSys.Size = new System.Drawing.Size(20, 20);
+ this.btnMinSys.TabIndex = 1;
+ this.btnMinSys.UseVisualStyleBackColor = false;
+ this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
+ this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
+ //
+ // btnExitSys
+ //
+ this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
+ this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
+ this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ this.btnExitSys.FlatAppearance.BorderSize = 0;
+ this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+ this.btnExitSys.Location = new System.Drawing.Point(974, 22);
+ this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
+ this.btnExitSys.Name = "btnExitSys";
+ this.btnExitSys.Size = new System.Drawing.Size(20, 20);
+ this.btnExitSys.TabIndex = 1;
+ this.btnExitSys.UseVisualStyleBackColor = false;
+ this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
+ this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
+ //
+ // labTitle
+ //
+ this.labTitle.BackColor = System.Drawing.Color.Transparent;
+ this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
+ this.labTitle.ForeColor = System.Drawing.Color.White;
+ this.labTitle.Location = new System.Drawing.Point(30, 16);
+ this.labTitle.Name = "labTitle";
+ this.labTitle.Size = new System.Drawing.Size(300, 32);
+ this.labTitle.TabIndex = 0;
+ this.labTitle.Text = "铷原子频标比对测量软件";
+ this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// panDev
//
this.panDev.Back = System.Drawing.Color.Empty;
@@ -420,72 +486,6 @@
this.picIconCounter.MouseLeave += new System.EventHandler(this.panCounter_MouseLeave);
this.picIconCounter.MouseHover += new System.EventHandler(this.panCounter_MouseHover);
//
- // panelMain
- //
- this.panelMain.Location = new System.Drawing.Point(0, 114);
- this.panelMain.Name = "panelMain";
- this.panelMain.Size = new System.Drawing.Size(1024, 654);
- this.panelMain.TabIndex = 2;
- //
- // penBanner
- //
- this.penBanner.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.bg_banner;
- this.penBanner.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.penBanner.Controls.Add(this.btnMinSys);
- this.penBanner.Controls.Add(this.btnExitSys);
- this.penBanner.Controls.Add(this.labTitle);
- this.penBanner.Location = new System.Drawing.Point(0, 0);
- this.penBanner.Name = "penBanner";
- this.penBanner.Size = new System.Drawing.Size(1024, 64);
- this.penBanner.TabIndex = 0;
- this.penBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RbFreqStdMeas_MouseDown);
- //
- // btnMinSys
- //
- this.btnMinSys.BackColor = System.Drawing.Color.Transparent;
- this.btnMinSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_min;
- this.btnMinSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnMinSys.FlatAppearance.BorderSize = 0;
- this.btnMinSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnMinSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnMinSys.Location = new System.Drawing.Point(944, 22);
- this.btnMinSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnMinSys.Name = "btnMinSys";
- this.btnMinSys.Size = new System.Drawing.Size(20, 20);
- this.btnMinSys.TabIndex = 1;
- this.btnMinSys.UseVisualStyleBackColor = false;
- this.btnMinSys.Click += new System.EventHandler(this.btnMinSys_Click);
- this.btnMinSys.MouseHover += new System.EventHandler(this.btnMinSys_MouseHover);
- //
- // btnExitSys
- //
- this.btnExitSys.BackColor = System.Drawing.Color.Transparent;
- this.btnExitSys.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit;
- this.btnExitSys.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.btnExitSys.FlatAppearance.BorderSize = 0;
- this.btnExitSys.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnExitSys.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
- this.btnExitSys.Location = new System.Drawing.Point(974, 22);
- this.btnExitSys.Margin = new System.Windows.Forms.Padding(0);
- this.btnExitSys.Name = "btnExitSys";
- this.btnExitSys.Size = new System.Drawing.Size(20, 20);
- this.btnExitSys.TabIndex = 1;
- this.btnExitSys.UseVisualStyleBackColor = false;
- this.btnExitSys.Click += new System.EventHandler(this.btnExitSys_Click);
- this.btnExitSys.MouseHover += new System.EventHandler(this.btnExitSys_MouseHover);
- //
- // labTitle
- //
- this.labTitle.BackColor = System.Drawing.Color.Transparent;
- this.labTitle.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- this.labTitle.ForeColor = System.Drawing.Color.White;
- this.labTitle.Location = new System.Drawing.Point(30, 16);
- this.labTitle.Name = "labTitle";
- this.labTitle.Size = new System.Drawing.Size(300, 32);
- this.labTitle.TabIndex = 0;
- this.labTitle.Text = "铷原子频标比对测量软件";
- this.labTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// RbFreqStdMeas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -500,6 +500,7 @@
this.Text = "RbFreqStdMeas";
this.Load += new System.EventHandler(this.RbFreqStdMeas_Load);
this.panMenu.ResumeLayout(false);
+ this.penBanner.ResumeLayout(false);
this.panDev.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconDev)).EndInit();
this.panSetting.ResumeLayout(false);
@@ -512,7 +513,6 @@
((System.ComponentModel.ISupportInitialize)(this.picIconHome)).EndInit();
this.panCounter.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picIconCounter)).EndInit();
- this.penBanner.ResumeLayout(false);
this.ResumeLayout(false);
}
diff --git a/RbFreqStandMeasure/RbFreqStdMeas.cs b/RbFreqStandMeasure/RbFreqStdMeas.cs
index 9b8a03a..1b58939 100644
--- a/RbFreqStandMeasure/RbFreqStdMeas.cs
+++ b/RbFreqStandMeasure/RbFreqStdMeas.cs
@@ -30,6 +30,7 @@
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
+ public static RbFreqStdMeas rbFreqStdMeas;
public static List portList = new List();
@@ -285,6 +286,7 @@
if (maskForm != null)
{
maskForm.Close();
+ this.BringToFront();
}
}
#endregion
@@ -323,6 +325,7 @@
{
InitializeComponent();
+ rbFreqStdMeas = this;
// 打开数据库
int ret = DbConnectService.openDb();
if (ret == 0)
diff --git a/RbFreqStandMeasure/Resources/dot-green.png b/RbFreqStandMeasure/Resources/dot-green.png
index b507671..3663a1d 100644
--- a/RbFreqStandMeasure/Resources/dot-green.png
+++ b/RbFreqStandMeasure/Resources/dot-green.png
Binary files differ
diff --git a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
index 10ae75c..69e3834 100644
--- a/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
+++ b/RbFreqStandMeasure/bin/Debug/RbFreqStandMeasure.exe
Binary files differ
diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs
index 1f3294c..024ac67 100644
--- a/RbFreqStandMeasure/home/HomeCtrlForm.cs
+++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs
@@ -58,7 +58,7 @@
lock (obj)
{
label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+ label_receiverStatus.Text = StatusCtrlForm.receiverStatus;
}
}
diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
index 778dbfa..66be073 100644
--- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs
@@ -70,8 +70,9 @@
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.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.dataGridView_Data = new System.Windows.Forms.DataGridView();
+ this.roundButton1 = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
+ this.btn_reDetec = new Casic.Birmm.RbFreqStandMeasure.RoundButton();
this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -531,29 +532,6 @@
this.radio_1s.UseVisualStyleBackColor = true;
this.radio_1s.CheckedChanged += new System.EventHandler(this.radio_1s_CheckedChanged);
//
- // btn_reDetec
- //
- this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
- this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
- this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- this.btn_reDetec.FlatAppearance.BorderSize = 0;
- this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
- this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
- this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
- this.btn_reDetec.Name = "btn_reDetec";
- this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
- this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
- this.btn_reDetec.Radius = 5;
- this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
- this.btn_reDetec.TabIndex = 75;
- this.btn_reDetec.Text = "重新检测";
- this.btn_reDetec.UseVisualStyleBackColor = true;
- this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
- //
// dataGridView_Data
//
this.dataGridView_Data.AllowUserToAddRows = false;
@@ -604,6 +582,53 @@
this.dataGridView_Data.Size = new System.Drawing.Size(433, 426);
this.dataGridView_Data.TabIndex = 3;
//
+ // 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)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.roundButton1.HoverForeColor = System.Drawing.Color.White;
+ this.roundButton1.Location = new System.Drawing.Point(669, 27);
+ 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(120, 30);
+ this.roundButton1.TabIndex = 81;
+ this.roundButton1.Text = "重新检测";
+ this.roundButton1.UseVisualStyleBackColor = true;
+ this.roundButton1.Visible = false;
+ this.roundButton1.Click += new System.EventHandler(this.roundButton1_Click_1);
+ //
+ // btn_reDetec
+ //
+ this.btn_reDetec.EnterBackColor = System.Drawing.Color.Blue;
+ this.btn_reDetec.EnterForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ this.btn_reDetec.FlatAppearance.BorderSize = 0;
+ this.btn_reDetec.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
+ this.btn_reDetec.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btn_reDetec.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.btn_reDetec.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(111)))), ((int)(((byte)(198)))));
+ this.btn_reDetec.HoverForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Location = new System.Drawing.Point(312, 16);
+ this.btn_reDetec.Name = "btn_reDetec";
+ this.btn_reDetec.PressBackColor = System.Drawing.Color.DarkBlue;
+ this.btn_reDetec.PressForeColor = System.Drawing.Color.White;
+ this.btn_reDetec.Radius = 5;
+ this.btn_reDetec.Size = new System.Drawing.Size(120, 30);
+ this.btn_reDetec.TabIndex = 75;
+ this.btn_reDetec.Text = "重新检测";
+ this.btn_reDetec.UseVisualStyleBackColor = true;
+ this.btn_reDetec.Click += new System.EventHandler(this.btn_reDetec_Click);
+ //
// DetailDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -611,6 +636,7 @@
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(898, 587);
this.ControlBox = false;
+ this.Controls.Add(this.roundButton1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
@@ -673,5 +699,6 @@
private System.Windows.Forms.RadioButton radio_1s;
public System.Windows.Forms.DataGridView dataGridView_Data;
public System.Windows.Forms.Label label_reDetecting;
+ private RoundButton roundButton1;
}
}
\ No newline at end of file
diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs
index f52da1a..7b6a643 100644
--- a/RbFreqStandMeasure/info/DetailDlg.cs
+++ b/RbFreqStandMeasure/info/DetailDlg.cs
@@ -506,5 +506,18 @@
if (dataGridView_Data.Rows.Count == 0) btn_reDetec.Enabled = false;
}
}
+
+
+ private void roundButton1_Click_1(object sender, EventArgs e)
+ {
+ List resultAgeRate = new List();
+ foreach (DataGridViewRow row in dataGridView_Data.Rows)
+ {
+ resultAgeRate.Add(row.Cells[2].Value.ToString());
+ }
+ double r = 0.0;
+ double k = FreMath.DriftRate(resultAgeRate, out r);
+ MessageBox.Show("r=" + r + ";" + "k=" + k);
+ }
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
index 854ecc0..16d378a 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.Designer.cs
@@ -29,6 +29,7 @@
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.panelLocation = new System.Windows.Forms.Panel();
this.label_z = new System.Windows.Forms.Label();
this.label_y = new System.Windows.Forms.Label();
@@ -62,6 +63,7 @@
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.labelBase = new System.Windows.Forms.Label();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panelLocation.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
@@ -284,6 +286,7 @@
this.panelSite.Name = "panelSite";
this.panelSite.Size = new System.Drawing.Size(610, 610);
this.panelSite.TabIndex = 4;
+ this.panelSite.Paint += new System.Windows.Forms.PaintEventHandler(this.panelSite_Paint);
//
// panel1
//
@@ -457,6 +460,12 @@
this.labelBase.Text = "基本信息";
this.labelBase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
+ // timer1
+ //
+ this.timer1.Enabled = true;
+ this.timer1.Interval = 60000;
+ this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+ //
// StatusCtrlForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -513,5 +522,6 @@
public System.Windows.Forms.Label label_clockStatus;
public System.Windows.Forms.Label label_chnTotal;
public System.Windows.Forms.Label label_usaTotal;
+ private System.Windows.Forms.Timer timer1;
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.cs b/RbFreqStandMeasure/status/StatusCtrlForm.cs
index 93c08dc..44a5302 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.cs
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.cs
@@ -5,7 +5,9 @@
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
+using System.IO.Ports;
using System.Reflection;
+using System.Text;
using System.Threading;
using System.Windows.Forms;
@@ -18,11 +20,29 @@
private readonly object obj = new object();
public static Graphics gp;
private static bool created = false;
+ public static SerialPort portSatellite = new SerialPort();
+ public static string receiverStatus = "";
+ public static string date = "";
+ public static string time = "";
+ public static string mjd = "";
+ public static string lat = "";
+ public static string lng = "";
+ public static string x = "";
+ public static string y = "";
+ public static string z = "";
+ public static List gpList = new List();
+ public static List bdList = new List();
+ public static int totalGP = 0;
+ public static int totalBD = 0;
public StatusCtrlForm()
{
InitializeComponent();
statusCtrlForm = this;
+ this.DoubleBuffered = true;
+ // SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+
+ this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
//label_date.Text = DateTime.Now.ToString("yyyy-MM-dd");
//label_time.Text = DateTime.Now.ToString("HH:mm:ss");
@@ -35,35 +55,38 @@
panelSite.Controls.Add(coo);
coo.Show();
- //new Thread(() =>
- //{
- lock (obj)
- {
+
+
if (!FreshStatus.isStarted)
{
FreshStatus.startClockFresh();
- FreshStatus.startSatelliteFresh();
}
- Thread.Sleep(500);
- label_clockStatus.Text = FreshStatus.clockStatus;
- label_receiverStatus.Text = FreshStatus.receiverStatus;
+
+ new Thread(() =>
+ {
+ Thread.Sleep(500);
+ lock (obj)
+ {
+ label_clockStatus.Text = FreshStatus.clockStatus;
+ label_receiverStatus.Text = receiverStatus;
- label_date.Text = FreshStatus.date;
- label_time.Text = FreshStatus.time;
- label_mjd.Text = FreshStatus.mjd;
- label_lat.Text = FreshStatus.lat;
- label_lng.Text = FreshStatus.lng;
- label_x.Text = FreshStatus.x;
- label_y.Text = FreshStatus.y;
- label_z.Text = FreshStatus.z;
- label_usaTotal.Text = FreshStatus.totalGP+"";
- label_chnTotal.Text = FreshStatus.totalBD+"";
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "界面初始化。。。。。。");
+ label_date.Text = date;
+ label_time.Text = time;
+ label_mjd.Text = mjd;
+ label_lat.Text = lat;
+ label_lng.Text = lng;
+ label_x.Text = x;
+ label_y.Text = y;
+ label_z.Text = z;
+ refreshDraw();
+ //LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "界面初始化。。。。。。");
- draw(FreshStatus.bdList, FreshStatus.gpList);
- }
+ //draw(FreshStatus.bdList, FreshStatus.gpList);
+ }
+ }).Start();
+
- //}).Start();
+
}
@@ -76,15 +99,15 @@
Invoke(new MethodInvoker(delegate ()
{
- Graphics gp = panelSite.CreateGraphics();
- gp.Clear(panelSite.BackColor);
- gp.Dispose();
- //panelSite.Controls.Clear();
- //coo = new Coordinate();
- //panelSite.Controls.Add(coo);
- //coo.Show();
- drawFunc(bdList);
- drawFunc(gpList);
+ //Graphics gp = panelSite.CreateGraphics();
+ //gp.Clear(panelSite.BackColor);
+ //gp.Dispose();
+ panelSite.Controls.Clear();
+ coo = new Coordinate();
+ panelSite.Controls.Add(coo);
+ coo.Show();
+ //drawFunc(bdList);
+ //drawFunc(gpList);
}
));
@@ -97,27 +120,25 @@
}
- private void drawFunc(List gvsList)
+ private void PaintImage(Graphics gp)
{
try
{
Invoke(new MethodInvoker(delegate ()
{
- if (gvsList.Count > 0)
- {
- Graphics gp = panelSite.CreateGraphics();
- gp.SmoothingMode = SmoothingMode.HighQuality;
-
- int gpCount = 0;
+ if (bdList.Count > 0)
+ {
int bdCount = 0;
- foreach (string gsv in gvsList)
+ foreach (string gsv in bdList)
{
string[] arr = gsv.Split(',');
int length = arr.Length;
for (int i = 4; i < arr.Length; i = i + 3)
- {
- if ((i + 3) < arr.Length)
+ {
+ if ((i + 3) < arr.Length && !arr[i + 1].Equals("") && !arr[i + 2].Equals("") && !arr[i + 3].Equals(""))
{
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, arr[i + 1] + ";" + arr[i + 2] + ";" + arr[i + 3]);
+
int Elevation = Convert.ToInt32(arr[i + 1]);
int azimuth = Convert.ToInt32(arr[i + 2]);
double cosLen = Math.Cos(Elevation * Math.PI / 180) * (575 / 2);
@@ -126,19 +147,47 @@
int x = (int)Math.Floor(600 / 2 + xCor);
int y = (int)Math.Floor(610 / 2 - yCor);
- string type = "CHN";
- if (gsv.Contains("GPGSV")) { type = "USA"; gpCount++; }
- else { bdCount++; }
+ string type = "CHN";
gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject(type), x, y);
-
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gvsList.count="+ gvsList.Count+",画了一个" +type + "x="+x+"y="+y);
-
+ bdCount++;
+
}
}
- if(gpCount>0)label_usaTotal.Text = gpCount + "";
- if (bdCount > 0) label_chnTotal.Text = bdCount + "";
+
}
- gp.Dispose();
+ if (bdCount > 0) label_chnTotal.Text = bdCount + "";
+ }
+ if (gpList.Count > 0)
+ {
+ int gpCount = 0;
+ foreach (string gsv in gpList)
+ {
+ string[] arr = gsv.Split(',');
+ int length = arr.Length;
+ for (int i = 4; i < arr.Length; i = i + 3)
+ {
+ if ((i + 3) < arr.Length && !arr[i + 1].Equals("") && !arr[i + 2].Equals("") && !arr[i + 3].Equals(""))
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, arr[i + 1] + ";" + arr[i + 2] + ";" + arr[i + 3]);
+
+ int Elevation = Convert.ToInt32(arr[i + 1]);
+ int azimuth = Convert.ToInt32(arr[i + 2]);
+ double cosLen = Math.Cos(Elevation * Math.PI / 180) * (575 / 2);
+ double xCor = Math.Cos(azimuth * Math.PI / 180) * cosLen;
+ double yCor = Math.Sin(azimuth * Math.PI / 180) * cosLen;
+
+ int x = (int)Math.Floor(600 / 2 + xCor);
+ int y = (int)Math.Floor(610 / 2 - yCor);
+ string type = "USA";
+
+ gp.DrawImage((Bitmap)Resources.ResourceManager.GetObject(type), x, y);
+ gpCount++;
+
+ }
+ }
+
+ }
+ if (gpCount > 0) label_usaTotal.Text = gpCount + "";
}
}
));
@@ -151,5 +200,352 @@
}
}
+ private void panelSite_Paint(object sender, PaintEventArgs e)
+ {
+ try
+ {
+ if ( bdList.Count > 0 ||gpList.Count > 0)
+ {
+
+ Invoke(new MethodInvoker(delegate ()
+ {
+ Rectangle rect = e.ClipRectangle;
+ BufferedGraphicsContext currentContext = BufferedGraphicsManager.Current;
+ BufferedGraphics myBuffer = currentContext.Allocate(e.Graphics, e.ClipRectangle);
+ Graphics g = myBuffer.Graphics;
+ g.SmoothingMode = SmoothingMode.HighQuality;
+ g.PixelOffsetMode = PixelOffsetMode.HighSpeed;
+ g.Clear(panelSite.BackColor);
+ PaintImage(g);
+
+ myBuffer.Render(e.Graphics);
+ g.Dispose();
+ myBuffer.Dispose();//释放资源
+ }
+ ));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "error error:" + ex.Message);
+ }
+ }
+
+ private void timer1_Tick(object sender, EventArgs e)
+ {
+ refreshDraw();
+ }
+
+ private void refreshDraw()
+ {
+ try
+ {
+ if (!portSatellite.IsOpen)
+ {
+ string portName = ConfigHelper.GetAppConfig("satellite").Split(' ')[0];
+ int bandRate = Convert.ToInt32(ConfigHelper.GetAppConfig("satellite").Split(' ')[1]);
+ portSatellite.PortName = portName;
+ portSatellite.BaudRate = bandRate;
+ portSatellite.Parity = Parity.None;
+ portSatellite.DataBits = 8;
+ portSatellite.StopBits = StopBits.One;
+ portSatellite.Handshake = Handshake.None;
+ portSatellite.ReadTimeout = -1;
+ portSatellite.WriteTimeout = 3000;
+
+ // 打开串口
+ if (!portSatellite.IsOpen) portSatellite.Open();
+ if (portSatellite.IsOpen)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "打开串口成功!" + portName);
+ }
+ else
+ {
+ MessageBox.Show("无法打开串口" + portName + ",卫星状态更新失败!");
+ return;
+ }
+ }
+
+ int bdMessCount = 0;
+ int gpMessCount = 0;
+ int count = 0;
+ while (count < 1000)
+ {
+ Thread.Sleep(100);
+ int Readlen = portSatellite.BytesToRead;
+
+ if (Readlen > 0)
+ {
+ byte[] buffer = new byte[Readlen];
+ portSatellite.Read(buffer, 0, Readlen);// 接收数据到buffer里面
+ string data = Encoding.ASCII.GetString(buffer);
+
+ string[] dataArray = data.Split('$');
+ if (dataArray.Length > 0)
+ {
+ lock (obj)
+ {
+ gpList.Clear();
+ bdList.Clear();
+ totalGP = 0;
+ totalBD = 0;
+ }
+ int index = -1;
+ bool drawed = false;
+ bool gga = false;
+ bool rmc = false;
+ foreach (string sss in dataArray)
+ {
+ index++;
+
+ if ((sss.Contains("GPGGA") || sss.Contains("GNGGA")) && sss.Contains("*"))
+ {
+ string[] resultArray = sss.Split(',');
+ if (resultArray.Length > 5)
+ {
+ gga = true;
+ try
+ {
+ lat = resultArray[2].Replace(".", "").Insert(2, ".") + resultArray[3];
+ lng = resultArray[4].Replace(".", "").Insert(3, ".") + resultArray[5];
+ x = parseGGA(sss).Split(',')[0];
+ y = parseGGA(sss).Split(',')[1];
+ z = parseGGA(sss).Split(',')[2];
+
+ lock (obj)
+ {
+ statusCtrlForm.label_lat.Text = lat;
+ statusCtrlForm.label_lng.Text = lng;
+ statusCtrlForm.label_x.Text = x;
+ statusCtrlForm.label_y.Text = y;
+ statusCtrlForm.label_z.Text = z;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "GGA error:" + ex.Message);
+ }
+ }
+ }
+ else if (sss.Contains("GNRMC") && sss.Contains("*"))
+ {
+ string[] resultArray = sss.Split(',');
+ if (resultArray.Length > 9)
+ {
+ rmc = true;
+ date = resultArray[9];
+ mjd = "";
+ if (date.Length > 5)
+ {
+ mjd = getMJD("20" + date.Substring(4, 2), date.Substring(2, 2), date.Substring(0, 2));
+ date = "20" + date.Substring(4, 2) + "-" + date.Substring(2, 2) + "-" + date.Substring(0, 2);
+
+ }
+ time = resultArray[1];
+ if (time.Length > 5)
+ {
+ int hour = Convert.ToInt32(time.Substring(0, 2));
+ if ((hour + 8) > 23) hour = hour + 8 - 24;
+ else hour = hour + 8;
+
+ time = hour + ":" + time.Substring(2, 2) + ":" + time.Substring(4);
+
+ }
+
+ if (resultArray[2] == "A") receiverStatus = "定位有效";
+ else if (resultArray[2] == "V") receiverStatus = "警告";
+
+
+ try
+ {
+ lock (obj)
+ {
+ statusCtrlForm.label_date.Text = date;
+ statusCtrlForm.label_time.Text = time;
+ statusCtrlForm.label_mjd.Text = mjd;
+ statusCtrlForm.label_receiverStatus.Text = receiverStatus;
+ HomeCtrlForm.homeCtrlForm.label_receiverStatus.Text = receiverStatus;
+ }
+
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "RMC error:" + ex.Message);
+ }
+
+ }
+
+ }
+ else if ((sss.Contains("GPGSV") || sss.Contains("BDGSV") || sss.Contains("GBGSV")) && sss.Contains("*"))
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "GSV : " + sss);
+ if (sss.Split(',').Length > 8)
+ {
+ if (sss.Contains("GPGSV"))
+ {
+ gpMessCount = Convert.ToInt32(sss.Split(',')[1]);
+ if (gpList.Count < gpMessCount)
+ {
+ gpList.Add(sss);
+ totalGP = Convert.ToInt32(sss.Split(',')[3]);
+ }
+ }
+ else
+ {
+ bdMessCount = Convert.ToInt32(sss.Split(',')[1]);
+ if (bdList.Count < bdMessCount)
+ {
+ bdList.Add(sss);
+ totalBD = Convert.ToInt32(sss.Split(',')[3]);
+ }
+ }
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gpList : " + gpList.Count + ",gp共有 :" + +gpMessCount);
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "bdList : " + bdList.Count + ",bd共有 : " + bdMessCount);
+
+ if ((gpList.Count > 0 && gpList.Count == gpMessCount) && (bdList.Count > 0) && bdList.Count == bdMessCount)
+ {
+ if (!drawed)
+ {
+ drawed = true;
+ try
+ {
+ lock (obj)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "更新更新更新更新更新画:::: : ");
+
+ panelSite.Refresh();
+ }
+
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "draw gsv error:" + ex.Message);
+ }
+ }
+ }
+ }
+
+ }
+ if (drawed && gga && rmc)
+ {
+ break;
+ }
+
+ }
+ break;
+ }
+ }
+ count++;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "exeSatellite error:" + ex.Message);
+ }
+ }
+
+ private static string getMJD(string ys, string ms, string ds)
+ {
+ try
+ {
+ int y = Convert.ToInt32(ys) - 1900;
+ int m = Convert.ToInt32(ms);
+ int d = Convert.ToInt32(ds);
+ int L = 0;
+ if (m == 1 || m == 2) L = 1;
+ int njdINT = 14956 + d + (int)((y - L) * 365.25) + (int)((m + 1 + L * 12) * 30.6001);
+ return njdINT + "";
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "getMJD error:" + ex.Message);
+ return "";
+ }
+ }
+
+ private string parseGGA(string ggaStr)
+ {
+ try
+ {
+ double f = 1 / 298.257223563; /*基准椭球体的极扁率*/
+ double a = 6378137.0; /*基准椭球体的长半径*/
+ double b = 6356752.314; /*基准椭球体的短半径*/
+ double e2 = f * (2 - f); /*基准椭球体的偏心率*/
+ double pi_180 = Math.PI / 180;
+ //$GPGGA,081918.00,3954.7889938,N,11615.5667600,E,1,28,0.68,78.6748,M,-9.7970,M,02,*7D
+ var arr = ggaStr.Split(',');
+
+ string m_pBs = parseCoord(arr[2], arr[3]);
+ string m_pLs = parseCoord(arr[4], arr[5]);
+ string m_pHs = "";
+ if (!arr[9].Equals("") && !arr[11].Equals("")) m_pHs = Convert.ToDouble(arr[9]) + Convert.ToDouble(arr[11]) + "";// add 大地水准面高度 纠正误差
+ // objBLH.b = util.parseCoord(arr[2],arr[3]);
+ // objBLH.l = util.parseCoord(arr[4],arr[5]);
+
+ // objBLH.h = parseFloat(arr[9]);
+ string X = "", Y = "", Z = "";
+ if (!m_pBs.Equals("") && !m_pLs.Equals("") && !m_pHs.Equals(""))
+ {
+ double m_pB = Convert.ToDouble(m_pBs);
+ double m_pL = Convert.ToDouble(m_pLs);
+ double m_pH = Convert.ToDouble(m_pHs);
+ double N = a / Math.Sqrt(1 - e2 * Math.Sin(m_pB * pi_180) * Math.Sin(m_pB * Math.PI));
+ X = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Cos(m_pL * Math.PI) + "";
+ Y = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Sin(m_pL * Math.PI) + "";
+ Z = (N * (1 - e2) + m_pH) * Math.Sin(m_pB * pi_180) + "";
+ }
+ return X + "," + Y + "," + Z;
+ }
+ catch (Exception ex)
+ {
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "parseGGA error:" + ex.Message);
+ return " , , ";
+ }
+ }
+ private string parseCoord(string coord, string dir)
+ {
+ //$GPGGA,081918.00,3954.7889938,N,11615.5667600,E,1,28,0.68,78.6748,M,-9.7970,M,02,*7D
+ if (coord.Equals(""))
+ return null;
+ int n = 1, sgn = 1;
+ switch (dir)
+ {
+ case "S":
+ sgn = -1; break;
+ case "N":
+ n = 2; break;
+ case "W":
+ sgn = -1; break;
+ case "E":
+ n = 3; break;
+
+ default: break;
+ }
+ return sgn * (Convert.ToDouble(coord.Substring(0, n)) + Convert.ToDouble(coord.Substring(n)) / 60) + "";
+ }
+ private string BLH2XYX(string objectBLH)
+ {
+ // var objectBLH ={l:116.259446,b:39.91314989666667,h:78.6748};//for test
+ // var N = a / Math.sqrt(1 - e2 * Math.sin(objectBLH.b * pi_180) * Math.sin(objectBLH.b * pi_180));
+ // var X = (N + objectBLH.h) * Math.cos(objectBLH.b * pi_180) * Math.cos(objectBLH.l * pi_180);
+ // var Y = (N + objectBLH.h) * Math.cos(objectBLH.b * pi_180) * Math.sin(objectBLH.l * pi_180);
+ // var Z = [N * (1 - e2 ) + objectBLH.h] * Math.sin(objectBLH.b * pi_180);
+ // var objectXYZ = {};
+ // objectXYZ.X = X;
+ // objectXYZ.Y = Y;
+ // objectXYZ.Z = Z;
+ string X = "", Y = "", Z = "";
+ double m_pB = Convert.ToDouble(objectBLH.Split(',')[0]);
+ double m_pL = Convert.ToDouble(objectBLH.Split(',')[1]);
+ double m_pH = Convert.ToDouble(objectBLH.Split(',')[2]);
+ //double N = a / Math.Sqrt(1 - e2 * Math.Sin(m_pB * pi_180) * Math.Sin(m_pB * Math.PI));
+ //X = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Cos(m_pL * Math.PI);
+ //Y = (N + m_pH) * Math.Cos(m_pB * pi_180) * Math.Sin(m_pL * Math.PI);
+ //Z = [N * (1 - e2) + m_pH] * Math.Sin(m_pB * pi_180);
+
+ return X + "," + Y + "," + Z;
+ }
+
}
}
diff --git a/RbFreqStandMeasure/status/StatusCtrlForm.resx b/RbFreqStandMeasure/status/StatusCtrlForm.resx
index 1af7de1..99df3f3 100644
--- a/RbFreqStandMeasure/status/StatusCtrlForm.resx
+++ b/RbFreqStandMeasure/status/StatusCtrlForm.resx
@@ -117,4 +117,10 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 17, 17
+
+
+ 55
+
\ No newline at end of file
diff --git a/RbFreqStandMeasure/tools/ConfigHelper.cs b/RbFreqStandMeasure/tools/ConfigHelper.cs
index 3f425c2..36306fc 100644
--- a/RbFreqStandMeasure/tools/ConfigHelper.cs
+++ b/RbFreqStandMeasure/tools/ConfigHelper.cs
@@ -27,8 +27,6 @@
{
try
{
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "777:" + value);
-
string file = System.Windows.Forms.Application.ExecutablePath;
Configuration config = ConfigurationManager.OpenExeConfiguration(file);
foreach (string key in config.AppSettings.Settings.AllKeys)
diff --git a/RbFreqStandMeasure/tools/DetectionHelper.cs b/RbFreqStandMeasure/tools/DetectionHelper.cs
index d699915..3d32d45 100644
--- a/RbFreqStandMeasure/tools/DetectionHelper.cs
+++ b/RbFreqStandMeasure/tools/DetectionHelper.cs
@@ -86,8 +86,7 @@
delay = secondSpan.Milliseconds;
}
string[] arr = interval.Split(',');
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "interval==========="+ interval);
-
+
foreach (string inter in arr)
{
if (inter.Equals("1")) timerStability1 = new System.Threading.Timer(exeStability1, null, delay + 100, 1000);
@@ -98,7 +97,7 @@
}
private void exeStability1(Object State)
{
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "开始检测稳定度1s");
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "获取稳定度1s");
try
{
lock (obj)
@@ -108,26 +107,25 @@
string result = "";
string fre = getFrequencyData(portStability);
- if (!fre.Equals(""))
+ if (!fre.Equals("") && resultStability1.Count<101)
{
resultStability1.Add(fre);
if (!isUpdate) detectionService.add(devIdStability, fre, "1-1");
}
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "稳定度1s fre=" + fre);
if (!isUpdate)
{
if (resultStability1.Count == 101)
{
timerStability1.Dispose();
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "开始计算稳定度结果");
-
+
result = FreMath.Stable(resultStability1) + "";
resultStability1.Clear();
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "1s稳定度结果:" + result + ", devId =" + devIdStability);
- // 更新检测结果
- detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", result, "", "", "");
+ // 更新检测结果
+ detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", result, "", "", "");
LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "detectionId :" + detectionItemId);
DetectionItem detectionItem = detectionItemService.searchById(detectionItemId);
@@ -182,24 +180,24 @@
private void exeStability10(Object State)
{
lock (obj)
- {
+ {
string result = "";
string fre = getFrequencyData(portStability);
- if (!fre.Equals(""))
+ if (!fre.Equals("") && resultStability10.Count < 101)
{
resultStability10.Add(fre);
if (!isUpdate) detectionService.add(devIdStability, fre, "1-10");
}
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "稳定度10s fre=" + fre);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "稳定度10s fre=" + fre + ", devId =" + devIdStability);
if (!isUpdate)
{
if (resultStability10.Count == 101)
{
timerStability10.Dispose();
result = FreMath.Stable(resultStability10) + "";
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "10s稳定度检测结果:" + result);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "10s稳定度检测结果:" + result +", devId =" + devIdStability);
detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", "", result, "", "");
@@ -246,25 +244,26 @@
private void exeStability20(Object State)
{
lock (obj)
- {
+ {
string result = "";
string fre = getFrequencyData(portStability);
- if (!fre.Equals(""))
+ if (!fre.Equals("") && resultStability20.Count < 101)
{
resultStability20.Add(fre);
- if (isUpdate) detectionService.add(devIdStability, fre, "1-20");
+ if (!isUpdate) detectionService.add(devIdStability, fre, "1-20");
}
-
- if (isUpdate)
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "稳定度20s fre=" + fre + ", devId =" + devIdStability);
+
+ if (!isUpdate)
{
if (resultStability20.Count == 101)
{
timerStability20.Dispose();
result = FreMath.Stable(resultStability20) + "";
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "20s稳定度检测结果:" + result);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "20s稳定度检测结果:" + result + ", devId =" + devIdStability);
detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", "", "", result, "");
@@ -282,7 +281,7 @@
//更新整个仪器检测状态
if (!detectionItem.Stability.Equals("-1") && !detectionItem.Accuracy.Equals("-1") && !detectionItem.AgeRate.Equals("-1") && !detectionItem.BootFeature.Equals("-1"))
{
- deviceService.updateStatus(detectionItemId, "3", "");
+ deviceService.updateStatus(devIdStability, "3", "");
portStability.Close();
}
@@ -301,7 +300,7 @@
string result1 = FreMath.Stable(resultStability20) + "";
- detectionItemService.updateDetecStatus(devIdStability, "", "", "", "", "", "", "", result1, "");
+ detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", "", "", result1, "");
updateView(resultStability20);
stability.label_result.Text = result1;
@@ -314,21 +313,19 @@
private void exeStability100(Object State)
- {
-
+ {
lock (obj)
- {
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "开始检测稳定度");
-
+ {
string result = "";
string fre = getFrequencyData(portStability);
- if (!fre.Equals(""))
+ if (!fre.Equals("") && resultStability100.Count < 101)
{
resultStability100.Add(fre);
if (!isUpdate) detectionService.add(devIdStability, fre, "1-100");
}
-
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "稳定度100s fre=" + fre + ", devId =" + devIdStability);
+
if (!isUpdate)
{
@@ -337,7 +334,7 @@
timerStability100.Dispose();
result = FreMath.Stable(resultStability100) + "";
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "100s稳定度检测结果:" + result);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "100s稳定度检测结果:" + result + ", devId =" + devIdStability);
detectionItemService.updateDetecStatus(detectionItemId, "", "", "", "", "", "", "", "", result);
@@ -624,14 +621,11 @@
if (ConfigHelper.GetAppConfig("deviceType").ToString().Equals("1"))
{
- int count = 0;
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "开始获取测量值1");
-
+ int count = 0;
while (count < 5000)
{
- int readLen = port.BytesToRead;
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "readLen =" + readLen);
-
+ Thread.Sleep(100);
+ int readLen = port.BytesToRead;
if (readLen > 0)
{
byte[] buffer = new byte[readLen];
@@ -645,12 +639,9 @@
received = (Convert.ToDouble(dataArray[0].Replace("$", "")) - Convert.ToDouble("0." + data.Split(' ')[1].Replace(".", "").Replace("-", "").TrimEnd('0'))) + "";
}
else received = dataArray[0].Replace("$", "") + "." + data.Split(' ')[1].Replace(".", "").TrimEnd('0');
-
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "before received = " + received);
-
+
received = ((Convert.ToDouble(received) - 10000000) / 10000000) + "";
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "received = " + received);
-
+
break;
}
}
@@ -658,31 +649,30 @@
}
}
else
- {
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "开始获取测量值2");
-
+ {
int count = 0;
while (count < 5000)
{
- int readLen = port.BytesToRead;
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "readLen=" + readLen);
-
+ Thread.Sleep(100);
+ int readLen = port.BytesToRead;
if (readLen > 0)
{
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, port.PortName + "2 readLen="+ readLen);
+
byte[] buffer = new byte[readLen];
port.Read(buffer, 0, readLen);// 接收数据到buffer里面
string data = Encoding.ASCII.GetString(buffer);
string[] dataArray = data.Split(' ');
if (dataArray.Length >= 3)
{
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, port.PortName + "2 data =" + data);
+
foreach (string sss in dataArray)
{
if (sss.Contains("E"))
{
received = sss;
- //received = float.Parse(received)+"";
- LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "获取测量值2:" + received + ":" + data);
break;
}
}
diff --git a/RbFreqStandMeasure/tools/FreshStatus.cs b/RbFreqStandMeasure/tools/FreshStatus.cs
index 9f36899..517657c 100644
--- a/RbFreqStandMeasure/tools/FreshStatus.cs
+++ b/RbFreqStandMeasure/tools/FreshStatus.cs
@@ -132,10 +132,10 @@
// 获取卫星RMC数据
public static void startSatelliteFresh()
{
- timerSatellite = new System.Threading.Timer(exeSatellite, null, 50, 60 * 1000);
- isStarted = true;
+ //timerSatellite = new System.Threading.Timer(exeSatellite, null, 50, 60 * 1000);
+ //isStarted = true;
}
- private static void exeSatellite(Object State)
+ public static void exeSatellite()
{
try
{
@@ -307,23 +307,21 @@
totalBD = Convert.ToInt32(sss.Split(',')[3]);
}
}
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gpList.Count : " + gpList.Count);
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "共有 : " + gpMessCount);
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "bdList.Count : " + bdList.Count);
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "共有 : " + bdMessCount);
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "gpList : " + gpList.Count + ",gp共有 :" + +gpMessCount);
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "bdList : " + bdList.Count+",bd共有 : " + bdMessCount);
if ((gpList.Count>0 &&gpList.Count == gpMessCount) && (bdList.Count>0) && bdList.Count == bdMessCount)
- {
- drawed = true;
+ {
if (!drawed)
{
+ drawed = true;
try
{
lock (obj)
{
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "更新画:::: : ");
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "更新更新更新更新更新画:::: : ");
- StatusCtrlForm.statusCtrlForm.draw(bdList, gpList);
+ StatusCtrlForm.statusCtrlForm.Refresh();
}
}