public void Dispose() { if (HKCam != null) { HKCam.dispose(); } if (camxm != null) { camxm.dispose(); } }
public void stopRecord() { string filename = GetCurrentVideoFile(); if (startRecordId) { if (HKCam.StopRecord(filename)) { startRecordId = false; } return; } }
public string takePic() { string filePath = GetCurrentImageFile(); if (filePath == null) { return("截图路径错误!"); } if (filePath != null && HKCam != null) { HKCam.Capture(filePath); return(filePath); } return("截图失败!"); }
public bool startRecord() { string filename = GetCurrentVideoFile(); if (filename == null) { MessageBox.Show("视频保存路径错误!"); return(false); } if (HKCam != null && startRecordId == false) { startRecordId = HKCam.StartRecord(filename); return(true); } return(false); }
public void ShowDistance() { //获取卷线盘运算距离 string s = JxpRealLen.ToString("0.00"); if (Jxp != null && !oldCodedata.Equals(s)) { HKCam.StringAddTest(0, "距离:" + s + "M", 350, 600); oldCodedata = s; } else { if (Jxp == null && oldCodedata == "") { HKCam.StringAddTest(0, "距离:0M", 450, 600); oldCodedata = "0"; } } }
public void ShowHKInfo() { if (PrjName != prj.PrjName) { HKCam.StringAddTest(1, prj.PrjName, 10, 15); PrjName = prj.PrjName; } if (InsQdJingHao != prj.InsQdJingHao) { HKCam.StringAddTest(2, prj.InsQdJingHao + "---" + prj.InsZdJingHao, 10, 50); InsQdJingHao = prj.InsQdJingHao; } if (InsGuanDuanDiameter != prj.InsGuanDuanDiameter) { HKCam.StringAddTest(3, "DN" + prj.InsGuanDuanDiameter + "mm", 10, 95); InsGuanDuanDiameter = prj.InsGuanDuanDiameter; } }
public bool LoginInCam() { if (config != null) { string ip = config.ReadConfig(ParamStr, configStr, sysInfo.param[4]); string port = config.ReadConfig(ParamStr, configStr, sysInfo.param[5]); string userName = config.ReadConfig(ParamStr, configStr, sysInfo.param[6]); string pwd = config.ReadConfig(ParamStr, configStr, sysInfo.param[7]); int portInt = -1; if (!string.IsNullOrWhiteSpace(ip) && !string.IsNullOrWhiteSpace(port) && !string.IsNullOrWhiteSpace(userName) && !string.IsNullOrWhiteSpace(pwd) && int.TryParse(port, out portInt) && HKCam != null ) { return(HKCam.Login(ip, portInt, userName, pwd)); } } return(false); }
public bool ListHKCamView(Control c1) { (c1 as PictureBox).SizeMode = PictureBoxSizeMode.Normal; return(HKCam.ListView(c1)); }
public bool LoginOutCam() { return(HKCam.CheckOut()); }