using System; using System.Collections.Generic; using System.IO; using System.Xml.Serialization; using Xamarin.Forms; using System.Diagnostics; using TheGameExtreme.IO; using Rg.Plugins.Popup.Pages; using Rg.Plugins.Popup.Extensions; using TheGameExtreme.Resx; namespace TheGameExtreme.view { public partial class HomePage : ContentPage { public HomePage() { InitializeComponent(); NavigationPage.SetHasNavigationBar(this, false); LoadParameterOptionOnHomepage(); } private async void OpenGame(object sender, EventArgs args) { await Navigation.PushAsync(new GamePreparationPage()); } private async void OpenMultiPlayerMode(object sender, EventArgs args) { await DisplayAlert("Mode en cours de développement", null, "Fermer"); //await Navigation.PushAsync(new MultiPlayerMode()); } private async void OpenSetting(object sender, EventArgs args) { await Navigation.PushAsync(new Settings()); } private async void Rules_Clicked(object sender, EventArgs e) { await DisplayAlert(AppResources.StrTitleRules, AppResources.StrRules, AppResources.StrCloseWind); } public void LoadParameterOptionOnHomepage() { bool b = IOOptions.LoadOptionsParameter(); if (!b) { Application.Current.Resources["BlackColor"] = Color.Black; Application.Current.Resources["WhiteColor"] = Color.White; } else { Application.Current.Resources["BlackColor"] = Color.White; Application.Current.Resources["WhiteColor"] = Color.Black; } } } }