页面优化

This commit is contained in:
quowingwang 2025-10-24 09:24:26 +08:00
parent 60487d02ad
commit 5af1e6407e
3 changed files with 28 additions and 27 deletions

View File

@ -35,6 +35,8 @@
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.panel1 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.txtLUploadPL = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.btnRefresh = new System.Windows.Forms.Button();
@ -47,8 +49,6 @@
this.panelLed = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.statusStrip1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bsPF)).BeginInit();
@ -133,6 +133,28 @@
this.panel1.Size = new System.Drawing.Size(1008, 102);
this.panel1.TabIndex = 4;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.ForeColor = System.Drawing.Color.Red;
this.label4.Location = new System.Drawing.Point(772, 19);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(199, 19);
this.label4.TabIndex = 12;
this.label4.Text = "yyyy-MM-dd HH:mm:ss";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ForeColor = System.Drawing.Color.Red;
this.label3.Location = new System.Drawing.Point(648, 17);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(120, 22);
this.label3.TabIndex = 11;
this.label3.Text = "当前时间:";
//
// txtLUploadPL
//
this.txtLUploadPL.Location = new System.Drawing.Point(781, 63);
@ -239,28 +261,6 @@
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ForeColor = System.Drawing.Color.Red;
this.label3.Location = new System.Drawing.Point(648, 17);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(120, 22);
this.label3.TabIndex = 11;
this.label3.Text = "当前时间:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.ForeColor = System.Drawing.Color.Red;
this.label4.Location = new System.Drawing.Point(772, 19);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(199, 19);
this.label4.TabIndex = 12;
this.label4.Text = "yyyy-MM-dd HH:mm:ss";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@ -270,6 +270,7 @@
this.Controls.Add(this.panel1);
this.Controls.Add(this.textBoxLog);
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "孚冈-宜搭数据数据转发";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load);

View File

@ -239,6 +239,7 @@ namespace MQTT_WinformV1
MessageBox.Show("请先导入配方信息,再刷新!");
return;
}
this.button2.Enabled = false;
strPeiFangId = this.comboBox1.SelectedValue.ToString();
drPeiFang = dtPeiFang.Select("id = '" + strPeiFangId + "'")[0];
double seconds;
@ -253,6 +254,7 @@ namespace MQTT_WinformV1
}
catch (Exception ex)
{
this.button2.Enabled = true;
AppendLog($"上传宜搭失败:{ex.Message}");
}
}
@ -331,6 +333,7 @@ namespace MQTT_WinformV1
//中止上传
private void button3_Click(object sender, EventArgs e)
{
this.button2.Enabled = true;
this._timer.Enabled = false;
AppendLog("停止上传数据");
MessageBox.Show("待程序完成后,将停止自动上传", "信息", MessageBoxButtons.OK, MessageBoxIcon.Information);

View File

@ -123,9 +123,6 @@
<metadata name="bsPF.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>163, 9</value>
</metadata>
<metadata name="bsPF.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>163, 9</value>
</metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>257, 9</value>
</metadata>