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

资源简介

C#基于雄迈Sdk的对画面视频监控源码

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Runtime.InteropServices;
namespace ClientDemo
{
    public partial class AddDevForm : Form
    {
        [DllImport(“NetSdk.dll“)]
        public static extern int H264_DVR_SearchDevice(IntPtr ptr int nBufLen ref int nRetLength int nSearchTime);

        private int m_nDevNum = 0;
     
        System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
        [MarshalAs(UnmanagedType.ByValArraySizeConst=1000)]
        SDK_CONFIG_NET_COMMON_V2[] m_Device = new SDK_CONFIG_NET_COMMON_V2[1000];
        Dictionary dict = new Dictionary();
        Thread searchThread;

        public AddDevForm()
        {
            InitializeComponent();
            CheckForIllegalCrossThreadCalls = false;
   
            for (int i = 0; i < 1000;i++ )
            {
                m_Device[i] = new SDK_CONFIG_NET_COMMON_V2();
            }
        }

        private void buttonCancel_Click(object sender EventArgs e)
        {
            this.Close();
        }

        private void buttonOK_Click(object sender EventArgs e)
        {
           
            
            if ( textBoxDevName.Text.Trim() != ““ 
                && textBoxIP.Text.Trim() != ““ 
                && textBoxport.Text.Trim() != ““
                && textBoxUsername.Text.Trim() != ““)
            {
                H264_DVR_DEVICEINFO dvrdevInfo = new H264_DVR_DEVICEINFO();
                int nError;
                int nLoginID = XMSDK.H264_DVR_Login(textBoxIP.Text.Trim() ushort.Parse(textBoxport.Text.Trim()) textBoxUsername.Text textBoxPassword.Text out dvrdevInfo out nError Socketstyle.TCPSOCKET);
                DEV_INFO devInfo = new DEV_INFO();
                if ( nLoginID > 0 )
                {
                    ClientDemo clientForm = new ClientDemo();

                    foreach( Form form in  Application.OpenForms)
                    {
                        if ( form.Name == “ClientDemo“ )
                        {
                            clientForm = (ClientDemo)form;
                            break;
                        }
                    }

                        
                    TreeNode nodeDev = new TreeNode();
                    nodeDev.Text = textBoxDevName.Text;
                    devInfo.szDevName = textBoxDevName.Text;
                    devInfo.lLoginID = nLoginID;
                    devInfo.nPort = Int32.Parse(textBoxport.Text.Trim());
                    devInfo.szIpaddress = textBoxIP.Text.Trim();
                    devInfo.szUserName = textBoxUsername.Text;
                    devInfo.szPsw = textBoxPassword.Text;
                    devInfo.NetDeviceInfo = dvrdevInfo;
                //  nodeDev.Tag = nLoginID;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-10-29 15:49  SpecialDemo\
     目录           0  2016-10-29 15:49  SpecialDemo\ClientDemo_C#\
     目录           0  2016-10-29 15:49  SpecialDemo\ClientDemo_C#\ClientDemo\
     文件        8806  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\AddDevForm.Designer.cs
     文件       12579  2015-06-15 10:05  SpecialDemo\ClientDemo_C#\ClientDemo\AddDevForm.cs
     文件       22338  2015-06-15 10:05  SpecialDemo\ClientDemo_C#\ClientDemo\AddDevForm.resx
     文件           1  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\ClassDiagram1.cd
     文件        8720  2015-06-15 10:05  SpecialDemo\ClientDemo_C#\ClientDemo\ClientDemo.Designer.cs
     文件       19798  2015-06-15 10:05  SpecialDemo\ClientDemo_C#\ClientDemo\ClientDemo.cs
     文件        7747  2015-06-15 10:05  SpecialDemo\ClientDemo_C#\ClientDemo\ClientDemo.csproj
     文件         567  2015-06-15 10:05  SpecialDemo\ClientDemo_C#\ClientDemo\ClientDemo.csproj.user
     文件        5814  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\ClientDemo.resx
     文件       44375  2015-06-26 16:13  SpecialDemo\ClientDemo_C#\ClientDemo\DevConfigForm.Designer.cs
     文件       29532  2015-06-15 15:07  SpecialDemo\ClientDemo_C#\ClientDemo\DevConfigForm.cs
     文件        5814  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\DevConfigForm.resx
     文件        4062  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\DevForm.Designer.cs
     文件        8009  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\DevForm.cs
     文件        6025  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\DevForm.resx
     文件       15290  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\PTZform.Designer.cs
     文件        6878  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\PTZform.cs
     文件        5814  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\PTZform.resx
     文件       31802  2015-06-26 16:13  SpecialDemo\ClientDemo_C#\ClientDemo\PlayBackForm.Designer.cs
     文件       46076  2015-06-26 16:13  SpecialDemo\ClientDemo_C#\ClientDemo\PlayBackForm.cs
     文件        5814  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\PlayBackForm.resx
     文件         474  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\Program.cs
     目录           0  2016-10-29 15:49  SpecialDemo\ClientDemo_C#\ClientDemo\Properties\
     文件        1168  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\Properties\AssemblyInfo.cs
     文件        3147  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\Properties\Resources.Designer.cs
     文件        5910  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\Properties\Resources.resx
     文件        1106  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\Properties\Settings.Designer.cs
     文件         249  2015-06-15 10:04  SpecialDemo\ClientDemo_C#\ClientDemo\Properties\Settings.settings
............此处省略60个文件信息

评论

共有 条评论