public void Read() { Dictionary <string, CSection> listSection = new Dictionary <string, CSection>(); List <string> slist = IniAPI.GetValueAll(__IniPath); foreach (var s in slist) { Dictionary <string, CKey> listKey = new Dictionary <string, CKey>(); List <string> klist = IniAPI.GetValueAll(__IniPath, s); foreach (var k in klist) { string v = IniAPI.GetValueAll(__IniPath, s, k)[0]; CKey key = new CKey(s, k, v); listKey.Add(k.ToLower(), key); } CSection section = new CSection(s, listKey); listSection.Add(s.ToLower(), section); } value = listSection; return; }
public void Write() { foreach (var s in value) { foreach (var k in s.Value.value) { IniAPI.SetValue(__IniPath, k.Value.Section, k.Value.Key, k.Value.Value); } } return; }