• 大小: 8.71MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-17
  • 语言: C#
  • 标签: C#  

资源简介

海康威视车牌识别抓拍源代码,可以在这个基础上修改,亲测好用。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using System.Runtime.InteropServices;
using System.Diagnostics;

namespace PreviewDemo
{
    public partial class AlarmConfig : Form
    {
        public AlarmConfig()
        {
            InitializeComponent();
        }

        private void AlarmConfig_Load(object sender EventArgs e)
        {
            GetAlarmInConfig();
            GetAlarmOutConfig();

            InitWnd();

        }
        
        private void InitWnd()
        {
            string str;
            for (int i = 0; i < m_iAlarmInNum; i++ )
            {
                str = String.Format(“AlarmIn{0}“ i+1);
                comboBoxAlarmIn.Items.Add(str);
            }

            for (int i = 0; i < m_iAlarmOutNum; i++ )
            {
                str = String.Format(“AlarmOut{0}“ i+1);
                comboBoxAlarmOut.Items.Add(str);
            }
            comboBoxAlarmType.Items.Add(“Normally open“);
            comboBoxAlarmType.Items.Add(“Normally close“);

    //  0-5秒,1-10秒,2-30秒,3-1分钟,4-2分钟,5-5分钟,6-10分钟,7-手动,0xff-为无限
            int nIndex = 0;
            comboBoxAlarmOutDelay.Items.Insert(nIndex “5s“);
            nIndex++;
            comboBoxAlarmOutDelay.Items.Insert(nIndex “10s“);
            nIndex++;
            comboBoxAlarmOutDelay.Items.Insert(nIndex “20s“);
            nIndex++;
            comboBoxAlarmOutDelay.Items.Insert(nIndex “1min“);
            nIndex++;
            comboBoxAlarmOutDelay.Items.Insert(nIndex “2min“);
            nIndex++;
            comboBoxAlarmOutDelay.Items.Insert(nIndex “5min“);
            nIndex++;
            comboBoxAlarmOutDelay.Items.Insert(nIndex “10min“);
            nIndex++;
            comboBoxAlarmOutDelay.Items.Insert(nIndex “Manual“);
            nIndex++;

            comboBoxAlarmIn.SelectedIndex = 0;
            comboBoxAlarmOut.SelectedIndex = 0;
            comboBoxAlarmOutDelay.SelectedIndex = 0;
        }

        private bool GetAlarmInConfig()
        {
            Int32 nSize = Marshal.SizeOf(m_struAlarmInCfg);
            IntPtr ptrAlarmInCfg = Marshal.AllocHGlobal(nSize);
            Marshal.StructureToPtr(m_struAlarmInCfg ptrAlarmInCfg false);
            UInt32 dwReturn = 0;
            bool bRet = false;
            Int32 lAlarmIn = comboBoxAlarmIn.SelectedIndex;
            bRet = CHCNetSDK.NET_DVR_GetDVRConfig(m_lUserID CHCNetSDK.NET_DVR_GET_ALARMINCFG_V30 lAlarmIn ptrAlarmInCfg (UInt32)nSize ref dwReturn);
            if (bRet)
            {
                Debug.Print(“Succ to NET_DVR_GET_ALARAMINCFG_V30“);

                m_struAlarmInCfg = (CHCNetSDK.NET_DVR_ALARMINCFG_V30)Marshal.PtrToStructure(ptrAlarmInCfg typeof(CHCNetSDK.NET_DVR_ALARMINCFG_V30));

            }
            else
            {
            

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        934  2010-11-24 16:06  PreviewDemo.sln

     文件       2752  2009-08-24 20:58  UpgradeLog.xml

     文件       6875  2010-11-24 09:52  UpgradeLog2.xml

     文件       3348  2010-11-24 09:52  _UpgradeReport_Files\UpgradeReport.css

     文件      12505  2010-05-04 01:19  _UpgradeReport_Files\UpgradeReport.xslt

     文件         69  2010-11-24 09:52  _UpgradeReport_Files\UpgradeReport_Minus.gif

     文件         71  2010-11-24 09:52  _UpgradeReport_Files\UpgradeReport_Plus.gif

     文件       8951  2010-10-21 13:53  Backup\PreviewDemo\AlarmConfig.cs

     文件      14352  2010-10-21 15:27  Backup\PreviewDemo\AlarmConfig.Designer.cs

     文件       5814  2010-10-21 13:52  Backup\PreviewDemo\AlarmConfig.resx

     文件       1078  2009-08-19 08:49  Backup\PreviewDemo\App.ico

     文件       1859  2009-08-19 08:49  Backup\PreviewDemo\AssemblyInfo.cs

     文件     372101  2010-10-20 10:26  Backup\PreviewDemo\HCNetSDK.cs

     文件      22143  2010-10-21 09:04  Backup\PreviewDemo\MotionDetect.cs

     文件      60445  2010-10-20 20:14  Backup\PreviewDemo\MotionDetect.Designer.cs

     文件       5814  2010-10-20 20:14  Backup\PreviewDemo\MotionDetect.resx

     文件      28252  2010-03-15 14:48  Backup\PreviewDemo\PlayCtrl.cs

     文件      71234  2010-10-21 15:39  Backup\PreviewDemo\Preview.cs

     文件       5814  2010-10-21 15:29  Backup\PreviewDemo\Preview.resx

     文件       6193  2010-10-21 15:26  Backup\PreviewDemo\PreviewDemo.csproj

     文件       2081  2009-08-24 20:57  Backup\PreviewDemo\PreviewDemo.csproj.user

     文件       2846  2010-03-12 14:45  Backup\PreviewDemo\Properties\Resources.Designer.cs

     文件       5817  2010-03-12 14:45  Backup\PreviewDemo\Properties\Resources.resx

     文件       2026  2010-10-21 15:47  Backup\PreviewDemo\PTZCtrl.cs

     文件       5222  2010-10-21 15:39  Backup\PreviewDemo\PTZCtrl.Designer.cs

     文件       5814  2010-10-21 15:39  Backup\PreviewDemo\PTZCtrl.resx

     文件       2333  2010-10-21 10:16  Backup\PreviewDemo\VoiceTalk.cs

     文件       5590  2010-10-21 15:28  Backup\PreviewDemo\VoiceTalk.Designer.cs

     文件       5814  2010-10-20 20:55  Backup\PreviewDemo\VoiceTalk.resx

     文件        918  2009-08-24 20:58  Backup\PreviewDemo.sln

............此处省略61个文件信息

评论

共有 条评论