public HighScoresDialog(MapLearnerRegion region)
        {
            this.InitializeComponent();
            XmlServiceClient client = XmlServiceClient.Instance;

            HighScoresList.ItemsSource = client.SavedData.HighScoresData.Where(x => x.Region == region).OrderBy(x => x.CompletedTime);
        }
예제 #2
0
        public MapLearner(SaveGame saveGame)
        {
            xmlServiceClient = XmlServiceClient.Instance;

            index  = saveGame.getIndexOfCurrentState();
            Region = MapLearnerRegionHelper.convertStringToRegion(saveGame.Region);
            States = saveGame.States;
        }
예제 #3
0
 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);
     }
 }
예제 #4
0
        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;
            }
        }
예제 #6
0
        public static void removeSaveGame(string saveName)
        {
            XmlServiceClient client = XmlServiceClient.Instance;

            client.remove(saveName);
        }
예제 #7
0
        public static void save(MapLearner mapLearner, string saveName)
        {
            XmlServiceClient client = XmlServiceClient.Instance;

            client.save(getDataToSave(mapLearner, saveName));
        }
예제 #8
0
        public void save()
        {
            XmlServiceClient client = XmlServiceClient.Instance;

            client.save(this);
        }
예제 #9
0
 public MainPage()
 {
     this.InitializeComponent();
     XmlServiceClient client = XmlServiceClient.Instance;
     //XmlServiceClient.clearSaveData();
 }