91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 24.14MB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-06-13
  • 語言: 其他
  • 標(biāo)簽: 攝像頭??

資源簡介

大華攝像頭的集成demo已經(jīng)使用說明書,庫文件,頭文件,讓使用者更加方便地對攝像頭進(jìn)行二次開發(fā)

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?NetSDKCS;
using?System.Diagnostics;
using?System.Runtime.InteropServices;

namespace?AlarmDemo
{
????public?partial?class?AlarmDemo?:?Form
????{
????????private?static?fDisConnectCallBack?m_DisConnectCallBack;
????????private?static?fHaveReConnectCallBack?m_ReConnectCallBack;
????????private?static?fMessCallBackEx?m_AlarmCallBack;
????????private?const?int?ALARM_START?=?1;
????????private?const?int?ALARM_STOP?=?0;
????????private?const?int?ListViewCount?=?100;

????????private?IntPtr?m_LoginID?=?IntPtr.Zero;
????????private?NET_DEVICEINFO_Ex?m_DeviceInfo;
????????private?bool?m_IsListen?=?false;
????????private?Int64?m_ID?=?1;
????????private?List?m_ManangeAlarmInfo?=?new?List();
????????private?byte[]?data;

????????public?AlarmDemo()
????????{
????????????InitializeComponent();
????????????this.Load?+=?new?EventHandler(AlarmDemo_Load);
????????}

????????private?void?AlarmDemo_Load(object?sender?EventArgs?e)
????????{
????????????m_DisConnectCallBack?=?new?fDisConnectCallBack(DisConnectCallBack);
????????????m_ReConnectCallBack?=?new?fHaveReConnectCallBack(ReConnectCallBack);
????????????m_AlarmCallBack?=?new?fMessCallBackEx(AlarmCallBackEx);
????????????try
????????????{
????????????????NETClient.Init(m_DisConnectCallBack?IntPtr.Zero?null);
????????????????NETClient.SetAutoReconnect(m_ReConnectCallBack?IntPtr.Zero);
????????????????NETClient.SetDVRMessCallBack(m_AlarmCallBack?IntPtr.Zero);
????????????????InitOrLogoutUI();
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????MessageBox.Show(ex.Message);
????????????????Process.GetCurrentProcess().Kill();
????????????}
????????}

????????private?bool?AlarmCallBackEx(int?lCommand?IntPtr?lLoginID?IntPtr?pBuf?uint?dwBufLen?IntPtr?pchDVRIP?int?nDVRPort?bool?bAlarmAckFlag?int?nEventID?IntPtr?dwUser)
????????{
????????????EM_ALARM_TYPE?type?=?(EM_ALARM_TYPE)lCommand;
????????????switch?(type)
????????????{
????????????????case?EM_ALARM_TYPE.ALARM_ALARM_EX:
????????????????case?EM_ALARM_TYPE.MOTION_ALARM_EX:
????????????????case?EM_ALARM_TYPE.VIDEOLOST_ALARM_EX:
????????????????case?EM_ALARM_TYPE.SHELTER_ALARM_EX:
????????????????case?EM_ALARM_TYPE.DISKFULL_ALARM_EX:
????????????????case?EM_ALARM_TYPE.DISKERROR_ALARM_EX:
????????????????????data?=?new?byte[dwBufLen];
????????????????????Marshal.Copy(pBuf?data?0?(int)dwBufLen);
????????????????????for?(int?i?=?0;?i?????????????????????{
????????????????????????if?(data[i]?==?ALARM_START)?//?alarm?start?報(bào)警開始
????????????????????????{
????????????????????????????AlarmInfo?info?=?new?AlarmInfo();
????????????????????????????info.AlarmType?=?type;
????????????????????????????info.ID?=?m_ID;
????????????????????????????

評論

共有 條評論