示例#1
0
        public Config GetConfig()
        {
            XmlElement root = document[ROOT];

            int x = int.Parse(root["buttonCoords"].FirstChild.InnerText);
            int y = int.Parse(root["buttonCoords"].LastChild.InnerText);

            int fieldsize = int.Parse(root["fieldSize"].InnerText);

            string lang = root["language"].InnerText;

            RestartButtonCoords coords = new RestartButtonCoords(x, y);
            Config config = new Config(coords, fieldsize, lang);

            return(config);
        }
示例#2
0
 public Config(RestartButtonCoords coords, int fs, string lang)
 {
     ButtonCoords = coords;
     FieldSize    = fs;
     Language     = lang;
 }