示例#1
0
 public void Dispose()
 {
     if (HKCam != null)
     {
         HKCam.dispose();
     }
     if (camxm != null)
     {
         camxm.dispose();
     }
 }
示例#2
0
        public void stopRecord()
        {
            string filename = GetCurrentVideoFile();

            if (startRecordId)
            {
                if (HKCam.StopRecord(filename))
                {
                    startRecordId = false;
                }
                return;
            }
        }
示例#3
0
        public string takePic()
        {
            string filePath = GetCurrentImageFile();

            if (filePath == null)
            {
                return("截图路径错误!");
            }
            if (filePath != null && HKCam != null)
            {
                HKCam.Capture(filePath);

                return(filePath);
            }
            return("截图失败!");
        }
示例#4
0
        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);
        }
示例#5
0
        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";
                }
            }
        }
示例#6
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;
            }
        }
示例#7
0
        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);
        }
示例#8
0
 public bool ListHKCamView(Control c1)
 {
     (c1 as PictureBox).SizeMode = PictureBoxSizeMode.Normal;
     return(HKCam.ListView(c1));
 }
示例#9
0
 public bool LoginOutCam()
 {
     return(HKCam.CheckOut());
 }