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.3 KiB

using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace TheGameExtreme.view
{
public partial class Settings : ContentPage
{
public Settings()
{
InitializeComponent();
}
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 WhiteTheme()
{
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;
//ChangeBackGroundColorHomePage();
}
private void ChangeBackGroundColorHomePage()
{
}
private void Switch_Toggled_Theme(object sender, ToggledEventArgs e)
{
if (swTheme.IsToggled == true)
{
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();
}
}
}
}