Esempio n. 1
0
        public statusconfigInfdata getNeuConfigIni()
        {
            int b = 0;
            statusconfigInfdata configinidata = new statusconfigInfdata();
            StringBuilder       temp          = new StringBuilder();

            temp.Length = 2048;
            ini.INIIO.GetPrivateProfileString("检测设备", "设备状态", "", temp, 2048, "C://jcdatatxt/neustatusConfig.ini");
            configinidata.nType = temp.ToString();
            ini.INIIO.GetPrivateProfileString("检测设备", "时间序列", "", temp, 2048, "C://jcdatatxt/neustatusConfig.ini");
            configinidata.SJXL = temp.ToString();
            return(configinidata);
        }
Esempio n. 2
0
 public bool writeNeuStatusData(statusconfigInfdata statusconfigdata)
 {
     try
     {
         if (File.Exists("C://jcdatatxt/neustatusConfig.ini"))
         {
             File.Delete("C://jcdatatxt/neustatusConfig.ini");
         }
         ini.INIIO.WritePrivateProfileString("检测结果", "设备状态", statusconfigdata.nType, "C://jcdatatxt/neustatusConfig.ini");
         ini.INIIO.WritePrivateProfileString("检测结果", "时间序列", statusconfigdata.SJXL, "C://jcdatatxt/neustatusConfig.ini");
         return(true);
     }
     catch
     {
         return(false);
     }
 }