private void parseValue(string value, SettingItemCollection settings) { string[] lines = value.Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries); if (lines != null) { foreach (string line in lines) { string temp = line; bool isAnno = false; if (temp.StartsWith("#")) { isAnno = true; temp = temp.TrimStart('#'); } string[] segs = temp.Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries); if (segs.Length == 2) { settings.Add(new SettingItem(segs[0], segs[1], isAnno)); } } } }
public Settings() { VideoInfoCollection = new SettingItemCollection(); UserCollection = new SettingItemCollection(); }