11-硬件读写/视频采集卡读写/VideoMonitor/frmMain.cs
(开头部分) 29KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
//添加的命名空间
using VideoMonitor.CommonClass;
using System.IO.Ports;
using Microsoft.Win32;
using System.Threading;
using System.Runtime.InteropServices;
using System.IO;
namespace VideoMonitor
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
#region 定义公共变量,并实例化公共类对象
PelcoD pelcod = new PelcoD();
SoftReg softreg = new SoftReg();
CommonClass.DataOperate dataoperate = new VideoMonitor.CommonClass.DataOperate();
string strName = Application.StartupPath + "\\VideoSet.ini";//定义要读取的INI文件
SerialPort serialPort = new SerialPort("COM1", 9600, Parity.None, 8);
int m_dwDevNum = 0;
byte addressin = Byte.Parse(Convert.ToString(0x01));
byte speedin = Byte.Parse(Convert.ToString(0xff));
byte[] messagesend;
string strFrequency = ""; //记录录像频率
int intHour = 0; //记录录像小时
int intMin = 0; //记录录像分钟
string strWeek = ""; //记录录像星期
string strDate = ""; //记录录像日期
static DateTime dtLTime;
static int intFlag = 0;
#endregion
//窗体加载时,初始化视频卡,并开始预览视频
private void frmMain_Load(object sender, EventArgs e)
{
frmWelcome frmwelcome = new frmWelcome();
frmwelcome.ShowDialog();
dtLTime = DateTime.Now;
timer1.Start();
timer2.Start();
setVideoBG("");
plVideo1.BorderStyle = BorderStyle.Fixed3D;
RegistryKey retkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("software", true).CreateSubKey("wxk").CreateSubKey("wxk.INI");
foreach (string strRNum in retkey.GetSubKeyNames())//判断是否注册
{
if (strRNum == softreg.getRNum())
{
this.Text = "视频监控模块(已注册)";
btnReg.Enabled = false;
后面还有 675 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
