Example #1
0
        private void 主界面_Load(object sender, EventArgs e)
        {
            #region 加载hdvp文件
            try
            {
                m_HDevEngine.SetProcedurePath(m_sHDevEnginePath);
                m_CamProcedure     = new HDevProcedure("_829test");
                m_CamProcedureCall = m_CamProcedure.CreateCall();
            }
            catch (Exception df)
            {
                string s = "a";
                // Fun_Add_lb_Info("文件读取失败!" + df.Message);
            }
            #endregion

            #region 开启作业线程
            m_AutoRunThread = new Thread(Fun_AutoRun);
            m_AutoRunThread.IsBackground = true;
            m_AutoRunThread.Start();
            Console.WriteLine("自动作业线程已开启!" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff"));
            #endregion
        }
 public void Initial_LanQuan()
 {
     LanQuan_Procedure     = new HDevProcedure("LanQuan_Detection");
     LanQuan_ProcedureCall = LanQuan_Procedure.CreateCall();
     bIsInitial            = true;
 }
Example #3
0
 public void Initial_PZT_Detection()
 {
     PTZ_Detection_Procedure     = new HDevProcedure("PZT_Detection");
     PTZ_Detection_ProcedureCall = PTZ_Detection_Procedure.CreateCall();
     bIsInitial = true;
 }
Example #4
0
 public void Initial_LM_DP()
 {
     LM_DP_Procedure     = new HDevProcedure("LuoMuDianpianDetection");
     LM_DP_ProcedureCall = LM_DP_Procedure.CreateCall();
     bIsInitial          = true;
 }
Example #5
0
 public void Initial_FangDai()
 {
     FangDai_Procedure     = new HDevProcedure("FD_Detection");
     FangDai_ProcedureCall = FangDai_Procedure.CreateCall();
     bIsInitial            = true;
 }
Example #6
0
 public void Initial_Grab_Intervene()
 {
     Grab_Intervene_Procedure     = new HDevProcedure("Grab_Intervene");
     Grab_Intervene_ProcedureCall = Grab_Intervene_Procedure.CreateCall();
     bIsInitial = true;
 }
Example #7
0
        private void SetForm_Load(object sender, EventArgs e)
        {
            #region 初始化ComboBox控件
            string PathLiaoHao = Global.m_sLiaoHaoPath;
            if (!Directory.Exists(PathLiaoHao))
            {
                Directory.CreateDirectory(PathLiaoHao);
            }

            comBox_TypeNow.Items.Clear();
            string[] str = null;
            using (FileStream fsRead = new FileStream(Global.m_sLiaoHaoPath + "\\LiaoHao.ini", FileMode.Open))
            {
                int    fsLen  = (int)fsRead.Length;
                byte[] heByte = new byte[fsLen];
                int    r      = fsRead.Read(heByte, 0, heByte.Length);
                string myStr  = System.Text.Encoding.UTF8.GetString(heByte);
                str = myStr.Split(',');
            }
            for (int i = 0; i < str.Length - 1; i++)
            {
                comBox_TypeNow.Items.Add(str[i]);
            }

            string S1 = "";
            S1 = IniAPI.INIGetStringValue(Global.m_sConfigPath + "\\System.ini", "SYSTEM", "常用料号", "");
            if (S1 != "")
            {
                comBox_TypeNow.Text = S1;
            }

            #endregion

            #region 读取曝光和增益的最大值

            int IntexposureMax = 0;
            int IntgainMax     = 0;

            string StrexposureMax = string.Empty;
            string StrgainMax     = string.Empty;

            StrexposureMax = IniAPI.INIGetStringValue(Global.m_sConfigPath + "\\System.ini", "SYSTEM", "ExposureMax", "10000");
            StrgainMax     = IniAPI.INIGetStringValue(Global.m_sConfigPath + "\\System.ini", "SYSTEM", "GainMax", "15");

            bool b1 = int.TryParse(StrexposureMax, out IntexposureMax);
            if (b1 != true)
            {
                IntexposureMax = 10000;
            }
            numUD_Exposure.Maximum = IntexposureMax;
            bool b2 = int.TryParse(StrgainMax, out IntgainMax);
            if (b2 != true)
            {
                IntgainMax = 15;
            }
            numUD_Gain.Maximum = IntgainMax;

            IniAPI.INIWriteValue(Global.m_sConfigPath + "\\System.ini", "SYSTEM", "ExposureMax", StrexposureMax);
            IniAPI.INIWriteValue(Global.m_sConfigPath + "\\System.ini", "SYSTEM", "GainMax", StrgainMax);

            #endregion

            #region 加载hdvp文件
            try
            {
                m_HDevEngine.SetProcedurePath(m_sHDevEnginePath);
                m_CamProcedure     = new HDevProcedure("_829test");
                m_CamProcedureCall = m_CamProcedure.CreateCall();
            }
            catch (Exception df)
            {
                string s = "a";
                // Fun_Add_lb_Info("文件读取失败!" + df.Message);
            }
            #endregion
        }