diff --git a/irisMemory/IdentifyConfig.cs b/irisMemory/IdentifyConfig.cs
index 0453007..454c9c7 100644
--- a/irisMemory/IdentifyConfig.cs
+++ b/irisMemory/IdentifyConfig.cs
@@ -20,6 +20,16 @@
*/
private volatile int countTryIdentify;
+ ///
+ /// 识别开始毫秒数
+ ///
+ private long identifyStart;
+
+ ///
+ /// 识别成功结束毫秒数
+ ///
+ private long identifyEnd;
+
/**
* ★识别过程id
* ="" 表示不在识别过程中;不为空表示在识别过程中,值为找到眼的时刻值
@@ -42,18 +52,28 @@
this.CountNoEyeLast = 0;
this.CountTryIdentify = 0;
+ this.IdentifyStart = 0;
+
this.IdentifyTaskId = "";
}
- /**
- * 开始一次识别过程
- */
- public void StartIdentify(string taskId)
+ ///
+ /// 开始一次识别过程
+ ///
+ ///
+ ///
+ public void StartIdentify(string taskId, long millsecond)
{
this.CountNoEyeLast = 0;
this.countTryIdentify = 0;
this.IdentifyTaskId = taskId;
+ this.IdentifyStart = millsecond;
+ }
+
+ public void EndIdentify()
+ {
+ this.IdentifyStart = 0;
}
private static readonly IdentifyConfig identifyConfig = new IdentifyConfig();
@@ -66,6 +86,6 @@
public int CountTryIdentify { get => countTryIdentify; set => countTryIdentify = value; }
public string IdentifyTaskId { get => identifyTaskId; set => identifyTaskId = value; }
-
+ public long IdentifyStart { get => identifyStart; set => identifyStart = value; }
}
}
diff --git a/irisMemory/IdentifyConfig.cs b/irisMemory/IdentifyConfig.cs
index 0453007..454c9c7 100644
--- a/irisMemory/IdentifyConfig.cs
+++ b/irisMemory/IdentifyConfig.cs
@@ -20,6 +20,16 @@
*/
private volatile int countTryIdentify;
+ ///
+ /// 识别开始毫秒数
+ ///
+ private long identifyStart;
+
+ ///
+ /// 识别成功结束毫秒数
+ ///
+ private long identifyEnd;
+
/**
* ★识别过程id
* ="" 表示不在识别过程中;不为空表示在识别过程中,值为找到眼的时刻值
@@ -42,18 +52,28 @@
this.CountNoEyeLast = 0;
this.CountTryIdentify = 0;
+ this.IdentifyStart = 0;
+
this.IdentifyTaskId = "";
}
- /**
- * 开始一次识别过程
- */
- public void StartIdentify(string taskId)
+ ///
+ /// 开始一次识别过程
+ ///
+ ///
+ ///
+ public void StartIdentify(string taskId, long millsecond)
{
this.CountNoEyeLast = 0;
this.countTryIdentify = 0;
this.IdentifyTaskId = taskId;
+ this.IdentifyStart = millsecond;
+ }
+
+ public void EndIdentify()
+ {
+ this.IdentifyStart = 0;
}
private static readonly IdentifyConfig identifyConfig = new IdentifyConfig();
@@ -66,6 +86,6 @@
public int CountTryIdentify { get => countTryIdentify; set => countTryIdentify = value; }
public string IdentifyTaskId { get => identifyTaskId; set => identifyTaskId = value; }
-
+ public long IdentifyStart { get => identifyStart; set => identifyStart = value; }
}
}
diff --git a/irisRefactor/FrmService/Form2.cs b/irisRefactor/FrmService/Form2.cs
index 518d627..70bf7b2 100644
--- a/irisRefactor/FrmService/Form2.cs
+++ b/irisRefactor/FrmService/Form2.cs
@@ -390,5 +390,14 @@
#endregion
+ private void Form2_KeyUp(object sender, KeyEventArgs e)
+ {
+ if (Keys.Escape == e.KeyCode)
+ {
+ // 按键ESC,则退出程序
+ LogHelper.WriteWarnLog(MethodBase.GetCurrentMethod().DeclaringType, "按下ESC键,退出");
+ System.Environment.Exit(0);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/irisMemory/IdentifyConfig.cs b/irisMemory/IdentifyConfig.cs
index 0453007..454c9c7 100644
--- a/irisMemory/IdentifyConfig.cs
+++ b/irisMemory/IdentifyConfig.cs
@@ -20,6 +20,16 @@
*/
private volatile int countTryIdentify;
+ ///
+ /// 识别开始毫秒数
+ ///
+ private long identifyStart;
+
+ ///
+ /// 识别成功结束毫秒数
+ ///
+ private long identifyEnd;
+
/**
* ★识别过程id
* ="" 表示不在识别过程中;不为空表示在识别过程中,值为找到眼的时刻值
@@ -42,18 +52,28 @@
this.CountNoEyeLast = 0;
this.CountTryIdentify = 0;
+ this.IdentifyStart = 0;
+
this.IdentifyTaskId = "";
}
- /**
- * 开始一次识别过程
- */
- public void StartIdentify(string taskId)
+ ///
+ /// 开始一次识别过程
+ ///
+ ///
+ ///
+ public void StartIdentify(string taskId, long millsecond)
{
this.CountNoEyeLast = 0;
this.countTryIdentify = 0;
this.IdentifyTaskId = taskId;
+ this.IdentifyStart = millsecond;
+ }
+
+ public void EndIdentify()
+ {
+ this.IdentifyStart = 0;
}
private static readonly IdentifyConfig identifyConfig = new IdentifyConfig();
@@ -66,6 +86,6 @@
public int CountTryIdentify { get => countTryIdentify; set => countTryIdentify = value; }
public string IdentifyTaskId { get => identifyTaskId; set => identifyTaskId = value; }
-
+ public long IdentifyStart { get => identifyStart; set => identifyStart = value; }
}
}
diff --git a/irisRefactor/FrmService/Form2.cs b/irisRefactor/FrmService/Form2.cs
index 518d627..70bf7b2 100644
--- a/irisRefactor/FrmService/Form2.cs
+++ b/irisRefactor/FrmService/Form2.cs
@@ -390,5 +390,14 @@
#endregion
+ private void Form2_KeyUp(object sender, KeyEventArgs e)
+ {
+ if (Keys.Escape == e.KeyCode)
+ {
+ // 按键ESC,则退出程序
+ LogHelper.WriteWarnLog(MethodBase.GetCurrentMethod().DeclaringType, "按下ESC键,退出");
+ System.Environment.Exit(0);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/irisRefactor/FrmService/Form2.designer.cs b/irisRefactor/FrmService/Form2.designer.cs
index c80cc5b..c8b87e8 100644
--- a/irisRefactor/FrmService/Form2.designer.cs
+++ b/irisRefactor/FrmService/Form2.designer.cs
@@ -279,7 +279,9 @@
this.Name = "Form2";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form2_FormClosing);
+ this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form2_KeyUp);
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
diff --git a/irisMemory/IdentifyConfig.cs b/irisMemory/IdentifyConfig.cs
index 0453007..454c9c7 100644
--- a/irisMemory/IdentifyConfig.cs
+++ b/irisMemory/IdentifyConfig.cs
@@ -20,6 +20,16 @@
*/
private volatile int countTryIdentify;
+ ///
+ /// 识别开始毫秒数
+ ///
+ private long identifyStart;
+
+ ///
+ /// 识别成功结束毫秒数
+ ///
+ private long identifyEnd;
+
/**
* ★识别过程id
* ="" 表示不在识别过程中;不为空表示在识别过程中,值为找到眼的时刻值
@@ -42,18 +52,28 @@
this.CountNoEyeLast = 0;
this.CountTryIdentify = 0;
+ this.IdentifyStart = 0;
+
this.IdentifyTaskId = "";
}
- /**
- * 开始一次识别过程
- */
- public void StartIdentify(string taskId)
+ ///
+ /// 开始一次识别过程
+ ///
+ ///
+ ///
+ public void StartIdentify(string taskId, long millsecond)
{
this.CountNoEyeLast = 0;
this.countTryIdentify = 0;
this.IdentifyTaskId = taskId;
+ this.IdentifyStart = millsecond;
+ }
+
+ public void EndIdentify()
+ {
+ this.IdentifyStart = 0;
}
private static readonly IdentifyConfig identifyConfig = new IdentifyConfig();
@@ -66,6 +86,6 @@
public int CountTryIdentify { get => countTryIdentify; set => countTryIdentify = value; }
public string IdentifyTaskId { get => identifyTaskId; set => identifyTaskId = value; }
-
+ public long IdentifyStart { get => identifyStart; set => identifyStart = value; }
}
}
diff --git a/irisRefactor/FrmService/Form2.cs b/irisRefactor/FrmService/Form2.cs
index 518d627..70bf7b2 100644
--- a/irisRefactor/FrmService/Form2.cs
+++ b/irisRefactor/FrmService/Form2.cs
@@ -390,5 +390,14 @@
#endregion
+ private void Form2_KeyUp(object sender, KeyEventArgs e)
+ {
+ if (Keys.Escape == e.KeyCode)
+ {
+ // 按键ESC,则退出程序
+ LogHelper.WriteWarnLog(MethodBase.GetCurrentMethod().DeclaringType, "按下ESC键,退出");
+ System.Environment.Exit(0);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/irisRefactor/FrmService/Form2.designer.cs b/irisRefactor/FrmService/Form2.designer.cs
index c80cc5b..c8b87e8 100644
--- a/irisRefactor/FrmService/Form2.designer.cs
+++ b/irisRefactor/FrmService/Form2.designer.cs
@@ -279,7 +279,9 @@
this.Name = "Form2";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form2_FormClosing);
+ this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form2_KeyUp);
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
diff --git a/irisRefactor/IrisCamera/CameraController.cs b/irisRefactor/IrisCamera/CameraController.cs
index 8638037..d6085a2 100644
--- a/irisRefactor/IrisCamera/CameraController.cs
+++ b/irisRefactor/IrisCamera/CameraController.cs
@@ -134,7 +134,7 @@
// 初始化找眼预处理线程
Thread thPreIdentify = new Thread(PreIdentifyTh.GetInstance.FindEyes)
{
- Name = "PreIdentifyThread" + DateTime.Now.ToString("[yyyyMMddHHmmss]")
+ Name = "PreIdentifyThread" + DateTime.Now.ToString("[MMddHHmmss]")
};
thPreIdentify.Start();
}
diff --git a/irisMemory/IdentifyConfig.cs b/irisMemory/IdentifyConfig.cs
index 0453007..454c9c7 100644
--- a/irisMemory/IdentifyConfig.cs
+++ b/irisMemory/IdentifyConfig.cs
@@ -20,6 +20,16 @@
*/
private volatile int countTryIdentify;
+ ///
+ /// 识别开始毫秒数
+ ///
+ private long identifyStart;
+
+ ///
+ /// 识别成功结束毫秒数
+ ///
+ private long identifyEnd;
+
/**
* ★识别过程id
* ="" 表示不在识别过程中;不为空表示在识别过程中,值为找到眼的时刻值
@@ -42,18 +52,28 @@
this.CountNoEyeLast = 0;
this.CountTryIdentify = 0;
+ this.IdentifyStart = 0;
+
this.IdentifyTaskId = "";
}
- /**
- * 开始一次识别过程
- */
- public void StartIdentify(string taskId)
+ ///
+ /// 开始一次识别过程
+ ///
+ ///
+ ///
+ public void StartIdentify(string taskId, long millsecond)
{
this.CountNoEyeLast = 0;
this.countTryIdentify = 0;
this.IdentifyTaskId = taskId;
+ this.IdentifyStart = millsecond;
+ }
+
+ public void EndIdentify()
+ {
+ this.IdentifyStart = 0;
}
private static readonly IdentifyConfig identifyConfig = new IdentifyConfig();
@@ -66,6 +86,6 @@
public int CountTryIdentify { get => countTryIdentify; set => countTryIdentify = value; }
public string IdentifyTaskId { get => identifyTaskId; set => identifyTaskId = value; }
-
+ public long IdentifyStart { get => identifyStart; set => identifyStart = value; }
}
}
diff --git a/irisRefactor/FrmService/Form2.cs b/irisRefactor/FrmService/Form2.cs
index 518d627..70bf7b2 100644
--- a/irisRefactor/FrmService/Form2.cs
+++ b/irisRefactor/FrmService/Form2.cs
@@ -390,5 +390,14 @@
#endregion
+ private void Form2_KeyUp(object sender, KeyEventArgs e)
+ {
+ if (Keys.Escape == e.KeyCode)
+ {
+ // 按键ESC,则退出程序
+ LogHelper.WriteWarnLog(MethodBase.GetCurrentMethod().DeclaringType, "按下ESC键,退出");
+ System.Environment.Exit(0);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/irisRefactor/FrmService/Form2.designer.cs b/irisRefactor/FrmService/Form2.designer.cs
index c80cc5b..c8b87e8 100644
--- a/irisRefactor/FrmService/Form2.designer.cs
+++ b/irisRefactor/FrmService/Form2.designer.cs
@@ -279,7 +279,9 @@
this.Name = "Form2";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form2_FormClosing);
+ this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form2_KeyUp);
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
diff --git a/irisRefactor/IrisCamera/CameraController.cs b/irisRefactor/IrisCamera/CameraController.cs
index 8638037..d6085a2 100644
--- a/irisRefactor/IrisCamera/CameraController.cs
+++ b/irisRefactor/IrisCamera/CameraController.cs
@@ -134,7 +134,7 @@
// 初始化找眼预处理线程
Thread thPreIdentify = new Thread(PreIdentifyTh.GetInstance.FindEyes)
{
- Name = "PreIdentifyThread" + DateTime.Now.ToString("[yyyyMMddHHmmss]")
+ Name = "PreIdentifyThread" + DateTime.Now.ToString("[MMddHHmmss]")
};
thPreIdentify.Start();
}
diff --git a/irisRefactor/IrisThread/IdentifyTh.cs b/irisRefactor/IrisThread/IdentifyTh.cs
index 9b1f4e0..0981e1a 100644
--- a/irisRefactor/IrisThread/IdentifyTh.cs
+++ b/irisRefactor/IrisThread/IdentifyTh.cs
@@ -54,14 +54,8 @@
}
}
}
-
- // ProMemory.timer2.Dispose();//停止计时器
-
//跳出循环,条件是时间到、匹配成功或者正在关闭程序
- // ProMemory.irisConfig.AssessThreadRun = false;
- // ProMemory.irisConfig.EyeFinderThreadRun = false;
-
ProMemory.identifyConfig.FlagFindingEye = false;
if (ProMemory.appConfig.AuthConfig.HasTempDtAuthority)
@@ -70,35 +64,30 @@
//匹配成功
if (iMatchNumber > 0)
{
- string personId = ProMemory.proConfig.CodeListMgr.GetUserForIndex(iMatchNumber);//personId
+ string personId = ProMemory.proConfig.CodeListMgr.GetUserForIndex(iMatchNumber);// personId
+
+ long timeLast = DateTime.Now.Ticks / 10000 - ProMemory.identifyConfig.IdentifyStart;
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "匹配成功[" + ProMemory.identifyConfig.IdentifyTaskId + "][耗时" + timeLast + "ms]");
+
+ // 结束识别
+ ProMemory.identifyConfig.EndIdentify();
+
if (ProMemory.formType == "1")
Form1.GetInstance().Success(personId);
else if (ProMemory.formType == "2")
Form2.GetInstance().Success(personId);
- //int time = Convert.ToInt32(ConfigHelper.GetAppConfig("showTimeSuccess"));
+
Thread.Sleep(ProMemory.appConfig.ShowTimeSuccess);
}
- //匹配失败
- //else
- //{
- // LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
-
- // if (ProMemory.formType == "1")
- // Form1.GetInstance().Failure();
- // else if (ProMemory.formType == "2")
- // Form2.GetInstance().Failure();
- // //int time2 = Convert.ToInt32(ConfigHelper.GetAppConfig("showTimeFailure"));
- // Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
- //}
ProMemory.identifyConfig.InitConfig();
- ProMemory.jobRuning = false;
+ //ProMemory.jobRuning = false;
ProMemory.cameraController.ContinuousShot_TriggerOff();
}
catch (Exception ex)
{
- LogHelper.WriteLog(MethodBase.GetCurrentMethod().DeclaringType, "虹膜匹配线程CatchError:" + ex);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "虹膜匹配线程CatchError:" + ex);
}
}
diff --git a/irisMemory/IdentifyConfig.cs b/irisMemory/IdentifyConfig.cs
index 0453007..454c9c7 100644
--- a/irisMemory/IdentifyConfig.cs
+++ b/irisMemory/IdentifyConfig.cs
@@ -20,6 +20,16 @@
*/
private volatile int countTryIdentify;
+ ///
+ /// 识别开始毫秒数
+ ///
+ private long identifyStart;
+
+ ///
+ /// 识别成功结束毫秒数
+ ///
+ private long identifyEnd;
+
/**
* ★识别过程id
* ="" 表示不在识别过程中;不为空表示在识别过程中,值为找到眼的时刻值
@@ -42,18 +52,28 @@
this.CountNoEyeLast = 0;
this.CountTryIdentify = 0;
+ this.IdentifyStart = 0;
+
this.IdentifyTaskId = "";
}
- /**
- * 开始一次识别过程
- */
- public void StartIdentify(string taskId)
+ ///
+ /// 开始一次识别过程
+ ///
+ ///
+ ///
+ public void StartIdentify(string taskId, long millsecond)
{
this.CountNoEyeLast = 0;
this.countTryIdentify = 0;
this.IdentifyTaskId = taskId;
+ this.IdentifyStart = millsecond;
+ }
+
+ public void EndIdentify()
+ {
+ this.IdentifyStart = 0;
}
private static readonly IdentifyConfig identifyConfig = new IdentifyConfig();
@@ -66,6 +86,6 @@
public int CountTryIdentify { get => countTryIdentify; set => countTryIdentify = value; }
public string IdentifyTaskId { get => identifyTaskId; set => identifyTaskId = value; }
-
+ public long IdentifyStart { get => identifyStart; set => identifyStart = value; }
}
}
diff --git a/irisRefactor/FrmService/Form2.cs b/irisRefactor/FrmService/Form2.cs
index 518d627..70bf7b2 100644
--- a/irisRefactor/FrmService/Form2.cs
+++ b/irisRefactor/FrmService/Form2.cs
@@ -390,5 +390,14 @@
#endregion
+ private void Form2_KeyUp(object sender, KeyEventArgs e)
+ {
+ if (Keys.Escape == e.KeyCode)
+ {
+ // 按键ESC,则退出程序
+ LogHelper.WriteWarnLog(MethodBase.GetCurrentMethod().DeclaringType, "按下ESC键,退出");
+ System.Environment.Exit(0);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/irisRefactor/FrmService/Form2.designer.cs b/irisRefactor/FrmService/Form2.designer.cs
index c80cc5b..c8b87e8 100644
--- a/irisRefactor/FrmService/Form2.designer.cs
+++ b/irisRefactor/FrmService/Form2.designer.cs
@@ -279,7 +279,9 @@
this.Name = "Form2";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form2_FormClosing);
+ this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form2_KeyUp);
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
diff --git a/irisRefactor/IrisCamera/CameraController.cs b/irisRefactor/IrisCamera/CameraController.cs
index 8638037..d6085a2 100644
--- a/irisRefactor/IrisCamera/CameraController.cs
+++ b/irisRefactor/IrisCamera/CameraController.cs
@@ -134,7 +134,7 @@
// 初始化找眼预处理线程
Thread thPreIdentify = new Thread(PreIdentifyTh.GetInstance.FindEyes)
{
- Name = "PreIdentifyThread" + DateTime.Now.ToString("[yyyyMMddHHmmss]")
+ Name = "PreIdentifyThread" + DateTime.Now.ToString("[MMddHHmmss]")
};
thPreIdentify.Start();
}
diff --git a/irisRefactor/IrisThread/IdentifyTh.cs b/irisRefactor/IrisThread/IdentifyTh.cs
index 9b1f4e0..0981e1a 100644
--- a/irisRefactor/IrisThread/IdentifyTh.cs
+++ b/irisRefactor/IrisThread/IdentifyTh.cs
@@ -54,14 +54,8 @@
}
}
}
-
- // ProMemory.timer2.Dispose();//停止计时器
-
//跳出循环,条件是时间到、匹配成功或者正在关闭程序
- // ProMemory.irisConfig.AssessThreadRun = false;
- // ProMemory.irisConfig.EyeFinderThreadRun = false;
-
ProMemory.identifyConfig.FlagFindingEye = false;
if (ProMemory.appConfig.AuthConfig.HasTempDtAuthority)
@@ -70,35 +64,30 @@
//匹配成功
if (iMatchNumber > 0)
{
- string personId = ProMemory.proConfig.CodeListMgr.GetUserForIndex(iMatchNumber);//personId
+ string personId = ProMemory.proConfig.CodeListMgr.GetUserForIndex(iMatchNumber);// personId
+
+ long timeLast = DateTime.Now.Ticks / 10000 - ProMemory.identifyConfig.IdentifyStart;
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "匹配成功[" + ProMemory.identifyConfig.IdentifyTaskId + "][耗时" + timeLast + "ms]");
+
+ // 结束识别
+ ProMemory.identifyConfig.EndIdentify();
+
if (ProMemory.formType == "1")
Form1.GetInstance().Success(personId);
else if (ProMemory.formType == "2")
Form2.GetInstance().Success(personId);
- //int time = Convert.ToInt32(ConfigHelper.GetAppConfig("showTimeSuccess"));
+
Thread.Sleep(ProMemory.appConfig.ShowTimeSuccess);
}
- //匹配失败
- //else
- //{
- // LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
-
- // if (ProMemory.formType == "1")
- // Form1.GetInstance().Failure();
- // else if (ProMemory.formType == "2")
- // Form2.GetInstance().Failure();
- // //int time2 = Convert.ToInt32(ConfigHelper.GetAppConfig("showTimeFailure"));
- // Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
- //}
ProMemory.identifyConfig.InitConfig();
- ProMemory.jobRuning = false;
+ //ProMemory.jobRuning = false;
ProMemory.cameraController.ContinuousShot_TriggerOff();
}
catch (Exception ex)
{
- LogHelper.WriteLog(MethodBase.GetCurrentMethod().DeclaringType, "虹膜匹配线程CatchError:" + ex);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "虹膜匹配线程CatchError:" + ex);
}
}
diff --git a/irisRefactor/IrisThread/PreIdentifyTh.cs b/irisRefactor/IrisThread/PreIdentifyTh.cs
index 3ced240..4a24ad8 100644
--- a/irisRefactor/IrisThread/PreIdentifyTh.cs
+++ b/irisRefactor/IrisThread/PreIdentifyTh.cs
@@ -63,13 +63,13 @@
{
// 启动一次识别过程
// 1.设置id
- ProMemory.identifyConfig.StartIdentify(DateTime.Now.ToString("yyyyMMddHHmmss"));
+ ProMemory.identifyConfig.StartIdentify(DateTime.Now.ToString("yyyyMMddHHmmssfff"), DateTime.Now.Ticks / 10000);
// 启动识别线程
// ProMemory.irisConfig.IdentifyThreadRun = true;
Thread identifyThread = new Thread(IdentifyTh.GetInstance.Identify)
{
- Name = "Identify Thread" + DateTime.Now.ToString("[yyyyMMddHHmmss]")
+ Name = "Identify Thread" + DateTime.Now.ToString("[MMddHHmmss]")
};
identifyThread.Start();
@@ -86,15 +86,20 @@
if (ProMemory.identifyConfig.CountTryIdentify > Convert.ToInt32(ConfigHelper.GetAppConfig("maxTryIdentify"))) // ★连续20次尝试未识别成功则识别失败
{
if (ProMemory.appConfig.AuthConfig.HasTempDtAuthority)
+ {
ProMemory.tempRegion = Form1.GetInstance().obtainTemp();
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
+ }
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
-
- if (ProMemory.formType == "1")
- Form1.GetInstance().Failure();
- else if (ProMemory.formType == "2")
- Form2.GetInstance().Failure();
- Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ // 判断是否已经识别成功了
+ //if (ProMemory.identifyConfig.IdentifyStart == 0)
+ //{
+ if (ProMemory.formType == "1")
+ Form1.GetInstance().Failure();
+ else if (ProMemory.formType == "2")
+ Form2.GetInstance().Failure();
+ Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ //}
// 将变量清零
ProMemory.identifyConfig.InitConfig();
@@ -160,15 +165,21 @@
if (ProMemory.identifyConfig.CountTryIdentify > Convert.ToInt32(ConfigHelper.GetAppConfig("maxTryIdentify"))) // ★连续20次尝试未识别成功则识别失败
{
if (ProMemory.appConfig.AuthConfig.HasTempDtAuthority)
+ {
ProMemory.tempRegion = Form1.GetInstance().obtainTemp();
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
+ }
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
+ // 判断是否已经识别成功了
+ //if (ProMemory.identifyConfig.IdentifyStart == 0)
+ //{
+ if (ProMemory.formType == "1")
+ Form1.GetInstance().Failure();
+ else if (ProMemory.formType == "2")
+ Form2.GetInstance().Failure();
- if (ProMemory.formType == "1")
- Form1.GetInstance().Failure();
- else if (ProMemory.formType == "2")
- Form2.GetInstance().Failure();
- Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ //}
// 将变量清零
ProMemory.identifyConfig.InitConfig();
diff --git a/irisMemory/IdentifyConfig.cs b/irisMemory/IdentifyConfig.cs
index 0453007..454c9c7 100644
--- a/irisMemory/IdentifyConfig.cs
+++ b/irisMemory/IdentifyConfig.cs
@@ -20,6 +20,16 @@
*/
private volatile int countTryIdentify;
+ ///
+ /// 识别开始毫秒数
+ ///
+ private long identifyStart;
+
+ ///
+ /// 识别成功结束毫秒数
+ ///
+ private long identifyEnd;
+
/**
* ★识别过程id
* ="" 表示不在识别过程中;不为空表示在识别过程中,值为找到眼的时刻值
@@ -42,18 +52,28 @@
this.CountNoEyeLast = 0;
this.CountTryIdentify = 0;
+ this.IdentifyStart = 0;
+
this.IdentifyTaskId = "";
}
- /**
- * 开始一次识别过程
- */
- public void StartIdentify(string taskId)
+ ///
+ /// 开始一次识别过程
+ ///
+ ///
+ ///
+ public void StartIdentify(string taskId, long millsecond)
{
this.CountNoEyeLast = 0;
this.countTryIdentify = 0;
this.IdentifyTaskId = taskId;
+ this.IdentifyStart = millsecond;
+ }
+
+ public void EndIdentify()
+ {
+ this.IdentifyStart = 0;
}
private static readonly IdentifyConfig identifyConfig = new IdentifyConfig();
@@ -66,6 +86,6 @@
public int CountTryIdentify { get => countTryIdentify; set => countTryIdentify = value; }
public string IdentifyTaskId { get => identifyTaskId; set => identifyTaskId = value; }
-
+ public long IdentifyStart { get => identifyStart; set => identifyStart = value; }
}
}
diff --git a/irisRefactor/FrmService/Form2.cs b/irisRefactor/FrmService/Form2.cs
index 518d627..70bf7b2 100644
--- a/irisRefactor/FrmService/Form2.cs
+++ b/irisRefactor/FrmService/Form2.cs
@@ -390,5 +390,14 @@
#endregion
+ private void Form2_KeyUp(object sender, KeyEventArgs e)
+ {
+ if (Keys.Escape == e.KeyCode)
+ {
+ // 按键ESC,则退出程序
+ LogHelper.WriteWarnLog(MethodBase.GetCurrentMethod().DeclaringType, "按下ESC键,退出");
+ System.Environment.Exit(0);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/irisRefactor/FrmService/Form2.designer.cs b/irisRefactor/FrmService/Form2.designer.cs
index c80cc5b..c8b87e8 100644
--- a/irisRefactor/FrmService/Form2.designer.cs
+++ b/irisRefactor/FrmService/Form2.designer.cs
@@ -279,7 +279,9 @@
this.Name = "Form2";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form2_FormClosing);
+ this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form2_KeyUp);
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
diff --git a/irisRefactor/IrisCamera/CameraController.cs b/irisRefactor/IrisCamera/CameraController.cs
index 8638037..d6085a2 100644
--- a/irisRefactor/IrisCamera/CameraController.cs
+++ b/irisRefactor/IrisCamera/CameraController.cs
@@ -134,7 +134,7 @@
// 初始化找眼预处理线程
Thread thPreIdentify = new Thread(PreIdentifyTh.GetInstance.FindEyes)
{
- Name = "PreIdentifyThread" + DateTime.Now.ToString("[yyyyMMddHHmmss]")
+ Name = "PreIdentifyThread" + DateTime.Now.ToString("[MMddHHmmss]")
};
thPreIdentify.Start();
}
diff --git a/irisRefactor/IrisThread/IdentifyTh.cs b/irisRefactor/IrisThread/IdentifyTh.cs
index 9b1f4e0..0981e1a 100644
--- a/irisRefactor/IrisThread/IdentifyTh.cs
+++ b/irisRefactor/IrisThread/IdentifyTh.cs
@@ -54,14 +54,8 @@
}
}
}
-
- // ProMemory.timer2.Dispose();//停止计时器
-
//跳出循环,条件是时间到、匹配成功或者正在关闭程序
- // ProMemory.irisConfig.AssessThreadRun = false;
- // ProMemory.irisConfig.EyeFinderThreadRun = false;
-
ProMemory.identifyConfig.FlagFindingEye = false;
if (ProMemory.appConfig.AuthConfig.HasTempDtAuthority)
@@ -70,35 +64,30 @@
//匹配成功
if (iMatchNumber > 0)
{
- string personId = ProMemory.proConfig.CodeListMgr.GetUserForIndex(iMatchNumber);//personId
+ string personId = ProMemory.proConfig.CodeListMgr.GetUserForIndex(iMatchNumber);// personId
+
+ long timeLast = DateTime.Now.Ticks / 10000 - ProMemory.identifyConfig.IdentifyStart;
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "匹配成功[" + ProMemory.identifyConfig.IdentifyTaskId + "][耗时" + timeLast + "ms]");
+
+ // 结束识别
+ ProMemory.identifyConfig.EndIdentify();
+
if (ProMemory.formType == "1")
Form1.GetInstance().Success(personId);
else if (ProMemory.formType == "2")
Form2.GetInstance().Success(personId);
- //int time = Convert.ToInt32(ConfigHelper.GetAppConfig("showTimeSuccess"));
+
Thread.Sleep(ProMemory.appConfig.ShowTimeSuccess);
}
- //匹配失败
- //else
- //{
- // LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
-
- // if (ProMemory.formType == "1")
- // Form1.GetInstance().Failure();
- // else if (ProMemory.formType == "2")
- // Form2.GetInstance().Failure();
- // //int time2 = Convert.ToInt32(ConfigHelper.GetAppConfig("showTimeFailure"));
- // Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
- //}
ProMemory.identifyConfig.InitConfig();
- ProMemory.jobRuning = false;
+ //ProMemory.jobRuning = false;
ProMemory.cameraController.ContinuousShot_TriggerOff();
}
catch (Exception ex)
{
- LogHelper.WriteLog(MethodBase.GetCurrentMethod().DeclaringType, "虹膜匹配线程CatchError:" + ex);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "虹膜匹配线程CatchError:" + ex);
}
}
diff --git a/irisRefactor/IrisThread/PreIdentifyTh.cs b/irisRefactor/IrisThread/PreIdentifyTh.cs
index 3ced240..4a24ad8 100644
--- a/irisRefactor/IrisThread/PreIdentifyTh.cs
+++ b/irisRefactor/IrisThread/PreIdentifyTh.cs
@@ -63,13 +63,13 @@
{
// 启动一次识别过程
// 1.设置id
- ProMemory.identifyConfig.StartIdentify(DateTime.Now.ToString("yyyyMMddHHmmss"));
+ ProMemory.identifyConfig.StartIdentify(DateTime.Now.ToString("yyyyMMddHHmmssfff"), DateTime.Now.Ticks / 10000);
// 启动识别线程
// ProMemory.irisConfig.IdentifyThreadRun = true;
Thread identifyThread = new Thread(IdentifyTh.GetInstance.Identify)
{
- Name = "Identify Thread" + DateTime.Now.ToString("[yyyyMMddHHmmss]")
+ Name = "Identify Thread" + DateTime.Now.ToString("[MMddHHmmss]")
};
identifyThread.Start();
@@ -86,15 +86,20 @@
if (ProMemory.identifyConfig.CountTryIdentify > Convert.ToInt32(ConfigHelper.GetAppConfig("maxTryIdentify"))) // ★连续20次尝试未识别成功则识别失败
{
if (ProMemory.appConfig.AuthConfig.HasTempDtAuthority)
+ {
ProMemory.tempRegion = Form1.GetInstance().obtainTemp();
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
+ }
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
-
- if (ProMemory.formType == "1")
- Form1.GetInstance().Failure();
- else if (ProMemory.formType == "2")
- Form2.GetInstance().Failure();
- Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ // 判断是否已经识别成功了
+ //if (ProMemory.identifyConfig.IdentifyStart == 0)
+ //{
+ if (ProMemory.formType == "1")
+ Form1.GetInstance().Failure();
+ else if (ProMemory.formType == "2")
+ Form2.GetInstance().Failure();
+ Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ //}
// 将变量清零
ProMemory.identifyConfig.InitConfig();
@@ -160,15 +165,21 @@
if (ProMemory.identifyConfig.CountTryIdentify > Convert.ToInt32(ConfigHelper.GetAppConfig("maxTryIdentify"))) // ★连续20次尝试未识别成功则识别失败
{
if (ProMemory.appConfig.AuthConfig.HasTempDtAuthority)
+ {
ProMemory.tempRegion = Form1.GetInstance().obtainTemp();
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
+ }
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
+ // 判断是否已经识别成功了
+ //if (ProMemory.identifyConfig.IdentifyStart == 0)
+ //{
+ if (ProMemory.formType == "1")
+ Form1.GetInstance().Failure();
+ else if (ProMemory.formType == "2")
+ Form2.GetInstance().Failure();
- if (ProMemory.formType == "1")
- Form1.GetInstance().Failure();
- else if (ProMemory.formType == "2")
- Form2.GetInstance().Failure();
- Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ //}
// 将变量清零
ProMemory.identifyConfig.InitConfig();
diff --git a/irisRefactor/ProMemory.cs b/irisRefactor/ProMemory.cs
index 49a760f..b63ac49 100644
--- a/irisRefactor/ProMemory.cs
+++ b/irisRefactor/ProMemory.cs
@@ -35,8 +35,8 @@
public static bool goingToCloseForm = false; /*是否正在关闭程序标志*/
public static bool m_bGrabbing = false; /*是否正在拍摄标志*/
- public static int Tag_SleepTimer = 0;
- public static int Tag_IdentifyTimer = 0;
+ //public static int Tag_SleepTimer = 0;
+ //public static int Tag_IdentifyTimer = 0;
public static bool isSyning = false;
public static bool jobRuning = false;
diff --git a/irisMemory/IdentifyConfig.cs b/irisMemory/IdentifyConfig.cs
index 0453007..454c9c7 100644
--- a/irisMemory/IdentifyConfig.cs
+++ b/irisMemory/IdentifyConfig.cs
@@ -20,6 +20,16 @@
*/
private volatile int countTryIdentify;
+ ///
+ /// 识别开始毫秒数
+ ///
+ private long identifyStart;
+
+ ///
+ /// 识别成功结束毫秒数
+ ///
+ private long identifyEnd;
+
/**
* ★识别过程id
* ="" 表示不在识别过程中;不为空表示在识别过程中,值为找到眼的时刻值
@@ -42,18 +52,28 @@
this.CountNoEyeLast = 0;
this.CountTryIdentify = 0;
+ this.IdentifyStart = 0;
+
this.IdentifyTaskId = "";
}
- /**
- * 开始一次识别过程
- */
- public void StartIdentify(string taskId)
+ ///
+ /// 开始一次识别过程
+ ///
+ ///
+ ///
+ public void StartIdentify(string taskId, long millsecond)
{
this.CountNoEyeLast = 0;
this.countTryIdentify = 0;
this.IdentifyTaskId = taskId;
+ this.IdentifyStart = millsecond;
+ }
+
+ public void EndIdentify()
+ {
+ this.IdentifyStart = 0;
}
private static readonly IdentifyConfig identifyConfig = new IdentifyConfig();
@@ -66,6 +86,6 @@
public int CountTryIdentify { get => countTryIdentify; set => countTryIdentify = value; }
public string IdentifyTaskId { get => identifyTaskId; set => identifyTaskId = value; }
-
+ public long IdentifyStart { get => identifyStart; set => identifyStart = value; }
}
}
diff --git a/irisRefactor/FrmService/Form2.cs b/irisRefactor/FrmService/Form2.cs
index 518d627..70bf7b2 100644
--- a/irisRefactor/FrmService/Form2.cs
+++ b/irisRefactor/FrmService/Form2.cs
@@ -390,5 +390,14 @@
#endregion
+ private void Form2_KeyUp(object sender, KeyEventArgs e)
+ {
+ if (Keys.Escape == e.KeyCode)
+ {
+ // 按键ESC,则退出程序
+ LogHelper.WriteWarnLog(MethodBase.GetCurrentMethod().DeclaringType, "按下ESC键,退出");
+ System.Environment.Exit(0);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/irisRefactor/FrmService/Form2.designer.cs b/irisRefactor/FrmService/Form2.designer.cs
index c80cc5b..c8b87e8 100644
--- a/irisRefactor/FrmService/Form2.designer.cs
+++ b/irisRefactor/FrmService/Form2.designer.cs
@@ -279,7 +279,9 @@
this.Name = "Form2";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form2_FormClosing);
+ this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form2_KeyUp);
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
diff --git a/irisRefactor/IrisCamera/CameraController.cs b/irisRefactor/IrisCamera/CameraController.cs
index 8638037..d6085a2 100644
--- a/irisRefactor/IrisCamera/CameraController.cs
+++ b/irisRefactor/IrisCamera/CameraController.cs
@@ -134,7 +134,7 @@
// 初始化找眼预处理线程
Thread thPreIdentify = new Thread(PreIdentifyTh.GetInstance.FindEyes)
{
- Name = "PreIdentifyThread" + DateTime.Now.ToString("[yyyyMMddHHmmss]")
+ Name = "PreIdentifyThread" + DateTime.Now.ToString("[MMddHHmmss]")
};
thPreIdentify.Start();
}
diff --git a/irisRefactor/IrisThread/IdentifyTh.cs b/irisRefactor/IrisThread/IdentifyTh.cs
index 9b1f4e0..0981e1a 100644
--- a/irisRefactor/IrisThread/IdentifyTh.cs
+++ b/irisRefactor/IrisThread/IdentifyTh.cs
@@ -54,14 +54,8 @@
}
}
}
-
- // ProMemory.timer2.Dispose();//停止计时器
-
//跳出循环,条件是时间到、匹配成功或者正在关闭程序
- // ProMemory.irisConfig.AssessThreadRun = false;
- // ProMemory.irisConfig.EyeFinderThreadRun = false;
-
ProMemory.identifyConfig.FlagFindingEye = false;
if (ProMemory.appConfig.AuthConfig.HasTempDtAuthority)
@@ -70,35 +64,30 @@
//匹配成功
if (iMatchNumber > 0)
{
- string personId = ProMemory.proConfig.CodeListMgr.GetUserForIndex(iMatchNumber);//personId
+ string personId = ProMemory.proConfig.CodeListMgr.GetUserForIndex(iMatchNumber);// personId
+
+ long timeLast = DateTime.Now.Ticks / 10000 - ProMemory.identifyConfig.IdentifyStart;
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "匹配成功[" + ProMemory.identifyConfig.IdentifyTaskId + "][耗时" + timeLast + "ms]");
+
+ // 结束识别
+ ProMemory.identifyConfig.EndIdentify();
+
if (ProMemory.formType == "1")
Form1.GetInstance().Success(personId);
else if (ProMemory.formType == "2")
Form2.GetInstance().Success(personId);
- //int time = Convert.ToInt32(ConfigHelper.GetAppConfig("showTimeSuccess"));
+
Thread.Sleep(ProMemory.appConfig.ShowTimeSuccess);
}
- //匹配失败
- //else
- //{
- // LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
-
- // if (ProMemory.formType == "1")
- // Form1.GetInstance().Failure();
- // else if (ProMemory.formType == "2")
- // Form2.GetInstance().Failure();
- // //int time2 = Convert.ToInt32(ConfigHelper.GetAppConfig("showTimeFailure"));
- // Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
- //}
ProMemory.identifyConfig.InitConfig();
- ProMemory.jobRuning = false;
+ //ProMemory.jobRuning = false;
ProMemory.cameraController.ContinuousShot_TriggerOff();
}
catch (Exception ex)
{
- LogHelper.WriteLog(MethodBase.GetCurrentMethod().DeclaringType, "虹膜匹配线程CatchError:" + ex);
+ LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "虹膜匹配线程CatchError:" + ex);
}
}
diff --git a/irisRefactor/IrisThread/PreIdentifyTh.cs b/irisRefactor/IrisThread/PreIdentifyTh.cs
index 3ced240..4a24ad8 100644
--- a/irisRefactor/IrisThread/PreIdentifyTh.cs
+++ b/irisRefactor/IrisThread/PreIdentifyTh.cs
@@ -63,13 +63,13 @@
{
// 启动一次识别过程
// 1.设置id
- ProMemory.identifyConfig.StartIdentify(DateTime.Now.ToString("yyyyMMddHHmmss"));
+ ProMemory.identifyConfig.StartIdentify(DateTime.Now.ToString("yyyyMMddHHmmssfff"), DateTime.Now.Ticks / 10000);
// 启动识别线程
// ProMemory.irisConfig.IdentifyThreadRun = true;
Thread identifyThread = new Thread(IdentifyTh.GetInstance.Identify)
{
- Name = "Identify Thread" + DateTime.Now.ToString("[yyyyMMddHHmmss]")
+ Name = "Identify Thread" + DateTime.Now.ToString("[MMddHHmmss]")
};
identifyThread.Start();
@@ -86,15 +86,20 @@
if (ProMemory.identifyConfig.CountTryIdentify > Convert.ToInt32(ConfigHelper.GetAppConfig("maxTryIdentify"))) // ★连续20次尝试未识别成功则识别失败
{
if (ProMemory.appConfig.AuthConfig.HasTempDtAuthority)
+ {
ProMemory.tempRegion = Form1.GetInstance().obtainTemp();
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
+ }
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
-
- if (ProMemory.formType == "1")
- Form1.GetInstance().Failure();
- else if (ProMemory.formType == "2")
- Form2.GetInstance().Failure();
- Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ // 判断是否已经识别成功了
+ //if (ProMemory.identifyConfig.IdentifyStart == 0)
+ //{
+ if (ProMemory.formType == "1")
+ Form1.GetInstance().Failure();
+ else if (ProMemory.formType == "2")
+ Form2.GetInstance().Failure();
+ Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ //}
// 将变量清零
ProMemory.identifyConfig.InitConfig();
@@ -160,15 +165,21 @@
if (ProMemory.identifyConfig.CountTryIdentify > Convert.ToInt32(ConfigHelper.GetAppConfig("maxTryIdentify"))) // ★连续20次尝试未识别成功则识别失败
{
if (ProMemory.appConfig.AuthConfig.HasTempDtAuthority)
+ {
ProMemory.tempRegion = Form1.GetInstance().obtainTemp();
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
+ }
- LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "未知人员温度:" + ProMemory.tempString.ToString());
+ // 判断是否已经识别成功了
+ //if (ProMemory.identifyConfig.IdentifyStart == 0)
+ //{
+ if (ProMemory.formType == "1")
+ Form1.GetInstance().Failure();
+ else if (ProMemory.formType == "2")
+ Form2.GetInstance().Failure();
- if (ProMemory.formType == "1")
- Form1.GetInstance().Failure();
- else if (ProMemory.formType == "2")
- Form2.GetInstance().Failure();
- Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ Thread.Sleep(ProMemory.appConfig.ShowTimeFailure);
+ //}
// 将变量清零
ProMemory.identifyConfig.InitConfig();
diff --git a/irisRefactor/ProMemory.cs b/irisRefactor/ProMemory.cs
index 49a760f..b63ac49 100644
--- a/irisRefactor/ProMemory.cs
+++ b/irisRefactor/ProMemory.cs
@@ -35,8 +35,8 @@
public static bool goingToCloseForm = false; /*是否正在关闭程序标志*/
public static bool m_bGrabbing = false; /*是否正在拍摄标志*/
- public static int Tag_SleepTimer = 0;
- public static int Tag_IdentifyTimer = 0;
+ //public static int Tag_SleepTimer = 0;
+ //public static int Tag_IdentifyTimer = 0;
public static bool isSyning = false;
public static bool jobRuning = false;
diff --git a/irisRefactor/irisRefactor.csproj b/irisRefactor/irisRefactor.csproj
index ac8dd87..c827b36 100644
--- a/irisRefactor/irisRefactor.csproj
+++ b/irisRefactor/irisRefactor.csproj
@@ -158,9 +158,7 @@
-
-