|
|
@@ -259,15 +259,14 @@ namespace CamTool
|
|
|
if (m_falarmData == null)
|
|
|
{
|
|
|
m_falarmData = new CHCNetSDK.MSGCallBack(MsgCallback);
|
|
|
- }
|
|
|
-
|
|
|
- if (CHCNetSDK.NET_DVR_SetDVRMessageCallBack_V50(acsDevices.Count - 1, m_falarmData, (IntPtr)m_userId))
|
|
|
- {
|
|
|
- log.Info(acsDevice.ip + "NET_DVR_SetDVRMessageCallBack_V50 Succeed");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- MessageBox.Show(acsDevice.ip + "NET_DVR_SetDVRMessageCallBack_V50 Fail");
|
|
|
+ if (CHCNetSDK.NET_DVR_SetDVRMessageCallBack_V50(0, m_falarmData, IntPtr.Zero))
|
|
|
+ {
|
|
|
+ log.Info(acsDevice.ip + "NET_DVR_SetDVRMessageCallBack_V50 Succeed");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show(acsDevice.ip + "NET_DVR_SetDVRMessageCallBack_V50 Fail");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -695,7 +694,8 @@ namespace CamTool
|
|
|
|
|
|
try
|
|
|
{
|
|
|
- int idx = acsDevices.FindIndex(ii => (int)pUser == ii.userId);
|
|
|
+ int userId = pAlarmer.lUserID;
|
|
|
+ int idx = acsDevices.FindIndex(i => userId == i.userId);
|
|
|
if (idx > -1)
|
|
|
{
|
|
|
AcsDevice device = acsDevices[idx];
|
|
|
@@ -703,7 +703,7 @@ namespace CamTool
|
|
|
}
|
|
|
if (szInfoBuf.Contains("MINOR_FACE_VERIFY_PASS") || szInfoBuf.Contains("MINOR_FACE_VERIFY_FAIL"))
|
|
|
{
|
|
|
- int index = acsDevices.FindIndex(i => (int)pUser == i.userId);
|
|
|
+ int index = acsDevices.FindIndex(i => userId == i.userId);
|
|
|
if (index > -1)
|
|
|
{
|
|
|
AcsDevice device = acsDevices[index];
|