private static string GetValue(string Key) { XmlElement XmlNode = (XmlElement)RootXmlElement.SelectSingleNode("//" + Key); if (XmlNode != null) { return(XmlNode.InnerText); } return(""); }
private static void SetValue(string Key, string Value) { XmlElement XmlNode = (XmlElement)RootXmlElement.SelectSingleNode("//" + Key); if (XmlNode == null) { XmlNode = ConfigFile.CreateElement(Key); RootXmlElement.AppendChild(XmlNode); } XmlNode.InnerText = Value; ConfigFile.Save(ConfigFilePath); }