示例#1
0
        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);
        }
示例#2
0
        /// <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();
            }
        }
示例#3
0
        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);
        }