public void ExecuteNewGame(object nothing) { DataResource.SaveEntries(); MessagingCenter.Send(new StopLongRunningTaskMessage(), "StopLongRunningTaskMessage"); NavigationMessage.PutData <bool> ("GameInProgress", false); App.Current.MainPage.Navigation.PushAsync(new GamePlay()); }
public App() { DataResource.InitFetchData(); GameSetupPage gameSetupPage = new GameSetupPage(); DataResourceAccess dra = new DataResourceAccess(); gameSetupPage.BindingContext = dra; MainPage = new NavigationPage(gameSetupPage); }
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); }
public void ExecuteResumeGame(object nothing) { DataResource.SaveEntries(); App.Current.MainPage.Navigation.PushAsync(new GamePlay(NavigationMessage.GetData <Game> ("ActiveGame"))); }