資源簡介
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個文件信息
評論
共有 條評論