|
|
@ -1,31 +1,34 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
using System.Xml;
|
|
|
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
using Xamarin.Forms;
|
|
|
|
using Xamarin.Forms;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TheGameExtreme.view
|
|
|
|
namespace TheGameExtreme.view
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public partial class Settings : ContentPage
|
|
|
|
[Serializable]
|
|
|
|
|
|
|
|
public partial class Settings : ContentPage
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
private bool bSwitchSerialisation;
|
|
|
|
public Settings()
|
|
|
|
public Settings()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
InitializeComponent();
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
|
|
NavigationPage.SetHasNavigationBar(this, false);
|
|
|
|
NavigationPage.SetHasNavigationBar(this, false);
|
|
|
|
if(pageContentSetting.BackgroundColor == Color.Black)
|
|
|
|
if(pageContentSetting.BackgroundColor == Color.Black)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
swTheme.IsToggled = false;
|
|
|
|
swTheme.IsToggled = false;
|
|
|
|
|
|
|
|
bSwitchSerialisation = swTheme.IsToggled;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
swTheme.IsToggled = true;
|
|
|
|
swTheme.IsToggled = true;
|
|
|
|
|
|
|
|
bSwitchSerialisation = swTheme.IsToggled;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void CBBr_CheckedChanged(object sender, CheckedChangedEventArgs e)
|
|
|
|
private void CBBr_CheckedChanged(object sender, CheckedChangedEventArgs e)
|
|
|
@ -68,7 +71,6 @@ namespace TheGameExtreme.view
|
|
|
|
Application.Current.Resources["WhiteColor"] = Color.White;
|
|
|
|
Application.Current.Resources["WhiteColor"] = Color.White;
|
|
|
|
Application.Current.Resources["SkyBlueColor"] = Color.SkyBlue;
|
|
|
|
Application.Current.Resources["SkyBlueColor"] = Color.SkyBlue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -76,10 +78,17 @@ namespace TheGameExtreme.view
|
|
|
|
Application.Current.Resources["WhiteColor"] = Color.Black;
|
|
|
|
Application.Current.Resources["WhiteColor"] = Color.Black;
|
|
|
|
Application.Current.Resources["BlueSkyColor"] = Color.SkyBlue;
|
|
|
|
Application.Current.Resources["BlueSkyColor"] = Color.SkyBlue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private async void SettingToHomePage(object sender, EventArgs e)
|
|
|
|
private async void SettingToHomePage(object sender, EventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
string path = @"\Documents\theme.txt";
|
|
|
|
|
|
|
|
FileStream fs = File.Create(path);
|
|
|
|
|
|
|
|
byte[] info = new UTF8Encoding(true).GetBytes(bSwitchSerialisation.ToString());
|
|
|
|
|
|
|
|
fs.Write(info, 0, info.Length);
|
|
|
|
|
|
|
|
|
|
|
|
await Navigation.PopAsync();
|
|
|
|
await Navigation.PopAsync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|