Commit 43ce91a2 LN

1

1 个父辈 9466bc41
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
this.txtSpeed = new System.Windows.Forms.TextBox(); this.txtSpeed = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label();
this.txtFileName = new System.Windows.Forms.TextBox(); this.txtFileName = new System.Windows.Forms.TextBox();
this.ioStatusControl1 = new UserFromControl.IOStatusControl();
this.btnAbsMove = new System.Windows.Forms.Button(); this.btnAbsMove = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label();
...@@ -70,6 +69,7 @@ ...@@ -70,6 +69,7 @@
this.btnClear = new System.Windows.Forms.Button(); this.btnClear = new System.Windows.Forms.Button();
this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.ioStatusControl1 = new UserFromControl.IOStatusControl();
this.groupBox6.SuspendLayout(); this.groupBox6.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
...@@ -258,16 +258,6 @@ ...@@ -258,16 +258,6 @@
this.txtFileName.TabIndex = 278; this.txtFileName.TabIndex = 278;
this.txtFileName.Text = "position.csv"; this.txtFileName.Text = "position.csv";
// //
// ioStatusControl1
//
this.ioStatusControl1.IOName = "检测信号";
this.ioStatusControl1.IOValue = 0;
this.ioStatusControl1.isCanClick = false;
this.ioStatusControl1.Location = new System.Drawing.Point(134, 401);
this.ioStatusControl1.Name = "ioStatusControl1";
this.ioStatusControl1.Size = new System.Drawing.Size(171, 39);
this.ioStatusControl1.TabIndex = 279;
//
// btnAbsMove // btnAbsMove
// //
this.btnAbsMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnAbsMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
...@@ -488,7 +478,6 @@ ...@@ -488,7 +478,6 @@
// //
// txtIoIp // txtIoIp
// //
this.txtIoIp.Enabled = false;
this.txtIoIp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtIoIp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtIoIp.Location = new System.Drawing.Point(136, 97); this.txtIoIp.Location = new System.Drawing.Point(136, 97);
this.txtIoIp.MaxLength = 30; this.txtIoIp.MaxLength = 30;
...@@ -536,6 +525,16 @@ ...@@ -536,6 +525,16 @@
this.timer1.Interval = 1000; this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// ioStatusControl1
//
this.ioStatusControl1.IOName = "检测信号";
this.ioStatusControl1.IOValue = 0;
this.ioStatusControl1.isCanClick = false;
this.ioStatusControl1.Location = new System.Drawing.Point(134, 401);
this.ioStatusControl1.Name = "ioStatusControl1";
this.ioStatusControl1.Size = new System.Drawing.Size(171, 39);
this.ioStatusControl1.TabIndex = 279;
//
// FrmPositionTool // FrmPositionTool
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......
...@@ -109,13 +109,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -109,13 +109,9 @@ namespace OnlineStore.DeviceLibrary
try try
{ {
if (balserNameList.Contains(cameraName)) if (balserNameList.Contains(cameraName))
{ {
bool result = BaslerCamera.Instance.IsOpen; bool result = BaslerCamera.Instance.Open(cameraName);
if (!result) // LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
{
result = BaslerCamera.Instance.Open(cameraName);
LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
}
if (result) if (result)
{ {
BaslerCamera.Instance.GrabOne(); BaslerCamera.Instance.GrabOne();
...@@ -128,13 +124,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -128,13 +124,9 @@ namespace OnlineStore.DeviceLibrary
} }
} }
else if (hikNameList.Contains(cameraName)) else if (hikNameList.Contains(cameraName))
{ {
bool result = HIKCamera.Instance.IsOpen; bool result = HIKCamera.Instance.Open(cameraName);
if (!result) // LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
{
result = HIKCamera.Instance.Open(cameraName);
LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
}
if (result) if (result)
{ {
HIKCamera.Instance.GrabOne(); HIKCamera.Instance.GrabOne();
...@@ -221,7 +213,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -221,7 +213,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
// CloseCamera(); // CloseCamera();
} }
} }
catch (AccessViolationException e) catch (AccessViolationException e)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!