private void LoadIniFile(string iniFilePath) { IniFile iniFile = new IniFile(iniFilePath); for (int i = 0; i < iniFile.GetSectionNames().Length; i++) { AlarmObject alarmObj = new AlarmObject(iniFile.GetSectionNames()[i]); alarmObj.Level = iniFile.GetString(iniFile.GetSectionNames()[i], "Level", ""); alarmObj.Type = iniFile.GetString(iniFile.GetSectionNames()[i], "Type", ""); alarmObj.Reset = (iniFile.GetInt32(iniFile.GetSectionNames()[i], "Reset", 0) == 1) ? true : false; alarmObj.Retry = (iniFile.GetInt32(iniFile.GetSectionNames()[i], "Retry", 0) == 1) ? true : false; alarmObj.Skip = (iniFile.GetInt32(iniFile.GetSectionNames()[i], "Skip", 0) == 1) ? true : false; alarmObj.Continue = (iniFile.GetInt32(iniFile.GetSectionNames()[i], "Continue", 0) == 1) ? true : false; alarmObj.Message = iniFile.GetString(iniFile.GetSectionNames()[i], "Message", ""); alarmObj.TroubleShooting = iniFile.GetString(iniFile.GetSectionNames()[i], "Troubleshooting", ""); alarmObj.ReleaseTime = ""; alarmObj.ReportTime = ""; alarmObj.Message = alarmObj.Message.Replace("**********", "\r\n"); alarmObj.TroubleShooting = alarmObj.TroubleShooting.Replace("**********", "\r\n"); alarmList.Add(alarmObj); } }