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

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

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

            client.remove(saveName);
        }
Ejemplo n.º 7
0
        public static void save(MapLearner mapLearner, string saveName)
        {
            XmlServiceClient client = XmlServiceClient.Instance;

            client.save(getDataToSave(mapLearner, saveName));
        }
Ejemplo n.º 8
0
        public void save()
        {
            XmlServiceClient client = XmlServiceClient.Instance;

            client.save(this);
        }
Ejemplo n.º 9
0
 public MainPage()
 {
     this.InitializeComponent();
     XmlServiceClient client = XmlServiceClient.Instance;
     //XmlServiceClient.clearSaveData();
 }