Exemplo n.º 1
0
 private void writeLineNumber()  //写设置线别的文件
 {
     try
     {
         string iniFilePath = GlobalVar.gl_strTargetPath + "\\" + GlobalVar.gl_iniTBS_FileName;
         myfunction.CheckFileExit();
         MyFunctions.WritePrivateProfileString(GlobalVar.gl_inisection_Global, GlobalVar.gl_inikey_Line, GlobalVar.gl_LineName, iniFilePath);
     }
     catch { }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 写入关联类型
 /// </summary>
 /// <param name="p"></param>
 private void WriteLinkType(string p)
 {
     try
     {
         string iniFilePath = GlobalVar.gl_strTargetPath + "\\" + GlobalVar.gl_iniTBS_FileName;
         myfunction.CheckFileExit();
         MyFunctions.WritePrivateProfileString(GlobalVar.gl_inisection_Global, GlobalVar.gl_iniKey_LinkType, p, iniFilePath);
     }
     catch { }
 }
Exemplo n.º 3
0
 private void saveSettingConfig()
 {
     try
     {
         string iniFilePath = Application.StartupPath + "\\" + GlobalVar.gl_ProductModel + "\\" + GlobalVar.gl_LinkType + "\\" + GlobalVar.gl_iniTBS_FileName;
         MyFunctions.WritePrivateProfileString(GlobalVar.gl_iniSection_cam, GlobalVar.gl_inikey_Focus, m_value_Focus.ToString(), iniFilePath);
         MyFunctions.WritePrivateProfileString(GlobalVar.gl_iniSection_cam, GlobalVar.gl_inikey_Pan, m_value_Pan.ToString(), iniFilePath);
         MyFunctions.WritePrivateProfileString(GlobalVar.gl_iniSection_cam, GlobalVar.gl_inikey_Tilt, m_value_Tilt.ToString(), iniFilePath);
         MyFunctions.WritePrivateProfileString(GlobalVar.gl_iniSection_cam, GlobalVar.gl_inikey_Zoom, m_value_Zoom.ToString(), iniFilePath);
         MyFunctions.WritePrivateProfileString(GlobalVar.gl_iniSection_cam, GlobalVar.gl_inikey_Exposure, m_value_Exposure.ToString(), iniFilePath);
     }
     catch { }
 }
Exemplo n.º 4
0
        private void button_ok_Click(object sender, EventArgs e)
        {
            //if (textBox_selectUploadPath.Text.Trim() == "")
            //{
            //    MessageBox.Show("結果文件存儲(上傳)路徑為空,請選擇存儲文件夾!");
            //    this.DialogResult = System.Windows.Forms.DialogResult.None;
            //    return;
            //}
            if (textBox_selectBackUpPath.Text.Trim() == "")
            {
                MessageBox.Show("結果文件備份路徑為空,請選擇備份存儲文件夾!");
                this.DialogResult = System.Windows.Forms.DialogResult.None;
                return;
            }
            if (checkBox_savepics.Checked && textBox_picssavepath.Text.Trim() == "")
            {
                MessageBox.Show("請選擇拍照圖片存儲路徑(已經選中需要保存圖片)");
                this.DialogResult = System.Windows.Forms.DialogResult.None;
                return;
            }
            if (checkBox_saveDecodeFailPics.Checked && textBox_decodeFailPicsSavePath.Text.Trim() == "")
            {
                MessageBox.Show("請選擇解析失敗圖片存儲路徑(已經選中需要保存解析NG圖片)");
                this.DialogResult = System.Windows.Forms.DialogResult.None;
                return;
            }
            if (textBox_SpecialPath.Text.Trim() == "")
            {
//                 MessageBox.Show("特殊配置文件路徑為空,請選擇特殊配置存儲文件夾!");
//                 this.DialogResult = System.Windows.Forms.DialogResult.None;
                return;
            }
            else
            {
                GlobalVar.gl_SpecialPath = textBox_SpecialPath.Text;
                string iniFilePath = GlobalVar.gl_strTargetPath + "\\" + GlobalVar.gl_iniTBS_FileName;
                myfunc.CheckFileExit();
                MyFunctions.WritePrivateProfileString(GlobalVar.gl_inisection_Global, GlobalVar.gl_inikey_specialPath, GlobalVar.gl_SpecialPath, iniFilePath);     //特殊路径
            }
        }