SVN-Revision: r937
This commit is contained in:
wyf
2025-08-08 02:46:39 +00:00
parent 35d404e510
commit 8d2e4c5792
2 changed files with 431 additions and 300 deletions
+297 -244
View File
@@ -30,9 +30,27 @@ namespace LadfDataApp
private void InitializeComponent() private void InitializeComponent()
{ {
this.loginInfoPanel = new System.Windows.Forms.Panel(); this.loginInfoPanel = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel(); this.startBtn = new System.Windows.Forms.Button();
this.tipsTextBox = new System.Windows.Forms.TextBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.panelNext = new System.Windows.Forms.Panel();
this.nextStartDate = new System.Windows.Forms.DateTimePicker();
this.timeUnitLab = new System.Windows.Forms.Label();
this.timeIntervalLab = new System.Windows.Forms.Label();
this.timeIntervalBox = new System.Windows.Forms.TextBox();
this.panel5 = new System.Windows.Forms.Panel();
this.radioNext = new System.Windows.Forms.RadioButton();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.panelFix = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.fixEndDate = new System.Windows.Forms.DateTimePicker();
this.fixStartDate = new System.Windows.Forms.DateTimePicker();
this.panel3 = new System.Windows.Forms.Panel();
this.radioFix = new System.Windows.Forms.RadioButton();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.projectComboBox = new System.Windows.Forms.ComboBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.linkBtn = new System.Windows.Forms.Button();
this.dataBaseLab = new System.Windows.Forms.Label(); this.dataBaseLab = new System.Windows.Forms.Label();
this.dataBaseBox = new System.Windows.Forms.TextBox(); this.dataBaseBox = new System.Windows.Forms.TextBox();
this.serverLab = new System.Windows.Forms.Label(); this.serverLab = new System.Windows.Forms.Label();
@@ -41,42 +59,31 @@ namespace LadfDataApp
this.loginPasswordBox = new System.Windows.Forms.TextBox(); this.loginPasswordBox = new System.Windows.Forms.TextBox();
this.loginNameLab = new System.Windows.Forms.Label(); this.loginNameLab = new System.Windows.Forms.Label();
this.loginNameBox = new System.Windows.Forms.TextBox(); this.loginNameBox = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.panel2 = new System.Windows.Forms.Panel();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.tipsTextBox = new System.Windows.Forms.TextBox();
this.radioNext = new System.Windows.Forms.RadioButton(); this.groupBox5 = new System.Windows.Forms.GroupBox();
this.panel3 = new System.Windows.Forms.Panel(); this.panelNow = new System.Windows.Forms.Panel();
this.radioFix = new System.Windows.Forms.RadioButton(); this.panel4 = new System.Windows.Forms.Panel();
this.panelFix = new System.Windows.Forms.Panel(); this.radioNow = new System.Windows.Forms.RadioButton();
this.label3 = new System.Windows.Forms.Label();
this.fixEndDate = new System.Windows.Forms.DateTimePicker();
this.fixStartDate = new System.Windows.Forms.DateTimePicker();
this.panel5 = new System.Windows.Forms.Panel();
this.panelNext = new System.Windows.Forms.Panel();
this.nextStartDate = new System.Windows.Forms.DateTimePicker();
this.timeUnitLab = new System.Windows.Forms.Label();
this.timeIntervalLab = new System.Windows.Forms.Label();
this.timeIntervalBox = new System.Windows.Forms.TextBox();
this.linkBtn = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.projectComboBox = new System.Windows.Forms.ComboBox();
this.startBtn = new System.Windows.Forms.Button();
this.loginInfoPanel.SuspendLayout(); this.loginInfoPanel.SuspendLayout();
this.panel2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.panel3.SuspendLayout();
this.panelFix.SuspendLayout();
this.panel5.SuspendLayout();
this.panelNext.SuspendLayout(); this.panelNext.SuspendLayout();
this.panel5.SuspendLayout();
this.groupBox2.SuspendLayout();
this.panelFix.SuspendLayout();
this.panel3.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout();
this.groupBox5.SuspendLayout();
this.panel4.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// loginInfoPanel // loginInfoPanel
// //
this.loginInfoPanel.BackColor = System.Drawing.SystemColors.Control; this.loginInfoPanel.BackColor = System.Drawing.SystemColors.Control;
this.loginInfoPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.loginInfoPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.loginInfoPanel.Controls.Add(this.groupBox5);
this.loginInfoPanel.Controls.Add(this.startBtn); this.loginInfoPanel.Controls.Add(this.startBtn);
this.loginInfoPanel.Controls.Add(this.groupBox3); this.loginInfoPanel.Controls.Add(this.groupBox3);
this.loginInfoPanel.Controls.Add(this.groupBox2); this.loginInfoPanel.Controls.Add(this.groupBox2);
@@ -85,29 +92,197 @@ namespace LadfDataApp
this.loginInfoPanel.Dock = System.Windows.Forms.DockStyle.Top; this.loginInfoPanel.Dock = System.Windows.Forms.DockStyle.Top;
this.loginInfoPanel.Location = new System.Drawing.Point(0, 0); this.loginInfoPanel.Location = new System.Drawing.Point(0, 0);
this.loginInfoPanel.Name = "loginInfoPanel"; this.loginInfoPanel.Name = "loginInfoPanel";
this.loginInfoPanel.Size = new System.Drawing.Size(614, 303); this.loginInfoPanel.Size = new System.Drawing.Size(614, 356);
this.loginInfoPanel.TabIndex = 0; this.loginInfoPanel.TabIndex = 0;
// //
// panel2 // startBtn
// //
this.panel2.Controls.Add(this.tipsTextBox); this.startBtn.Location = new System.Drawing.Point(483, 317);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.startBtn.Name = "startBtn";
this.panel2.Location = new System.Drawing.Point(0, 303); this.startBtn.Size = new System.Drawing.Size(102, 31);
this.panel2.Name = "panel2"; this.startBtn.TabIndex = 18;
this.panel2.Size = new System.Drawing.Size(614, 332); this.startBtn.Text = "开始同步";
this.panel2.TabIndex = 1; this.startBtn.UseVisualStyleBackColor = true;
// //
// tipsTextBox // groupBox3
// //
this.tipsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.groupBox3.Controls.Add(this.panelNext);
this.tipsTextBox.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox3.Controls.Add(this.panel5);
this.tipsTextBox.Location = new System.Drawing.Point(0, 0); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Top;
this.tipsTextBox.Multiline = true; this.groupBox3.Location = new System.Drawing.Point(0, 205);
this.tipsTextBox.Name = "tipsTextBox"; this.groupBox3.Name = "groupBox3";
this.tipsTextBox.ReadOnly = true; this.groupBox3.Size = new System.Drawing.Size(612, 54);
this.tipsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.groupBox3.TabIndex = 16;
this.tipsTextBox.Size = new System.Drawing.Size(614, 332); this.groupBox3.TabStop = false;
this.tipsTextBox.TabIndex = 0; //
// panelNext
//
this.panelNext.Controls.Add(this.nextStartDate);
this.panelNext.Controls.Add(this.timeUnitLab);
this.panelNext.Controls.Add(this.timeIntervalLab);
this.panelNext.Controls.Add(this.timeIntervalBox);
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.TabIndex = 23;
//
// nextStartDate
//
this.nextStartDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.nextStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.nextStartDate.Location = new System.Drawing.Point(6, 8);
this.nextStartDate.Name = "nextStartDate";
this.nextStartDate.ShowUpDown = true;
this.nextStartDate.Size = new System.Drawing.Size(200, 21);
this.nextStartDate.TabIndex = 25;
//
// 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.Name = "timeUnitLab";
this.timeUnitLab.Size = new System.Drawing.Size(45, 25);
this.timeUnitLab.TabIndex = 24;
this.timeUnitLab.Text = "分钟";
this.timeUnitLab.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// timeIntervalLab
//
this.timeIntervalLab.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.timeIntervalLab.Location = new System.Drawing.Point(226, 7);
this.timeIntervalLab.Name = "timeIntervalLab";
this.timeIntervalLab.Size = new System.Drawing.Size(70, 25);
this.timeIntervalLab.TabIndex = 23;
this.timeIntervalLab.Text = "间 隔:";
this.timeIntervalLab.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// timeIntervalBox
//
this.timeIntervalBox.Location = new System.Drawing.Point(302, 7);
this.timeIntervalBox.Name = "timeIntervalBox";
this.timeIntervalBox.Size = new System.Drawing.Size(149, 21);
this.timeIntervalBox.TabIndex = 22;
//
// panel5
//
this.panel5.Controls.Add(this.radioNext);
this.panel5.Dock = System.Windows.Forms.DockStyle.Left;
this.panel5.Location = new System.Drawing.Point(3, 17);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(80, 34);
this.panel5.TabIndex = 22;
//
// radioNext
//
this.radioNext.AutoSize = true;
this.radioNext.Location = new System.Drawing.Point(3, 12);
this.radioNext.Name = "radioNext";
this.radioNext.Size = new System.Drawing.Size(71, 16);
this.radioNext.TabIndex = 17;
this.radioNext.TabStop = true;
this.radioNext.Text = "间隔查询";
this.radioNext.UseVisualStyleBackColor = true;
//
// groupBox2
//
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.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(612, 54);
this.groupBox2.TabIndex = 15;
this.groupBox2.TabStop = false;
//
// panelFix
//
this.panelFix.Controls.Add(this.label3);
this.panelFix.Controls.Add(this.fixEndDate);
this.panelFix.Controls.Add(this.fixStartDate);
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.TabIndex = 22;
//
// label3
//
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(226, 6);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(70, 25);
this.label3.TabIndex = 23;
this.label3.Text = "到";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// fixEndDate
//
this.fixEndDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.fixEndDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.fixEndDate.Location = new System.Drawing.Point(302, 7);
this.fixEndDate.Name = "fixEndDate";
this.fixEndDate.ShowUpDown = true;
this.fixEndDate.Size = new System.Drawing.Size(200, 21);
this.fixEndDate.TabIndex = 22;
//
// fixStartDate
//
this.fixStartDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.fixStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.fixStartDate.Location = new System.Drawing.Point(6, 7);
this.fixStartDate.Name = "fixStartDate";
this.fixStartDate.ShowUpDown = true;
this.fixStartDate.Size = new System.Drawing.Size(200, 21);
this.fixStartDate.TabIndex = 21;
//
// panel3
//
this.panel3.Controls.Add(this.radioFix);
this.panel3.Dock = System.Windows.Forms.DockStyle.Left;
this.panel3.Location = new System.Drawing.Point(3, 17);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(80, 34);
this.panel3.TabIndex = 21;
//
// radioFix
//
this.radioFix.AutoSize = true;
this.radioFix.Location = new System.Drawing.Point(3, 11);
this.radioFix.Name = "radioFix";
this.radioFix.Size = new System.Drawing.Size(71, 16);
this.radioFix.TabIndex = 21;
this.radioFix.Text = "固定查询";
this.radioFix.UseVisualStyleBackColor = true;
//
// groupBox4
//
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.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(612, 42);
this.groupBox4.TabIndex = 17;
this.groupBox4.TabStop = false;
//
// label2
//
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(13, 13);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(70, 25);
this.label2.TabIndex = 23;
this.label2.Text = "项 目:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// projectComboBox
//
this.projectComboBox.FormattingEnabled = true;
this.projectComboBox.Location = new System.Drawing.Point(89, 15);
this.projectComboBox.Name = "projectComboBox";
this.projectComboBox.Size = new System.Drawing.Size(200, 20);
this.projectComboBox.TabIndex = 22;
// //
// groupBox1 // groupBox1
// //
@@ -127,6 +302,15 @@ namespace LadfDataApp
this.groupBox1.TabIndex = 14; this.groupBox1.TabIndex = 14;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
// linkBtn
//
this.linkBtn.Location = new System.Drawing.Point(483, 70);
this.linkBtn.Name = "linkBtn";
this.linkBtn.Size = new System.Drawing.Size(102, 31);
this.linkBtn.TabIndex = 21;
this.linkBtn.Text = "连接";
this.linkBtn.UseVisualStyleBackColor = true;
//
// dataBaseLab // dataBaseLab
// //
this.dataBaseLab.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dataBaseLab.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -196,228 +380,93 @@ namespace LadfDataApp
this.loginNameBox.Size = new System.Drawing.Size(200, 21); this.loginNameBox.Size = new System.Drawing.Size(200, 21);
this.loginNameBox.TabIndex = 11; this.loginNameBox.TabIndex = 11;
// //
// groupBox2 // panel2
// //
this.groupBox2.Controls.Add(this.panelFix); this.panel2.Controls.Add(this.tipsTextBox);
this.groupBox2.Controls.Add(this.panel3); this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top; this.panel2.Location = new System.Drawing.Point(0, 356);
this.groupBox2.Location = new System.Drawing.Point(0, 151); this.panel2.Name = "panel2";
this.groupBox2.Name = "groupBox2"; this.panel2.Size = new System.Drawing.Size(614, 305);
this.groupBox2.Size = new System.Drawing.Size(612, 54); this.panel2.TabIndex = 1;
this.groupBox2.TabIndex = 15;
this.groupBox2.TabStop = false;
// //
// groupBox3 // tipsTextBox
// //
this.groupBox3.Controls.Add(this.panelNext); this.tipsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.groupBox3.Controls.Add(this.panel5); this.tipsTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Top; this.tipsTextBox.Location = new System.Drawing.Point(0, 0);
this.groupBox3.Location = new System.Drawing.Point(0, 205); this.tipsTextBox.Multiline = true;
this.groupBox3.Name = "groupBox3"; this.tipsTextBox.Name = "tipsTextBox";
this.groupBox3.Size = new System.Drawing.Size(612, 54); this.tipsTextBox.ReadOnly = true;
this.groupBox3.TabIndex = 16; this.tipsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.groupBox3.TabStop = false; this.tipsTextBox.Size = new System.Drawing.Size(614, 305);
this.tipsTextBox.TabIndex = 0;
// //
// radioNext // groupBox5
// //
this.radioNext.AutoSize = true; this.groupBox5.Controls.Add(this.panelNow);
this.radioNext.Location = new System.Drawing.Point(3, 12); this.groupBox5.Controls.Add(this.panel4);
this.radioNext.Name = "radioNext"; this.groupBox5.Dock = System.Windows.Forms.DockStyle.Top;
this.radioNext.Size = new System.Drawing.Size(71, 16); this.groupBox5.Location = new System.Drawing.Point(0, 259);
this.radioNext.TabIndex = 17; this.groupBox5.Name = "groupBox5";
this.radioNext.TabStop = true; this.groupBox5.Size = new System.Drawing.Size(612, 54);
this.radioNext.Text = "间隔查询"; this.groupBox5.TabIndex = 19;
this.radioNext.UseVisualStyleBackColor = true; this.groupBox5.TabStop = false;
// //
// panel3 // panelNow
// //
this.panel3.Controls.Add(this.radioFix); this.panelNow.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Dock = System.Windows.Forms.DockStyle.Left; this.panelNow.Location = new System.Drawing.Point(83, 17);
this.panel3.Location = new System.Drawing.Point(3, 17); this.panelNow.Name = "panelNow";
this.panel3.Name = "panel3"; this.panelNow.Size = new System.Drawing.Size(526, 34);
this.panel3.Size = new System.Drawing.Size(80, 34); this.panelNow.TabIndex = 23;
this.panel3.TabIndex = 21;
// //
// radioFix // panel4
// //
this.radioFix.AutoSize = true; this.panel4.Controls.Add(this.radioNow);
this.radioFix.Location = new System.Drawing.Point(3, 11); this.panel4.Dock = System.Windows.Forms.DockStyle.Left;
this.radioFix.Name = "radioFix"; this.panel4.Location = new System.Drawing.Point(3, 17);
this.radioFix.Size = new System.Drawing.Size(71, 16); this.panel4.Name = "panel4";
this.radioFix.TabIndex = 21; this.panel4.Size = new System.Drawing.Size(80, 34);
this.radioFix.Text = "固定查询"; this.panel4.TabIndex = 22;
this.radioFix.UseVisualStyleBackColor = true;
// //
// panelFix // radioNow
// //
this.panelFix.Controls.Add(this.label3); this.radioNow.AutoSize = true;
this.panelFix.Controls.Add(this.fixEndDate); this.radioNow.Location = new System.Drawing.Point(3, 12);
this.panelFix.Controls.Add(this.fixStartDate); this.radioNow.Name = "radioNow";
this.panelFix.Dock = System.Windows.Forms.DockStyle.Fill; this.radioNow.Size = new System.Drawing.Size(71, 16);
this.panelFix.Location = new System.Drawing.Point(83, 17); this.radioNow.TabIndex = 17;
this.panelFix.Name = "panelFix"; this.radioNow.TabStop = true;
this.panelFix.Size = new System.Drawing.Size(526, 34); this.radioNow.Text = "实时查询";
this.panelFix.TabIndex = 22; this.radioNow.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(226, 6);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(70, 25);
this.label3.TabIndex = 23;
this.label3.Text = "到";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// fixEndDate
//
this.fixEndDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.fixEndDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.fixEndDate.Location = new System.Drawing.Point(302, 7);
this.fixEndDate.Name = "fixEndDate";
this.fixEndDate.ShowUpDown = true;
this.fixEndDate.Size = new System.Drawing.Size(200, 21);
this.fixEndDate.TabIndex = 22;
//
// fixStartDate
//
this.fixStartDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.fixStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.fixStartDate.Location = new System.Drawing.Point(6, 7);
this.fixStartDate.Name = "fixStartDate";
this.fixStartDate.ShowUpDown = true;
this.fixStartDate.Size = new System.Drawing.Size(200, 21);
this.fixStartDate.TabIndex = 21;
//
// panel5
//
this.panel5.Controls.Add(this.radioNext);
this.panel5.Dock = System.Windows.Forms.DockStyle.Left;
this.panel5.Location = new System.Drawing.Point(3, 17);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(80, 34);
this.panel5.TabIndex = 22;
//
// panelNext
//
this.panelNext.Controls.Add(this.nextStartDate);
this.panelNext.Controls.Add(this.timeUnitLab);
this.panelNext.Controls.Add(this.timeIntervalLab);
this.panelNext.Controls.Add(this.timeIntervalBox);
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.TabIndex = 23;
//
// nextStartDate
//
this.nextStartDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
this.nextStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.nextStartDate.Location = new System.Drawing.Point(6, 8);
this.nextStartDate.Name = "nextStartDate";
this.nextStartDate.ShowUpDown = true;
this.nextStartDate.Size = new System.Drawing.Size(200, 21);
this.nextStartDate.TabIndex = 25;
//
// 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.Name = "timeUnitLab";
this.timeUnitLab.Size = new System.Drawing.Size(45, 25);
this.timeUnitLab.TabIndex = 24;
this.timeUnitLab.Text = "分钟";
this.timeUnitLab.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// timeIntervalLab
//
this.timeIntervalLab.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.timeIntervalLab.Location = new System.Drawing.Point(226, 7);
this.timeIntervalLab.Name = "timeIntervalLab";
this.timeIntervalLab.Size = new System.Drawing.Size(70, 25);
this.timeIntervalLab.TabIndex = 23;
this.timeIntervalLab.Text = "间 隔:";
this.timeIntervalLab.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// timeIntervalBox
//
this.timeIntervalBox.Location = new System.Drawing.Point(302, 7);
this.timeIntervalBox.Name = "timeIntervalBox";
this.timeIntervalBox.Size = new System.Drawing.Size(149, 21);
this.timeIntervalBox.TabIndex = 22;
//
// linkBtn
//
this.linkBtn.Location = new System.Drawing.Point(483, 70);
this.linkBtn.Name = "linkBtn";
this.linkBtn.Size = new System.Drawing.Size(102, 31);
this.linkBtn.TabIndex = 21;
this.linkBtn.Text = "连接";
this.linkBtn.UseVisualStyleBackColor = true;
//
// groupBox4
//
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.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(612, 42);
this.groupBox4.TabIndex = 17;
this.groupBox4.TabStop = false;
//
// label2
//
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(13, 13);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(70, 25);
this.label2.TabIndex = 23;
this.label2.Text = "项 目:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// projectComboBox
//
this.projectComboBox.FormattingEnabled = true;
this.projectComboBox.Location = new System.Drawing.Point(89, 15);
this.projectComboBox.Name = "projectComboBox";
this.projectComboBox.Size = new System.Drawing.Size(200, 20);
this.projectComboBox.TabIndex = 22;
//
// startBtn
//
this.startBtn.Location = new System.Drawing.Point(483, 263);
this.startBtn.Name = "startBtn";
this.startBtn.Size = new System.Drawing.Size(102, 31);
this.startBtn.TabIndex = 18;
this.startBtn.Text = "开始同步";
this.startBtn.UseVisualStyleBackColor = true;
// //
// FrmMain // FrmMain
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(614, 635); this.ClientSize = new System.Drawing.Size(614, 661);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Controls.Add(this.loginInfoPanel); this.Controls.Add(this.loginInfoPanel);
this.Name = "FrmMain"; this.Name = "FrmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "朗速科技物联网同步平台"; this.Text = "朗速科技物联网同步平台";
this.loginInfoPanel.ResumeLayout(false); this.loginInfoPanel.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false); this.groupBox3.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panelFix.ResumeLayout(false);
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.panelNext.ResumeLayout(false); this.panelNext.ResumeLayout(false);
this.panelNext.PerformLayout(); this.panelNext.PerformLayout();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.panelFix.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.groupBox4.ResumeLayout(false); this.groupBox4.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@@ -438,4 +487,8 @@ namespace LadfDataApp
private System.Windows.Forms.Label loginNameLab; private System.Windows.Forms.Label loginNameLab;
private System.Windows.Forms.TextBox loginNameBox; private System.Windows.Forms.TextBox loginNameBox;
private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.R 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
@@ -31,12 +31,13 @@ namespace LadfDataApp
this.startBtn.Click += OnStartBtnClick; this.startBtn.Click += OnStartBtnClick;
this.radioFix.CheckedChanged += OnCheckedChanged; this.radioFix.CheckedChanged += OnCheckedChanged;
this.radioNext.CheckedChanged += OnCheckedChanged; this.radioNext.CheckedChanged += OnCheckedChanged;
this.radioNow.CheckedChanged += OnCheckedChanged;
} }
private void OnFrmMainLoad(object sender, EventArgs e) private void OnFrmMainLoad(object sender, EventArgs e)
{ {
startBtn.Enabled = false; startBtn.Enabled = false;
radioFix.Checked = true; radioNow.Checked = true;
DateTime nowDateTime = DateTime.Now; DateTime nowDateTime = DateTime.Now;
fixStartDate.Value = new DateTime(nowDateTime.Year, nowDateTime.Month, nowDateTime.Day, 0, 0, 0, 0); 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); fixEndDate.Value = new DateTime(nowDateTime.Year, nowDateTime.Month, nowDateTime.Day, 23, 59, 59, 999);
@@ -56,15 +57,27 @@ namespace LadfDataApp
if (sender == radioFix && radioFix.Checked) if (sender == radioFix && radioFix.Checked)
{ {
radioNext.Checked = false; radioNext.Checked = false;
panelFix.Enabled = true;
panelNext.Enabled = false; panelNext.Enabled = false;
radioNow.Checked = false;
panelNow.Enabled = false;
panelFix.Enabled = true;
} }
if (sender == radioNext && radioNext.Checked) if (sender == radioNext && radioNext.Checked)
{ {
radioFix.Checked = false; radioFix.Checked = false;
panelFix.Enabled = false; panelFix.Enabled = false;
radioNow.Checked = false;
panelNow.Enabled = false;
panelNext.Enabled = true; panelNext.Enabled = true;
} }
if (sender == radioNow && radioNow.Checked)
{
radioFix.Checked = false;
panelFix.Enabled = false;
radioNext.Checked = false;
panelNext.Enabled = false;
panelNow.Enabled = true;
}
} }
/// <summary> /// <summary>
/// 加载项目下拉框数据源 /// 加载项目下拉框数据源
@@ -179,6 +192,10 @@ namespace LadfDataApp
timer.Interval = 100; timer.Interval = 100;
timer.Start(); timer.Start();
} }
else if (radioNow.Checked)
{
GetDataOnlyOneWithOutHisData();
}
} }
else else
{ {
@@ -232,6 +249,52 @@ namespace LadfDataApp
} }
} }
/// <summary> /// <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> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
@@ -484,8 +547,11 @@ namespace LadfDataApp
SqlHelper.ExecuteNonQuery(projectSqlStrBuilder.ToString()); SqlHelper.ExecuteNonQuery(projectSqlStrBuilder.ToString());
} }
QueryDeviceParamStatus(deviceModel); QueryDeviceParamStatus(deviceModel);
if (!radioNow.Checked)
{
QueryDeviceParamStatusHistory(deviceModel); QueryDeviceParamStatusHistory(deviceModel);
} }
}
catch (Exception ex) catch (Exception ex)
{ {
UpdateMsg($"读取设备{deviceJObject["name"]}失败,原因:{ex.Message}\r\n"); UpdateMsg($"读取设备{deviceJObject["name"]}失败,原因:{ex.Message}\r\n");
@@ -534,6 +600,8 @@ namespace LadfDataApp
JObject resultJObject = (JObject)JsonConvert.DeserializeObject(result); JObject resultJObject = (JObject)JsonConvert.DeserializeObject(result);
string code = resultJObject["code"] + ""; string code = resultJObject["code"] + "";
if (code.Equals("200")) if (code.Equals("200"))
{
if (resultJObject.ContainsKey("data"))
{ {
JObject deviceParamJObject = (JObject)resultJObject["data"]; JObject deviceParamJObject = (JObject)resultJObject["data"];
DeviceParamModel deviceParamModel = new DeviceParamModel(); DeviceParamModel deviceParamModel = new DeviceParamModel();
@@ -597,6 +665,17 @@ namespace LadfDataApp
{ {
SqlHelper.ExecuteNonQuery(projectSqlStrBuilder.ToString()); SqlHelper.ExecuteNonQuery(projectSqlStrBuilder.ToString());
} }
UpdateMsg($"读取设备:{deviceModel.name}{deviceModel.deviceTypeName}的属性成功\r\n");
}
else
{
projectSqlStrBuilder.Append($"update LadfDeviceParamTab set status = '3' where projectid = '{deviceModel.projectId}' and deviceId = '{deviceModel.deviceId}';\r\n");
if (!string.IsNullOrEmpty(projectSqlStrBuilder.ToString()))
{
SqlHelper.ExecuteNonQuery(projectSqlStrBuilder.ToString());
}
UpdateMsg($"读取设备:{deviceModel.name}{deviceModel.deviceTypeName}的属性成功,但设备已离线\r\n");
}
} }
else if (code.Equals("4012")) else if (code.Equals("4012"))
{ {
@@ -604,7 +683,6 @@ namespace LadfDataApp
Login(); Login();
QueryDeviceParamStatus(deviceModel); QueryDeviceParamStatus(deviceModel);
} }
UpdateMsg($"读取设备:{deviceModel.name}{deviceModel.deviceTypeName}的属性成功\r\n");
} }
} }
catch (Exception ex) catch (Exception ex)