Beispiel #1
0
 public void PathRead()//路径读取
 {
     txtMachineName.Text     = iniFile.GetString("MachineName", "Name", "NULL");
     txtReportFolder.Text    = iniFile.GetString("ReportPath", "Path", "NULL");
     txtSFCFolder.Text       = iniFile.GetString("SFCPath", "Path", "NULL");
     txtDataFolder.Text      = iniFile.GetString("DataPath", "Path", "NULL");
     txtImageFolder.Text     = iniFile.GetString("ImagePath", "Path", "NULL");
     txtImageShotFolder.Text = iniFile.GetString("ScreenPath", "Path", "NULL");
     txtProgramPath.Text     = iniFile.GetString("ProgramPath", "Path", "NULL");
 }
Beispiel #2
0
        public static GClsConfigFile configFile;                                                      //定义配置文件
        public static string ReadConfig(string FileName, string label, string name, String defultVal) //读配置文件
        {
            string ret;

            configFile = new GClsConfigFile(Application.StartupPath + "/Config/" + FileName);
            ret        = configFile.GetString(label, name, defultVal);

            if (ret == defultVal)
            {
                configFile.WriteValue(label, name, defultVal);
            }


            return(ret);
        }