Exemple #1
0
        /// <summary>
        /// 加载配置。
        /// </summary>
        public static void LoadConfig()
        {
            XElement root = XElement.Load(ConfigFilePath);

            AdminUsers.Clear();
            foreach (XElement element in root.Elements("AdminUser"))
            {
                AdminUser adminUser = new AdminUser();
                adminUser.Id   = (string)element.Attribute("Id");
                adminUser.Name = (string)element.Attribute("Name");
                AdminUsers.Add(adminUser);
            }
        }