LaunchServer.ServerWrapper.Load C# (CSharp) 메소드

Load() 개인적인 메소드

private Load ( ) : void
리턴 void
        private void Load()
        {
            LoadConfig();
            XmlDocument doc = new XmlDocument();
            doc.Load("Hurrscript.xml");
            XmlNodeList xnl = doc.GetElementsByTagName("config");
            MaxPlayers=int.Parse(xnl[0].Attributes["max_players"].Value);
            Say("Max players set to: " + MaxPlayers.ToString());
            xnl = doc.GetElementsByTagName("whitelist");
            foreach (XmlNode node in xnl[0].ChildNodes)
            {
                Whitelist.Add(node.Value);
            }
            xnl = doc.GetElementsByTagName("bans");
            foreach (XmlNode node in xnl[0].ChildNodes)
            {
                Whitelist.Add(node.Value);
            }
        }