示例#1
0
 public void ExecuteNewGame(object nothing)
 {
     DataResource.SaveEntries();
     MessagingCenter.Send(new StopLongRunningTaskMessage(), "StopLongRunningTaskMessage");
     NavigationMessage.PutData <bool> ("GameInProgress", false);
     App.Current.MainPage.Navigation.PushAsync(new GamePlay());
 }
示例#2
0
        public App()
        {
            DataResource.InitFetchData();
            GameSetupPage      gameSetupPage = new GameSetupPage();
            DataResourceAccess dra           = new DataResourceAccess();

            gameSetupPage.BindingContext = dra;
            MainPage = new NavigationPage(gameSetupPage);
        }
示例#3
0
        public static void InitFetchData()
        {
            //first attempt to load from file
            string data;

            try {
                data = DependencyService.Get <ISaveAndLoad>().LoadText("BBScoreData.txt");
            }
            catch (FileNotFoundException e) {
                data = DataResource.LoadFromEmbeddedResource();
            }
            ParseData(data);
        }
示例#4
0
 public void ExecuteResumeGame(object nothing)
 {
     DataResource.SaveEntries();
     App.Current.MainPage.Navigation.PushAsync(new GamePlay(NavigationMessage.GetData <Game> ("ActiveGame")));
 }