|
|
@ -1,31 +1,37 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
|
|
|
|
using System.Runtime.Serialization.Formatters.Binary;
|
|
|
|
|
|
|
|
using System.Runtime.Serialization.Json;
|
|
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
using System.Xml;
|
|
|
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
using Xamarin.Forms;
|
|
|
|
using Xamarin.Forms;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TheGameExtreme.view
|
|
|
|
namespace TheGameExtreme.view
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
public partial class Settings : ContentPage
|
|
|
|
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)
|
|
|
@ -41,9 +47,6 @@ namespace TheGameExtreme.view
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void CBFr_CheckedChanged(object sender, CheckedChangedEventArgs e)
|
|
|
|
private void CBFr_CheckedChanged(object sender, CheckedChangedEventArgs e)
|
|
|
@ -67,8 +70,6 @@ namespace TheGameExtreme.view
|
|
|
|
Application.Current.Resources["BlackColor"] = Color.Black;
|
|
|
|
Application.Current.Resources["BlackColor"] = Color.Black;
|
|
|
|
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
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -80,7 +81,25 @@ namespace TheGameExtreme.view
|
|
|
|
|
|
|
|
|
|
|
|
private async void SettingToHomePage(object sender, EventArgs e)
|
|
|
|
private async void SettingToHomePage(object sender, EventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
//serialisationSwitch();
|
|
|
|
await Navigation.PopAsync();
|
|
|
|
await Navigation.PopAsync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*public void serialisationSwitch()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "file.xml");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!File.Exists(path))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
XmlSerializer ser = new XmlSerializer(typeof(bool));
|
|
|
|
|
|
|
|
using (StreamWriter sw = File.CreateText(path))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
sw.WriteLine(swTheme.IsToggled);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|