public void load(IniHelper ini) { this.title = ini.ReadValue(name, "title"); int i = 0; string str = ""; string s = ini.ReadValue(name, "list" + i++); while (s.Length > 0) { str += s; s = ini.ReadValue(name, "list" + i++); } slist = str.Replace(",", "\r\n"); parseList(); }
public void load() { try { prefix = Int32.Parse(ini.ReadValue("Main", "prefix")); } catch (Exception) { prefix = 6; } try { count = Int32.Parse(ini.ReadValue("Main", "count")); } catch (Exception) { count = 20; } try { random = Boolean.Parse(ini.ReadValue("Main", "random")); } catch (Exception) { random = false; } try { autoSend = Boolean.Parse(ini.ReadValue("Main", "autoSend")); } catch (Exception) { autoSend = false; } try { shuffle = Boolean.Parse(ini.ReadValue("Main", "shuffle")); } catch (Exception) { shuffle = false; } string profiles_str = ini.ReadValue("Main", "profiles"); string[] profileNames = profiles_str.Split(','); foreach (string profileName in profileNames) { if (profileName.Trim().Length == 0) { continue; } Profile profile = new Profile(profileName); profile.load(ini); profiles.Add(profile); } if (profiles.Count == 0) { addProfile(); } else { selectProfile(0); } }