Commit b20011b1 LN

bug修改

1 个父辈 f018458b
...@@ -127,6 +127,7 @@ namespace DeviceLibrary ...@@ -127,6 +127,7 @@ namespace DeviceLibrary
string bitmapfilename = ""; string bitmapfilename = "";
if (cameraNameList == null || cameraNameList.Count <= 0) if (cameraNameList == null || cameraNameList.Count <= 0)
{ {
LogUtil.error("CameraScan方法没有传入相机名称");
throw new Exception("CameraScan方法没有传入相机名称."); throw new Exception("CameraScan方法没有传入相机名称.");
} }
......
...@@ -149,8 +149,12 @@ namespace DeviceLibrary ...@@ -149,8 +149,12 @@ namespace DeviceLibrary
{ {
return; return;
} }
//未启动:黑色
//红色: 急停, //红色: 急停,
//黄色:忙碌
//绿色:待机
//紫色: 异常, //紫色: 异常,
//蓝绿: 待机 //蓝绿: 待机
//流动绿: 入库 //流动绿: 入库
...@@ -253,7 +257,7 @@ namespace DeviceLibrary ...@@ -253,7 +257,7 @@ namespace DeviceLibrary
} }
else if (hasAlarm) else if (hasAlarm)
{ {
//色: 异常, //色: 异常,
ShowBlink(Color.Red, "hasAlarm"); ShowBlink(Color.Red, "hasAlarm");
} //温度超限 } //温度超限
...@@ -272,7 +276,7 @@ namespace DeviceLibrary ...@@ -272,7 +276,7 @@ namespace DeviceLibrary
//} //}
else else
{ {
//待机 蓝绿 //绿色:待机
//ShowColor(Color.FromArgb(0, 255, 64), "waiting"); //ShowColor(Color.FromArgb(0, 255, 64), "waiting");
ShowBlink(Color.Green, "waiting"); ShowBlink(Color.Green, "waiting");
} }
......
...@@ -851,7 +851,10 @@ namespace DeviceLibrary ...@@ -851,7 +851,10 @@ namespace DeviceLibrary
{ {
if (!lastStringSafetyStatus) if (!lastStringSafetyStatus)
{ {
StringDoor.ResumeSingle(); if (StringDoor != null)
{
StringDoor.ResumeSingle();
}
lastStringSafetyStatus = true; lastStringSafetyStatus = true;
} }
} }
......
...@@ -46,6 +46,7 @@ namespace TheMachineNView ...@@ -46,6 +46,7 @@ namespace TheMachineNView
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.uC_LedConfig1 = new TheMachineNView.UC_LedConfig(); this.uC_LedConfig1 = new TheMachineNView.UC_LedConfig();
this.uC_SetUserPassword1 = new TheMachineNView.UC_SetUserPassword(); this.uC_SetUserPassword1 = new TheMachineNView.UC_SetUserPassword();
this.button2 = new System.Windows.Forms.Button();
this.tp.SuspendLayout(); this.tp.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -124,13 +125,12 @@ namespace TheMachineNView ...@@ -124,13 +125,12 @@ namespace TheMachineNView
// //
// button1 // button1
// //
this.button1.Location = new System.Drawing.Point(475, 636); this.button1.Location = new System.Drawing.Point(435, 661);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(102, 48); this.button1.Size = new System.Drawing.Size(149, 33);
this.button1.TabIndex = 7; this.button1.TabIndex = 7;
this.button1.Text = "button1"; this.button1.Text = "reelTest";
this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click_1); this.button1.Click += new System.EventHandler(this.button1_Click_1);
// //
// tp // tp
...@@ -248,10 +248,21 @@ namespace TheMachineNView ...@@ -248,10 +248,21 @@ namespace TheMachineNView
this.uC_SetUserPassword1.TabIndex = 8; this.uC_SetUserPassword1.TabIndex = 8;
this.uC_SetUserPassword1.Tag = "not"; this.uC_SetUserPassword1.Tag = "not";
// //
// button2
//
this.button2.Location = new System.Drawing.Point(435, 709);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(149, 33);
this.button2.TabIndex = 11;
this.button2.Text = "scanTest";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button1_Click);
//
// SettingControl // SettingControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScroll = true; this.AutoScroll = true;
this.Controls.Add(this.button2);
this.Controls.Add(this.tp); this.Controls.Add(this.tp);
this.Controls.Add(this.uC_LedConfig1); this.Controls.Add(this.uC_LedConfig1);
this.Controls.Add(this.uC_SetUserPassword1); this.Controls.Add(this.uC_SetUserPassword1);
...@@ -284,5 +295,6 @@ namespace TheMachineNView ...@@ -284,5 +295,6 @@ namespace TheMachineNView
private System.Windows.Forms.Label lblMaxY; private System.Windows.Forms.Label lblMaxY;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lblYa; private System.Windows.Forms.Label lblYa;
private System.Windows.Forms.Button button2;
} }
} }
...@@ -153,7 +153,12 @@ namespace TheMachineNView ...@@ -153,7 +153,12 @@ namespace TheMachineNView
private void button1_Click_1(object sender, EventArgs e) private void button1_Click_1(object sender, EventArgs e)
{ {
Task.Run(() => CodeManager.TestHasReel(CodeManager.hikNameList[0], out _, out _)); if (CodeManager.hikNameList.Count <= 0)
{
LogUtil.error("reelTest 测试失败:未找到海康相机");
return;
}
Task.Run(() => CodeManager.TestHasReel(CodeManager.hikNameList[0], out string srcImage, out string pciImage));
} }
......
...@@ -55,7 +55,9 @@ namespace TheMachineNView ...@@ -55,7 +55,9 @@ namespace TheMachineNView
FillBoxPos(); FillBoxPos();
RobotManage.mainMachine.InOutEndProcessEvent += Store_InOutEndProcessEvent; RobotManage.mainMachine.InOutEndProcessEvent += Store_InOutEndProcessEvent;
timer1.Enabled = true; timer1.Enabled = true;
typeof(DataGridView).InvokeMember("DoubleBuffered",
BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.SetProperty,
null, this.dataGridView1, new object[] { true });
if (!RobotManage.haveFixpos) if (!RobotManage.haveFixpos)
cb_fixpos.Visible = false; cb_fixpos.Visible = false;
return; return;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!