You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.0 KiB
71 lines
2.0 KiB
using System;
|
|
using System.Collections.Generic;
|
|
|
|
using Xamarin.Forms;
|
|
|
|
namespace TheGameExtreme.view
|
|
{
|
|
public partial class Settings : ContentPage
|
|
|
|
{
|
|
|
|
public Settings()
|
|
{
|
|
InitializeComponent();
|
|
NavigationPage.SetHasNavigationBar(this, false);
|
|
if(pageContentSetting.BackgroundColor == Color.Black)
|
|
{
|
|
swTheme.IsToggled = false;
|
|
}
|
|
else
|
|
{
|
|
swTheme.IsToggled = true;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
private void CBBr_CheckedChanged(object sender, CheckedChangedEventArgs e)
|
|
{
|
|
if(CBBr.IsChecked == true)
|
|
{
|
|
CBFr.IsChecked = !CBBr.IsChecked;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
private void CBFr_CheckedChanged(object sender, CheckedChangedEventArgs e)
|
|
{
|
|
if(CBFr.IsChecked == true)
|
|
{
|
|
CBBr.IsChecked = !CBBr.IsChecked;
|
|
}
|
|
}
|
|
|
|
private void Switch_Toggled_Theme(object sender, ToggledEventArgs e)//Change le background color de settings en noir et swap la couleur des labels en blanc
|
|
{
|
|
|
|
if (swTheme.IsToggled == false)
|
|
{
|
|
Application.Current.Resources["BlackColor"] = Color.Black;
|
|
Application.Current.Resources["WhiteColor"] = Color.White;
|
|
Application.Current.Resources["SkyBlueColor"] = Color.SkyBlue;
|
|
|
|
|
|
}
|
|
else
|
|
{
|
|
Application.Current.Resources["BlackColor"] = Color.White;
|
|
Application.Current.Resources["WhiteColor"] = Color.Black;
|
|
Application.Current.Resources["BlueSkyColor"] = Color.SkyBlue;
|
|
}
|
|
}
|
|
|
|
private async void SettingToHomePage(object sender, EventArgs e)
|
|
{
|
|
await Navigation.PopAsync();
|
|
}
|
|
}
|
|
}
|