diff --git a/ICS/App.config b/ICS/App.config
index 3b836ca..6e91854 100644
--- a/ICS/App.config
+++ b/ICS/App.config
@@ -1,7 +1,7 @@
-
+
-
+
@@ -9,58 +9,65 @@
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
\ No newline at end of file
+
diff --git a/ICS/App.config b/ICS/App.config
index 3b836ca..6e91854 100644
--- a/ICS/App.config
+++ b/ICS/App.config
@@ -1,7 +1,7 @@
-
+
-
+
@@ -9,58 +9,65 @@
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
\ No newline at end of file
+
diff --git a/ICS/FingerPrintForm.cs b/ICS/FingerPrintForm.cs
index cf6b0a2..b16a64e 100644
--- a/ICS/FingerPrintForm.cs
+++ b/ICS/FingerPrintForm.cs
@@ -106,6 +106,7 @@
/// 关闭指纹采集设备
///
///
+
public void CloseFingerDevice(int index)
{
if (IntPtr.Zero!= fingerPrintDevHandle)
@@ -120,6 +121,7 @@
///
///
public void StartCaptureFingerPrint()
+
{
this.labelTips.Text = "请用同一个手指按压3次";
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FingerPrintForm));
@@ -222,6 +224,7 @@
log.Info("指纹采集成功");
this.Hide();
CaptureWorking = false;
+
Form1.FinalizeFingerPrint();
}
else
diff --git a/ICS/App.config b/ICS/App.config
index 3b836ca..6e91854 100644
--- a/ICS/App.config
+++ b/ICS/App.config
@@ -1,7 +1,7 @@
-
+
-
+
@@ -9,58 +9,65 @@
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
\ No newline at end of file
+
diff --git a/ICS/FingerPrintForm.cs b/ICS/FingerPrintForm.cs
index cf6b0a2..b16a64e 100644
--- a/ICS/FingerPrintForm.cs
+++ b/ICS/FingerPrintForm.cs
@@ -106,6 +106,7 @@
/// 关闭指纹采集设备
///
///
+
public void CloseFingerDevice(int index)
{
if (IntPtr.Zero!= fingerPrintDevHandle)
@@ -120,6 +121,7 @@
///
///
public void StartCaptureFingerPrint()
+
{
this.labelTips.Text = "请用同一个手指按压3次";
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FingerPrintForm));
@@ -222,6 +224,7 @@
log.Info("指纹采集成功");
this.Hide();
CaptureWorking = false;
+
Form1.FinalizeFingerPrint();
}
else
diff --git a/ICS/Form1.cs b/ICS/Form1.cs
index 5168ace..0cf9929 100644
--- a/ICS/Form1.cs
+++ b/ICS/Form1.cs
@@ -16,6 +16,8 @@
using AForge.Video.DirectShow;
using System.ComponentModel;
using libzkfpcsharp;
+using SuperSocket.Common;
+using Sample;
namespace ICS
{
@@ -152,7 +154,8 @@
log.Error("没有找到usb摄像头");
}
}
-
+
+ // 初始化指纹采集器
public void InitFingerPrintDevice()
{
int retCode = zkfp2.Init();
@@ -191,7 +194,6 @@
zkfp2.Terminate();
}
-
public void Ws_NewSessionConnected(WebSocketSession session)
{
log.Info("与客户端:" + GetSessionName(session) + "创建新会话");
@@ -351,6 +353,7 @@
string sendMsg = "";
sendMsg = CardReader.readCardInfo();
+
if (sendMsg == "")
{
sendMsg = "{\"message\":\"fail\"}";
@@ -402,7 +405,7 @@
log.Info("拍照成功,缓存路径:" + path);
// 对图像进行base64编码并返回,JPEG格式
- string sendMsg = "{\"success\":\"true\", \"image\":\"data:image/jpg;base64," + ToBase64(img) + "\"}";
+ string sendMsg = "{\"success\":\"true\", \"image\":\"data:image/jpg;base64," + Form1.ToBase64(img) + "\"}";
SendMsgToClient(reValue, sendMsg);
// 隐藏相机画面窗体
@@ -586,6 +589,7 @@
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Stop();
+ fingerForm.CloseFingerDevice(0);
}
///
@@ -787,7 +791,7 @@
catch (Exception ex)
{
log.Error("ImgToBase64String 转换失败 Exception:" + ex.Message);
- return "";
+ return "";
}
}
diff --git a/ICS/App.config b/ICS/App.config
index 3b836ca..6e91854 100644
--- a/ICS/App.config
+++ b/ICS/App.config
@@ -1,7 +1,7 @@
-
+
-
+
@@ -9,58 +9,65 @@
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
\ No newline at end of file
+
diff --git a/ICS/FingerPrintForm.cs b/ICS/FingerPrintForm.cs
index cf6b0a2..b16a64e 100644
--- a/ICS/FingerPrintForm.cs
+++ b/ICS/FingerPrintForm.cs
@@ -106,6 +106,7 @@
/// 关闭指纹采集设备
///
///
+
public void CloseFingerDevice(int index)
{
if (IntPtr.Zero!= fingerPrintDevHandle)
@@ -120,6 +121,7 @@
///
///
public void StartCaptureFingerPrint()
+
{
this.labelTips.Text = "请用同一个手指按压3次";
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FingerPrintForm));
@@ -222,6 +224,7 @@
log.Info("指纹采集成功");
this.Hide();
CaptureWorking = false;
+
Form1.FinalizeFingerPrint();
}
else
diff --git a/ICS/Form1.cs b/ICS/Form1.cs
index 5168ace..0cf9929 100644
--- a/ICS/Form1.cs
+++ b/ICS/Form1.cs
@@ -16,6 +16,8 @@
using AForge.Video.DirectShow;
using System.ComponentModel;
using libzkfpcsharp;
+using SuperSocket.Common;
+using Sample;
namespace ICS
{
@@ -152,7 +154,8 @@
log.Error("没有找到usb摄像头");
}
}
-
+
+ // 初始化指纹采集器
public void InitFingerPrintDevice()
{
int retCode = zkfp2.Init();
@@ -191,7 +194,6 @@
zkfp2.Terminate();
}
-
public void Ws_NewSessionConnected(WebSocketSession session)
{
log.Info("与客户端:" + GetSessionName(session) + "创建新会话");
@@ -351,6 +353,7 @@
string sendMsg = "";
sendMsg = CardReader.readCardInfo();
+
if (sendMsg == "")
{
sendMsg = "{\"message\":\"fail\"}";
@@ -402,7 +405,7 @@
log.Info("拍照成功,缓存路径:" + path);
// 对图像进行base64编码并返回,JPEG格式
- string sendMsg = "{\"success\":\"true\", \"image\":\"data:image/jpg;base64," + ToBase64(img) + "\"}";
+ string sendMsg = "{\"success\":\"true\", \"image\":\"data:image/jpg;base64," + Form1.ToBase64(img) + "\"}";
SendMsgToClient(reValue, sendMsg);
// 隐藏相机画面窗体
@@ -586,6 +589,7 @@
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Stop();
+ fingerForm.CloseFingerDevice(0);
}
///
@@ -787,7 +791,7 @@
catch (Exception ex)
{
log.Error("ImgToBase64String 转换失败 Exception:" + ex.Message);
- return "";
+ return "";
}
}
diff --git a/ICS/ICS.csproj b/ICS/ICS.csproj
index 445e198..e7475d5 100644
--- a/ICS/ICS.csproj
+++ b/ICS/ICS.csproj
@@ -41,6 +41,7 @@
DEBUG;TRACE
prompt
4
+ false
AnyCPU
@@ -50,6 +51,7 @@
TRACE
prompt
4
+ false
casic.ico
@@ -62,6 +64,7 @@
x86
prompt
MinimumRecommendedRules.ruleset
+ false
bin\x86\Release\
@@ -71,6 +74,7 @@
x86
prompt
MinimumRecommendedRules.ruleset
+ false
@@ -94,10 +98,14 @@
..\irisCtrl\irisCtrl\AssessEye.dll
+
+ False
+ bin\Debug\AxInterop.IrisDevCtrlLib.dll
+
..\irisCtrl\irisCtrl\CaptureEye.dll
-
+
..\irisCtrl\irisCtrl\DevComponents.DotNetBar2.dll
@@ -113,6 +121,11 @@
..\irisCtrl\irisCtrl\Interop.IAiCamIrisLib.dll
True
+
+ False
+ True
+ bin\Debug\Interop.IrisDevCtrlLib.dll
+
False
..\irisCtrl\irisCtrl\IrisCtrl.dll
@@ -175,7 +188,7 @@
Form
-
+
FingerPrintForm.cs
@@ -245,14 +258,6 @@
-
- {DEB5215A-E678-4409-8959-008A0BBC285A}
- 1
- 0
- 0
- aximp
- False
-
{DEB5215A-E678-4409-8959-008A0BBC285A}
1