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.
78 lines
2.7 KiB
78 lines
2.7 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);
|
|
|
|
}
|
|
|
|
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 == true)
|
|
{
|
|
/*(Application.Current.Resources["ColorLabelText"] as Style).
|
|
pageContentSetting.Style = Application.Current.Resources["MyBackGroundColorStyle"] as Style;
|
|
lbColor0.Style = Application.Current.Resources["ColorLabelDark"] as Style;
|
|
lbColor1.Style = Application.Current.Resources["ColorLabelDark"] as Style;
|
|
lbColor2.Style = Application.Current.Resources["ColorLabelDark"] as Style;
|
|
lbColor3.Style = Application.Current.Resources["ColorLabelDark"] as Style;
|
|
lbColor4.Style = Application.Current.Resources["ColorLabelDark"] as Style;*/
|
|
|
|
|
|
|
|
}
|
|
else
|
|
{
|
|
WhiteTheme();
|
|
}
|
|
}
|
|
|
|
private void WhiteTheme()//Change le background color de settings en Blanc et swap la couleur des labels en noir
|
|
{
|
|
|
|
{
|
|
pageContentSetting.Style = Application.Current.Resources["MyBackGroundColorStyle2"] as Style;
|
|
lbColor0.Style = Application.Current.Resources["ColorLabelWhite"] as Style;
|
|
lbColor1.Style = Application.Current.Resources["ColorLabelWhite"] as Style;
|
|
lbColor2.Style = Application.Current.Resources["ColorLabelWhite"] as Style;
|
|
lbColor3.Style = Application.Current.Resources["ColorLabelWhite"] as Style;
|
|
lbColor4.Style = Application.Current.Resources["ColorLabelWhite"] as Style;
|
|
}
|
|
}
|
|
|
|
private async void SettingToHomePage(object sender, EventArgs e)
|
|
{
|
|
await Navigation.PushAsync(new HomePage());
|
|
}
|
|
}
|
|
}
|