private void LoadYeild_Load(object sender, EventArgs e) { string filePath = Application.StartupPath + @"\CONFIG.ini"; if (!File.Exists(filePath)) { File.Create(filePath); Config config = new Config(); config.Show(); return; } StringBuilder str_tmp = new StringBuilder(); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Yeild, GlobalVar.gl_key_check_AVI1, "0", str_tmp, 50, filePath); GlobalVar.gl_val_check_AVI1 = str_tmp.ToString(); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Yeild, GlobalVar.gl_key_check_AVI2, "0", str_tmp, 50, filePath); GlobalVar.gl_val_check_AVI2 = str_tmp.ToString(); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Yeild, GlobalVar.gl_key_check_AVI3, "0", str_tmp, 50, filePath); GlobalVar.gl_val_check_AVI3 = str_tmp.ToString(); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Yeild, GlobalVar.gl_key_check_stations, "0", str_tmp, 50, filePath); GlobalVar.gl_val_check_stations = str_tmp.ToString(); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Yeild, GlobalVar.gl_key_check_stationscount, "1", str_tmp, 50, filePath); GlobalVar.gl_val_check_stationscount = str_tmp.ToString(); LoadControls(); }
//读取配置信息 private void loadConfig() { try { string filepath = Application.StartupPath + @"\CONFIG.ini"; if (!File.Exists(filepath)) { File.Create(filepath); Config config = new Config(); config.ShowDialog(); return; } #region 读取config配置 //AVI-1主站测试结果 StringBuilder str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S1_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S1_TestResult = str_tmp.ToString(); //AVI-1从站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S2_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S2_TestResult = str_tmp.ToString(); //AVI-1从站副测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S3_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S3_TestResult = str_tmp.ToString(); //AVI-1主站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S1_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S1_TestVal = str_tmp.ToString(); //AVI-1从站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S2_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S2_TestVal = str_tmp.ToString(); //AVI-1从站副测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S3_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S3_TestVal = str_tmp.ToString(); //AVI-2主站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S1_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S1_TestResult = str_tmp.ToString(); //AVI-2从站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S2_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S2_TestResult = str_tmp.ToString(); //AVI-2从站副测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S3_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S3_TestResult = str_tmp.ToString(); //AVI-2主站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S1_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S1_TestVal = str_tmp.ToString(); //AVI-2从站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S2_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S2_TestVal = str_tmp.ToString(); //AVI-2从站副测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S3_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S3_TestVal = str_tmp.ToString(); //AVI-3主站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S1_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S1_TestResult = str_tmp.ToString(); //AVI-3从站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S2_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S2_TestResult = str_tmp.ToString(); //AVI-3从站副测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S3_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S3_TestResult = str_tmp.ToString(); //AVI-3主站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S1_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S1_TestVal = str_tmp.ToString(); //AVI-3从站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S2_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S2_TestVal = str_tmp.ToString(); //AVI-3从站副测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S3_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S3_TestVal = str_tmp.ToString(); //AVI-1是否启用 str_tmp = new StringBuilder(50); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_Check, "", str_tmp, 50, filepath); GlobalVar.gl_val_Machine1_Check = str_tmp.ToString(); //AVI-2是否启用 str_tmp = new StringBuilder(50); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_Check, "", str_tmp, 50, filepath); GlobalVar.gl_val_Machine2_Check = str_tmp.ToString(); //AVI-3是否启用 str_tmp = new StringBuilder(50); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_Check, "", str_tmp, 50, filepath); GlobalVar.gl_val_Machine3_Check = str_tmp.ToString(); #endregion if (GlobalVar.gl_val_Machine1_Check == "1") { checkBox_Machine1.Checked = true; } if (GlobalVar.gl_val_Machine2_Check == "1") { checkBox_Machine2.Checked = true; } if (GlobalVar.gl_val_Machine3_Check == "1") { checkBox_Machine3.Checked = true; } }catch (Exception ex) { myf.writeErrorLog("读取Config文件异常:" + ex.Message); MessageBox.Show("读取Config文件异常:" + ex.Message); //System.Environment.Exit(0); } }
private void btn_OK_Click(object sender, EventArgs e) { string filepath = Application.StartupPath + @"\CONFIG.ini"; if (tb_AVI1_S1_PIC.Text != "" && tb_AVI1_S2_PIC.Text != "" && tb_AVI1_S3_PIC.Text != "" && tb_AVI1_S1_TestItem.Text != "" && tb_AVI1_S2_TestItem.Text != "" && tb_AVI1_S3_TestItem.Text != "") { #region 存储配置信息 //AVI-1 主站测试结果存储 GlobalVar.gl_val_Machine1_S1_TestResult = tb_AVI1_S1_PIC.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S1_TestResult, tb_AVI1_S1_PIC.Text, filepath); //AVI-1 从站测试结果存储 GlobalVar.gl_val_Machine1_S2_TestResult = tb_AVI1_S2_PIC.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S2_TestResult, tb_AVI1_S2_PIC.Text, filepath); //AVI-1 从站2测试结果存储 GlobalVar.gl_val_Machine1_S3_TestResult = tb_AVI1_S3_PIC.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S3_TestResult, tb_AVI1_S3_PIC.Text, filepath); //AVI-1 主站测试项存储 GlobalVar.gl_val_Machine1_S1_TestVal = tb_AVI1_S1_TestItem.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S1_TestVal, tb_AVI1_S1_TestItem.Text, filepath); //AVI-1 从站测试项存储 GlobalVar.gl_val_Machine1_S2_TestVal = tb_AVI1_S2_TestItem.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S2_TestVal, tb_AVI1_S2_TestItem.Text, filepath); //AVI-1 从站2测试项存储 GlobalVar.gl_val_Machine1_S3_TestVal = tb_AVI1_S3_TestItem.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S3_TestVal, tb_AVI1_S3_TestItem.Text, filepath); #endregion } if (tb_AVI2_S1_PIC.Text != "" && tb_AVI2_S2_PIC.Text != "" && tb_AVI2_S1_TestItem.Text != "" && tb_AVI2_S2_TestItem.Text != "") { //AVI-2 主站测试结果存储 GlobalVar.gl_val_Machine2_S1_TestResult = tb_AVI2_S1_PIC.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S1_TestResult, tb_AVI2_S1_PIC.Text, filepath); //AVI-2 从站测试结果存储 GlobalVar.gl_val_Machine2_S2_TestResult = tb_AVI2_S2_PIC.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S2_TestResult, tb_AVI2_S2_PIC.Text, filepath); //AVI-2 从站2测试结果存储 GlobalVar.gl_val_Machine2_S3_TestResult = tb_AVI2_S3_PIC.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S3_TestResult, tb_AVI2_S3_PIC.Text, filepath); //AVI-2 主站测试项存储 GlobalVar.gl_val_Machine2_S1_TestVal = tb_AVI2_S1_TestItem.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S1_TestVal, tb_AVI2_S1_TestItem.Text, filepath); //AVI-2 从站测试项存储 GlobalVar.gl_val_Machine2_S2_TestVal = tb_AVI2_S2_TestItem.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S2_TestVal, tb_AVI2_S2_TestItem.Text, filepath); //AVI-2 从站2测试项存储 GlobalVar.gl_val_Machine2_S3_TestVal = tb_AVI2_S3_TestItem.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S3_TestVal, tb_AVI2_S3_TestItem.Text, filepath); } if (tb_AVI3_S1_PIC.Text != "" && tb_AVI3_S2_PIC.Text != "" && tb_AVI3_S1_TestItem.Text != "" && tb_AVI3_S2_TestItem.Text != "") { //AVI-3 主站测试结果存储 GlobalVar.gl_val_Machine3_S1_TestResult = tb_AVI3_S1_PIC.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S1_TestResult, tb_AVI3_S1_PIC.Text, filepath); //AVI-3 从站测试结果存储 GlobalVar.gl_val_Machine2_S2_TestResult = tb_AVI2_S2_PIC.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S2_TestResult, tb_AVI3_S2_PIC.Text, filepath); //AVI-3 从站2测试结果存储 GlobalVar.gl_val_Machine2_S3_TestResult = tb_AVI2_S3_PIC.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S3_TestResult, tb_AVI3_S3_PIC.Text, filepath); //AVI-3 主站测试项存储 GlobalVar.gl_val_Machine3_S1_TestVal = tb_AVI3_S1_TestItem.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S1_TestVal, tb_AVI3_S1_TestItem.Text, filepath); //AVI-3 从站测试项存储 GlobalVar.gl_val_Machine3_S2_TestVal = tb_AVI3_S2_TestItem.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S2_TestVal, tb_AVI3_S2_TestItem.Text, filepath); //AVI-3 从站2测试项存储 GlobalVar.gl_val_Machine3_S3_TestVal = tb_AVI3_S3_TestItem.Text; MyFunctions.WritePrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S3_TestVal, tb_AVI3_S3_TestItem.Text, filepath); } if (!File.Exists(filepath)) { File.Create(filepath); Config config = new Config(); config.ShowDialog(); return; } #region 读取config配置 //AVI-1主站测试结果 StringBuilder str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S1_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S1_TestResult = str_tmp.ToString(); //AVI-1从站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S2_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S2_TestResult = str_tmp.ToString(); //AVI-1从站2测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S3_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S3_TestResult = str_tmp.ToString(); //AVI-1主站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S1_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S1_TestVal = str_tmp.ToString(); //AVI-1从站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S2_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S2_TestVal = str_tmp.ToString(); //AVI-1从站2测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S3_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine1_S3_TestVal = str_tmp.ToString(); //AVI-2主站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S1_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S1_TestResult = str_tmp.ToString(); //AVI-2从站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S2_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S2_TestResult = str_tmp.ToString(); //AVI-2从站2测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S3_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S3_TestResult = str_tmp.ToString(); //AVI-2主站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S1_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S1_TestVal = str_tmp.ToString(); //AVI-2从站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S2_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S2_TestVal = str_tmp.ToString(); //AVI-2从站2测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S3_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine2_S3_TestVal = str_tmp.ToString(); //AVI-3主站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S1_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S1_TestResult = str_tmp.ToString(); //AVI-3从站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S2_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S2_TestResult = str_tmp.ToString(); //AVI-3从站2测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S3_TestResult, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S3_TestResult = str_tmp.ToString(); //AVI-3主站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S1_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S1_TestVal = str_tmp.ToString(); //AVI-3从站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S2_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S2_TestVal = str_tmp.ToString(); //AVI-3从站2测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S3_TestVal, "", str_tmp, 100, filepath); GlobalVar.gl_val_Machine3_S3_TestVal = str_tmp.ToString(); //AVI-1是否启用 str_tmp = new StringBuilder(50); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_Check, "", str_tmp, 50, filepath); GlobalVar.gl_val_Machine1_Check = str_tmp.ToString(); //AVI-2是否启用 str_tmp = new StringBuilder(50); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_Check, "", str_tmp, 50, filepath); GlobalVar.gl_val_Machine2_Check = str_tmp.ToString(); //AVI-3是否启用 str_tmp = new StringBuilder(50); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_Check, "", str_tmp, 50, filepath); GlobalVar.gl_val_Machine3_Check = str_tmp.ToString(); #endregion this.Close(); }
private void Config_Load(object sender, EventArgs e) { string filepath = Application.StartupPath + @"\CONFIG.ini"; if (!File.Exists(filepath)) { File.Create(filepath); return; } #region 读取config配置 //AVI-1主站测试结果 StringBuilder str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S1_TestResult, "", str_tmp, 100, filepath); tb_AVI1_S1_PIC.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine1_S1_TestResult = str_tmp.ToString(); //AVI-1从站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S2_TestResult, "", str_tmp, 100, filepath); tb_AVI1_S2_PIC.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine1_S2_TestResult = str_tmp.ToString(); //AVI-1从站2测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S3_TestResult, "", str_tmp, 100, filepath); tb_AVI1_S3_PIC.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine1_S3_TestResult = str_tmp.ToString(); //AVI-1主站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S1_TestVal, "", str_tmp, 100, filepath); tb_AVI1_S1_TestItem.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine1_S1_TestVal = str_tmp.ToString(); //AVI-1从站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S2_TestVal, "", str_tmp, 100, filepath); tb_AVI1_S2_TestItem.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine1_S2_TestVal = str_tmp.ToString(); //AVI-1从站2测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine1_S3_TestVal, "", str_tmp, 100, filepath); tb_AVI1_S3_TestItem.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine1_S3_TestVal = str_tmp.ToString(); //AVI-2主站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S1_TestResult, "", str_tmp, 100, filepath); tb_AVI2_S1_PIC.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine2_S1_TestResult = str_tmp.ToString(); //AVI-2从站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S2_TestResult, "", str_tmp, 100, filepath); tb_AVI2_S2_PIC.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine2_S2_TestResult = str_tmp.ToString(); //AVI-2从站2测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S3_TestResult, "", str_tmp, 100, filepath); tb_AVI2_S3_PIC.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine2_S3_TestResult = str_tmp.ToString(); //AVI-2主站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S1_TestVal, "", str_tmp, 100, filepath); tb_AVI2_S1_TestItem.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine2_S1_TestVal = str_tmp.ToString(); //AVI-2从站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S2_TestVal, "", str_tmp, 100, filepath); tb_AVI2_S2_TestItem.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine2_S2_TestVal = str_tmp.ToString(); //AVI-2从站2测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine2_S3_TestVal, "", str_tmp, 100, filepath); tb_AVI2_S3_TestItem.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine2_S3_TestVal = str_tmp.ToString(); //AVI-3主站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S1_TestResult, "", str_tmp, 100, filepath); tb_AVI3_S1_PIC.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine3_S1_TestResult = str_tmp.ToString(); //AVI-3从站测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S2_TestResult, "", str_tmp, 100, filepath); tb_AVI3_S2_PIC.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine3_S2_TestResult = str_tmp.ToString(); //AVI-3从站2测试结果 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S3_TestResult, "", str_tmp, 100, filepath); tb_AVI3_S3_PIC.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine3_S3_TestResult = str_tmp.ToString(); //AVI-3主站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S1_TestVal, "", str_tmp, 100, filepath); tb_AVI3_S1_TestItem.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine3_S1_TestVal = str_tmp.ToString(); //AVI-3从站测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S2_TestVal, "", str_tmp, 100, filepath); tb_AVI3_S2_TestItem.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine3_S2_TestVal = str_tmp.ToString(); //AVI-3从站2测试项 str_tmp = new StringBuilder(100); MyFunctions.GetPrivateProfileString(GlobalVar.gl_section_Global, GlobalVar.gl_key_Machine3_S3_TestVal, "", str_tmp, 100, filepath); tb_AVI3_S3_TestItem.Text = str_tmp.ToString(); GlobalVar.gl_val_Machine3_S3_TestVal = str_tmp.ToString(); #endregion }