private void LoadSystemParameters() { string configfilename = Xmler.GetAppSettingValue("keywords", "wxgconfig.xml"); string configfile = Path.Combine(FileHelper.AssemblyPath, configfilename); XmlDocument doc = new XmlDocument(); doc.Load(configfile); // Load Patterns XmlNode patternNode = doc.SelectSingleNode("wxg/system/patterns"); LoadSystemPattern(patternNode); }
/// <summary> /// Load System Pattern /// </summary> /// <param name="patternNode">Pattern Node</param> private void LoadSystemPattern(XmlNode patternNode) { foreach (XmlNode node in patternNode.SelectNodes("pattern")) { string key = Xmler.GetAttribute(node, "name"); if (string.IsNullOrEmpty(key)) { continue; } Patterns[key] = node.InnerText.Trim(); } }
private void LoadSystemParameters() { string configfilename = Xmler.GetAppSettingValue("wxgconfig", "wxgconfig.xml"); string configfile = Path.Combine(FileHelper.AssemblyPath, configfilename); XmlDocument doc = new XmlDocument(); if (!File.Exists(configfile)) { doc.LoadXml(Resources.WxgConfig); } else { doc.Load(configfile); } // Load Patterns XmlNode patternNode = doc.SelectSingleNode("wxg/system/patterns"); LoadSystemPattern(patternNode); }