SVN r952
SVN-Revision: r952
This commit is contained in:
+33
-69
@@ -61,10 +61,7 @@ namespace LadfDataApp
|
||||
this.loginNameBox = new System.Windows.Forms.TextBox();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.tipsTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.panelNow = new System.Windows.Forms.Panel();
|
||||
this.panel4 = new System.Windows.Forms.Panel();
|
||||
this.radioNow = new System.Windows.Forms.RadioButton();
|
||||
this.checkHistory = new System.Windows.Forms.CheckBox();
|
||||
this.loginInfoPanel.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.panelNext.SuspendLayout();
|
||||
@@ -75,15 +72,13 @@ namespace LadfDataApp
|
||||
this.groupBox4.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.groupBox5.SuspendLayout();
|
||||
this.panel4.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// loginInfoPanel
|
||||
//
|
||||
this.loginInfoPanel.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.loginInfoPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.loginInfoPanel.Controls.Add(this.groupBox5);
|
||||
this.loginInfoPanel.Controls.Add(this.checkHistory);
|
||||
this.loginInfoPanel.Controls.Add(this.startBtn);
|
||||
this.loginInfoPanel.Controls.Add(this.groupBox3);
|
||||
this.loginInfoPanel.Controls.Add(this.groupBox2);
|
||||
@@ -92,12 +87,13 @@ namespace LadfDataApp
|
||||
this.loginInfoPanel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.loginInfoPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.loginInfoPanel.Name = "loginInfoPanel";
|
||||
this.loginInfoPanel.Size = new System.Drawing.Size(614, 356);
|
||||
this.loginInfoPanel.Size = new System.Drawing.Size(708, 268);
|
||||
this.loginInfoPanel.TabIndex = 0;
|
||||
//
|
||||
// startBtn
|
||||
//
|
||||
this.startBtn.Location = new System.Drawing.Point(483, 317);
|
||||
this.startBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.startBtn.Location = new System.Drawing.Point(601, 229);
|
||||
this.startBtn.Name = "startBtn";
|
||||
this.startBtn.Size = new System.Drawing.Size(102, 31);
|
||||
this.startBtn.TabIndex = 18;
|
||||
@@ -109,9 +105,9 @@ namespace LadfDataApp
|
||||
this.groupBox3.Controls.Add(this.panelNext);
|
||||
this.groupBox3.Controls.Add(this.panel5);
|
||||
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupBox3.Location = new System.Drawing.Point(0, 205);
|
||||
this.groupBox3.Location = new System.Drawing.Point(0, 169);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(612, 54);
|
||||
this.groupBox3.Size = new System.Drawing.Size(706, 54);
|
||||
this.groupBox3.TabIndex = 16;
|
||||
this.groupBox3.TabStop = false;
|
||||
//
|
||||
@@ -124,7 +120,7 @@ namespace LadfDataApp
|
||||
this.panelNext.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panelNext.Location = new System.Drawing.Point(83, 17);
|
||||
this.panelNext.Name = "panelNext";
|
||||
this.panelNext.Size = new System.Drawing.Size(526, 34);
|
||||
this.panelNext.Size = new System.Drawing.Size(620, 34);
|
||||
this.panelNext.TabIndex = 23;
|
||||
//
|
||||
// nextStartDate
|
||||
@@ -140,7 +136,7 @@ namespace LadfDataApp
|
||||
// timeUnitLab
|
||||
//
|
||||
this.timeUnitLab.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.timeUnitLab.Location = new System.Drawing.Point(457, 7);
|
||||
this.timeUnitLab.Location = new System.Drawing.Point(508, 7);
|
||||
this.timeUnitLab.Name = "timeUnitLab";
|
||||
this.timeUnitLab.Size = new System.Drawing.Size(45, 25);
|
||||
this.timeUnitLab.TabIndex = 24;
|
||||
@@ -161,7 +157,7 @@ namespace LadfDataApp
|
||||
//
|
||||
this.timeIntervalBox.Location = new System.Drawing.Point(302, 7);
|
||||
this.timeIntervalBox.Name = "timeIntervalBox";
|
||||
this.timeIntervalBox.Size = new System.Drawing.Size(149, 21);
|
||||
this.timeIntervalBox.Size = new System.Drawing.Size(200, 21);
|
||||
this.timeIntervalBox.TabIndex = 22;
|
||||
//
|
||||
// panel5
|
||||
@@ -189,9 +185,9 @@ namespace LadfDataApp
|
||||
this.groupBox2.Controls.Add(this.panelFix);
|
||||
this.groupBox2.Controls.Add(this.panel3);
|
||||
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupBox2.Location = new System.Drawing.Point(0, 151);
|
||||
this.groupBox2.Location = new System.Drawing.Point(0, 115);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(612, 54);
|
||||
this.groupBox2.Size = new System.Drawing.Size(706, 54);
|
||||
this.groupBox2.TabIndex = 15;
|
||||
this.groupBox2.TabStop = false;
|
||||
//
|
||||
@@ -203,7 +199,7 @@ namespace LadfDataApp
|
||||
this.panelFix.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panelFix.Location = new System.Drawing.Point(83, 17);
|
||||
this.panelFix.Name = "panelFix";
|
||||
this.panelFix.Size = new System.Drawing.Size(526, 34);
|
||||
this.panelFix.Size = new System.Drawing.Size(620, 34);
|
||||
this.panelFix.TabIndex = 22;
|
||||
//
|
||||
// label3
|
||||
@@ -260,9 +256,9 @@ namespace LadfDataApp
|
||||
this.groupBox4.Controls.Add(this.label2);
|
||||
this.groupBox4.Controls.Add(this.projectComboBox);
|
||||
this.groupBox4.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupBox4.Location = new System.Drawing.Point(0, 109);
|
||||
this.groupBox4.Location = new System.Drawing.Point(0, 73);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(612, 42);
|
||||
this.groupBox4.Size = new System.Drawing.Size(706, 42);
|
||||
this.groupBox4.TabIndex = 17;
|
||||
this.groupBox4.TabStop = false;
|
||||
//
|
||||
@@ -298,13 +294,13 @@ namespace LadfDataApp
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(612, 109);
|
||||
this.groupBox1.Size = new System.Drawing.Size(706, 73);
|
||||
this.groupBox1.TabIndex = 14;
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
// linkBtn
|
||||
//
|
||||
this.linkBtn.Location = new System.Drawing.Point(483, 70);
|
||||
this.linkBtn.Location = new System.Drawing.Point(601, 34);
|
||||
this.linkBtn.Name = "linkBtn";
|
||||
this.linkBtn.Size = new System.Drawing.Size(102, 31);
|
||||
this.linkBtn.TabIndex = 21;
|
||||
@@ -384,9 +380,9 @@ namespace LadfDataApp
|
||||
//
|
||||
this.panel2.Controls.Add(this.tipsTextBox);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 356);
|
||||
this.panel2.Location = new System.Drawing.Point(0, 268);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(614, 305);
|
||||
this.panel2.Size = new System.Drawing.Size(708, 393);
|
||||
this.panel2.TabIndex = 1;
|
||||
//
|
||||
// tipsTextBox
|
||||
@@ -398,58 +394,32 @@ namespace LadfDataApp
|
||||
this.tipsTextBox.Name = "tipsTextBox";
|
||||
this.tipsTextBox.ReadOnly = true;
|
||||
this.tipsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.tipsTextBox.Size = new System.Drawing.Size(614, 305);
|
||||
this.tipsTextBox.Size = new System.Drawing.Size(708, 393);
|
||||
this.tipsTextBox.TabIndex = 0;
|
||||
//
|
||||
// groupBox5
|
||||
// checkHistory
|
||||
//
|
||||
this.groupBox5.Controls.Add(this.panelNow);
|
||||
this.groupBox5.Controls.Add(this.panel4);
|
||||
this.groupBox5.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupBox5.Location = new System.Drawing.Point(0, 259);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Size = new System.Drawing.Size(612, 54);
|
||||
this.groupBox5.TabIndex = 19;
|
||||
this.groupBox5.TabStop = false;
|
||||
//
|
||||
// panelNow
|
||||
//
|
||||
this.panelNow.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panelNow.Location = new System.Drawing.Point(83, 17);
|
||||
this.panelNow.Name = "panelNow";
|
||||
this.panelNow.Size = new System.Drawing.Size(526, 34);
|
||||
this.panelNow.TabIndex = 23;
|
||||
//
|
||||
// panel4
|
||||
//
|
||||
this.panel4.Controls.Add(this.radioNow);
|
||||
this.panel4.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.panel4.Location = new System.Drawing.Point(3, 17);
|
||||
this.panel4.Name = "panel4";
|
||||
this.panel4.Size = new System.Drawing.Size(80, 34);
|
||||
this.panel4.TabIndex = 22;
|
||||
//
|
||||
// radioNow
|
||||
//
|
||||
this.radioNow.AutoSize = true;
|
||||
this.radioNow.Location = new System.Drawing.Point(3, 12);
|
||||
this.radioNow.Name = "radioNow";
|
||||
this.radioNow.Size = new System.Drawing.Size(71, 16);
|
||||
this.radioNow.TabIndex = 17;
|
||||
this.radioNow.TabStop = true;
|
||||
this.radioNow.Text = "实时查询";
|
||||
this.radioNow.UseVisualStyleBackColor = true;
|
||||
this.checkHistory.AutoSize = true;
|
||||
this.checkHistory.Checked = true;
|
||||
this.checkHistory.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkHistory.Location = new System.Drawing.Point(489, 237);
|
||||
this.checkHistory.Name = "checkHistory";
|
||||
this.checkHistory.Size = new System.Drawing.Size(96, 16);
|
||||
this.checkHistory.TabIndex = 26;
|
||||
this.checkHistory.Text = "历史数据查询";
|
||||
this.checkHistory.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// FrmMain
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(614, 661);
|
||||
this.ClientSize = new System.Drawing.Size(708, 661);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.loginInfoPanel);
|
||||
this.Name = "FrmMain";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "朗速科技物联网同步平台";
|
||||
this.loginInfoPanel.ResumeLayout(false);
|
||||
this.loginInfoPanel.PerformLayout();
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.panelNext.ResumeLayout(false);
|
||||
this.panelNext.PerformLayout();
|
||||
@@ -464,9 +434,6 @@ namespace LadfDataApp
|
||||
this.groupBox1.PerformLayout();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
this.groupBox5.ResumeLayout(false);
|
||||
this.panel4.ResumeLayout(false);
|
||||
this.panel4.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -488,7 +455,4 @@ namespace LadfDataApp
|
||||
private System.Windows.Forms.TextBox loginNameBox;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.RadioButton radioNext;
|
||||
private System.Windows.Forms.Panel panelFix;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.DateTimePicker fixEndDate;
|
||||
private System.Windows
|
||||
private System.Windows.Forms.P
|
||||
@@ -31,13 +31,11 @@ namespace LadfDataApp
|
||||
this.startBtn.Click += OnStartBtnClick;
|
||||
this.radioFix.CheckedChanged += OnCheckedChanged;
|
||||
this.radioNext.CheckedChanged += OnCheckedChanged;
|
||||
this.radioNow.CheckedChanged += OnCheckedChanged;
|
||||
}
|
||||
|
||||
private void OnFrmMainLoad(object sender, EventArgs e)
|
||||
{
|
||||
startBtn.Enabled = false;
|
||||
radioNow.Checked = true;
|
||||
DateTime nowDateTime = DateTime.Now;
|
||||
fixStartDate.Value = new DateTime(nowDateTime.Year, nowDateTime.Month, nowDateTime.Day, 0, 0, 0, 0);
|
||||
fixEndDate.Value = new DateTime(nowDateTime.Year, nowDateTime.Month, nowDateTime.Day, 23, 59, 59, 999);
|
||||
@@ -58,26 +56,14 @@ namespace LadfDataApp
|
||||
{
|
||||
radioNext.Checked = false;
|
||||
panelNext.Enabled = false;
|
||||
radioNow.Checked = false;
|
||||
panelNow.Enabled = false;
|
||||
panelFix.Enabled = true;
|
||||
}
|
||||
if (sender == radioNext && radioNext.Checked)
|
||||
{
|
||||
radioFix.Checked = false;
|
||||
panelFix.Enabled = false;
|
||||
radioNow.Checked = false;
|
||||
panelNow.Enabled = false;
|
||||
panelNext.Enabled = true;
|
||||
}
|
||||
if (sender == radioNow && radioNow.Checked)
|
||||
{
|
||||
radioFix.Checked = false;
|
||||
panelFix.Enabled = false;
|
||||
radioNext.Checked = false;
|
||||
panelNext.Enabled = false;
|
||||
panelNow.Enabled = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 加载项目下拉框数据源
|
||||
@@ -192,10 +178,6 @@ namespace LadfDataApp
|
||||
timer.Interval = 100;
|
||||
timer.Start();
|
||||
}
|
||||
else if (radioNow.Checked)
|
||||
{
|
||||
GetDataOnlyOneWithOutHisData();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -249,52 +231,6 @@ namespace LadfDataApp
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取数据事件(不查询历史数据)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void GetDataOnlyOneWithOutHisData()
|
||||
{
|
||||
try
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
this.groupBox5.Enabled = false;
|
||||
this.panelNow.Enabled = false;
|
||||
this.linkBtn.Enabled = false;
|
||||
this.startBtn.Enabled = false;
|
||||
this.loginNameBox.Enabled = false;
|
||||
this.loginPasswordBox.Enabled = false;
|
||||
this.serverBox.Enabled = false;
|
||||
this.dataBaseBox.Enabled = false;
|
||||
this.timeIntervalBox.Enabled = false;
|
||||
this.projectComboBox.Enabled = false;
|
||||
}));
|
||||
ClearMsg();
|
||||
QueryProjectList();
|
||||
UpdateMsg("同步完成,所有数据已成功写入\r\n");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
this.groupBox5.Enabled = true;
|
||||
this.panelNow.Enabled = true;
|
||||
this.loginNameBox.Enabled = true;
|
||||
this.loginPasswordBox.Enabled = true;
|
||||
this.linkBtn.Enabled = true;
|
||||
this.startBtn.Enabled = true;
|
||||
this.serverBox.Enabled = true;
|
||||
this.dataBaseBox.Enabled = true;
|
||||
this.timeIntervalBox.Enabled = true;
|
||||
this.projectComboBox.Enabled = true;
|
||||
}));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取数据事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
@@ -547,7 +483,7 @@ namespace LadfDataApp
|
||||
SqlHelper.ExecuteNonQuery(projectSqlStrBuilder.ToString());
|
||||
}
|
||||
QueryDeviceParamStatus(deviceModel);
|
||||
if (!radioNow.Checked)
|
||||
if (checkHistory.Checked)
|
||||
{
|
||||
QueryDeviceParamStatusHistory(deviceModel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user