public HighScoresDialog(MapLearnerRegion region) { this.InitializeComponent(); XmlServiceClient client = XmlServiceClient.Instance; HighScoresList.ItemsSource = client.SavedData.HighScoresData.Where(x => x.Region == region).OrderBy(x => x.CompletedTime); }
public MapLearner(SaveGame saveGame) { xmlServiceClient = XmlServiceClient.Instance; index = saveGame.getIndexOfCurrentState(); Region = MapLearnerRegionHelper.convertStringToRegion(saveGame.Region); States = saveGame.States; }
protected override void OnNavigatedFrom(NavigationEventArgs e) { // If this is internal navigation, we do not want to auto save if (e.SourcePageType != typeof(MainPage)) { XmlServiceClient client = XmlServiceClient.Instance; MapLearner.save(mapLearner, client.AutoSaveName); } }
public MapLearner(MapLearnerRegion region, int numberOfStates = 10) { xmlServiceClient = XmlServiceClient.Instance; index = 0; Region = region; List <State> stateList = shuffleList(xmlServiceClient.getListOfStates(Region)); States = randomlySelectItemsFromList(stateList, numberOfStates); }
public DeleteSaveDialog() { this.InitializeComponent(); deleteSaveName = string.Empty; XmlServiceClient xmlServiceClient = XmlServiceClient.Instance; saveGames = xmlServiceClient.SavedData.SaveGameData; SaveGameList.ItemsSource = saveGames; if (saveGames.Count == 0) { this.IsPrimaryButtonEnabled = false; } }
public static void removeSaveGame(string saveName) { XmlServiceClient client = XmlServiceClient.Instance; client.remove(saveName); }
public static void save(MapLearner mapLearner, string saveName) { XmlServiceClient client = XmlServiceClient.Instance; client.save(getDataToSave(mapLearner, saveName)); }
public void save() { XmlServiceClient client = XmlServiceClient.Instance; client.save(this); }
public MainPage() { this.InitializeComponent(); XmlServiceClient client = XmlServiceClient.Instance; //XmlServiceClient.clearSaveData(); }