Commit 69cbddcc LN

1

1 个父辈 4eaa20d8
...@@ -61,26 +61,29 @@ namespace TheMachine ...@@ -61,26 +61,29 @@ namespace TheMachine
// lblLed // lblLed
// //
this.lblLed.AutoSize = true; this.lblLed.AutoSize = true;
this.lblLed.Location = new System.Drawing.Point(38, 621); this.lblLed.Location = new System.Drawing.Point(256, 487);
this.lblLed.Name = "lblLed"; this.lblLed.Name = "lblLed";
this.lblLed.Size = new System.Drawing.Size(0, 12); this.lblLed.Size = new System.Drawing.Size(41, 12);
this.lblLed.TabIndex = 16; this.lblLed.TabIndex = 16;
this.lblLed.Text = "氛围灯";
// //
// lblOkValue // lblOkValue
// //
this.lblOkValue.AutoSize = true; this.lblOkValue.AutoSize = true;
this.lblOkValue.Location = new System.Drawing.Point(38, 578); this.lblOkValue.Location = new System.Drawing.Point(256, 454);
this.lblOkValue.Name = "lblOkValue"; this.lblOkValue.Name = "lblOkValue";
this.lblOkValue.Size = new System.Drawing.Size(0, 12); this.lblOkValue.Size = new System.Drawing.Size(65, 12);
this.lblOkValue.TabIndex = 15; this.lblOkValue.TabIndex = 15;
this.lblOkValue.Text = "压力传感器";
// //
// lblSensor // lblSensor
// //
this.lblSensor.AutoSize = true; this.lblSensor.AutoSize = true;
this.lblSensor.Location = new System.Drawing.Point(38, 539); this.lblSensor.Location = new System.Drawing.Point(256, 421);
this.lblSensor.Name = "lblSensor"; this.lblSensor.Name = "lblSensor";
this.lblSensor.Size = new System.Drawing.Size(0, 12); this.lblSensor.Size = new System.Drawing.Size(65, 12);
this.lblSensor.TabIndex = 14; this.lblSensor.TabIndex = 14;
this.lblSensor.Text = "声波传感器";
// //
// button3 // button3
// //
......
...@@ -24,6 +24,9 @@ namespace TheMachine ...@@ -24,6 +24,9 @@ namespace TheMachine
if (DesignMode) if (DesignMode)
return; return;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent; crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
lblLed.Text = "";
lblOkValue.Text = "";
lblSensor.Text = "";
} }
private void Crc_LanguageChangeEvent(object sender, EventArgs e) private void Crc_LanguageChangeEvent(object sender, EventArgs e)
...@@ -121,18 +124,25 @@ namespace TheMachine ...@@ -121,18 +124,25 @@ namespace TheMachine
{ {
roateloop = false; roateloop = false;
} }
private bool isPro = false;
private void timer1_Tick(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e)
{ {
if (!this.Visible) if (!this.Visible)
{ {
return; return;
} }
if (isPro)
{
return;
}
isPro = true;
Task.Run(() =>
{
try try
{ {
if (Setting_Init.Device_LedLight_PortName != "") if (Setting_Init.Device_LedLight_PortName != "")
{ {
lblLed.Text ="LED"+ Setting_Init.Device_LedLight_PortName+":"+ RobotManage.mainMachine.lastColor.ToString(); lblLed.Text = "LED" + Setting_Init.Device_LedLight_PortName + ":" + RobotManage.mainMachine.lastColor.ToString();
} }
else else
{ {
...@@ -158,10 +168,15 @@ namespace TheMachine ...@@ -158,10 +168,15 @@ namespace TheMachine
} }
} }
catch(Exception ex) catch (Exception ex)
{ {
LogUtil.error("出错:" + ex.ToString()); LogUtil.error("出错:" + ex.ToString());
} }
finally
{
isPro = false;
}
});
} }
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!