コード例 #1
0
        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);
        }
コード例 #5
0
        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
ファイル: HighScore.cs プロジェクト: crouchcd/MapLearnerPub
        public void save()
        {
            XmlServiceClient client = XmlServiceClient.Instance;

            client.save(this);
        }
コード例 #9
0
 public MainPage()
 {
     this.InitializeComponent();
     XmlServiceClient client = XmlServiceClient.Instance;
     //XmlServiceClient.clearSaveData();
 }