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); }
public Config(RestartButtonCoords coords, int fs, string lang) { ButtonCoords = coords; FieldSize = fs; Language = lang; }