static ConfigurationManager() { Config.Load(Path); foreach (KeyValuePair <string, string> node in Nodes) { ConfigurationManagerM.GetType().GetProperty(node.Key).SetValue(ConfigurationManagerM, Config.SelectSingleNode(node.Value).InnerText, null); } ConfigurationManagerM.AcceptChanges(); }
static internal void Save() { if (ConfigurationManagerM.IsChanged) { foreach (KeyValuePair <string, string> node in Nodes) { Config.SelectSingleNode(node.Value).InnerText = ConfigurationManagerM.GetType().GetProperty(node.Key).GetValue(ConfigurationManagerM).ToString(); } } Config.Save(Path); }