protected override void loadParam(bool bInit) { string key_value; string[] key_values; int tg_id; for (int i = 0; i < (int)HDateTime.INTERVAL.COUNT_ID_TIME; i++) { for (int j = 0; j < COUNT_TG; j++) { key_value = m_FileINI.ReadString(NAME_SECTION_TG_ID, "TG" + (j + 1).ToString() + " " + NAME_TIME[i], null); if (key_value.Length > 0) { key_values = key_value.Split(SEP_ID_TG); if (int.TryParse(key_values[(int)TYPE_VALUE.CURRENT], out tg_id)) { m_tg_id[i, j] = tg_id; } else { ; } if (key_values.GetLength(0) > 1) { if (int.TryParse(key_values[(int)TYPE_VALUE.PREVIOUS], out tg_id)) { m_tg_id_default[i, j] = tg_id; } else { ; } } else { m_tg_id_default[i, j] = tg_id; WriteTGIds(i, j); } } else { WriteTGIds(i, j); } } } base.loadParam(bInit); }
protected override void loadParam(bool bInit) { string strDefault = string.Empty; for (PARAMETR_SETUP i = PARAMETR_SETUP.POLL_TIME; i < PARAMETR_SETUP.COUNT_PARAMETR_SETUP; i++) { m_arParametrSetup[(int)i] = m_FileINI.ReadString(NAME_SECTION_MAIN, NAME_PARAMETR_SETUP[(int)i], strDefault); if (m_arParametrSetup[(int)i].Equals(strDefault) == true) { m_arParametrSetup[(int)i] = m_arParametrSetupDefault[(int)i]; m_FileINI.WriteString(NAME_SECTION_MAIN, NAME_PARAMETR_SETUP[(int)i], m_arParametrSetup[(int)i]); } else { ; } } setDataGUI(bInit); }
private static string GetNameHostModesCentre() { return(m_fileINI.ReadString("Параметры соединения с Modes-Centre (" + ProgramBase.AppName + ".exe" + ")", "ИмяСервер", string.Empty)); }