Deser power

master
Baptiste ARNAUD 5 years ago
parent db317ada46
commit c8c0a222a0

@ -1,11 +1,11 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// Ce code a été généré par un outil.
// Version du runtime :4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
// le code est régénéré.
// </auto-generated>
//------------------------------------------------------------------------------

@ -1,31 +1,34 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using Xamarin.Forms;
namespace TheGameExtreme.view
{
public partial class Settings : ContentPage
[Serializable]
public partial class Settings : ContentPage
{
private bool bSwitchSerialisation;
public Settings()
{
{
InitializeComponent();
NavigationPage.SetHasNavigationBar(this, false);
if(pageContentSetting.BackgroundColor == Color.Black)
{
{
swTheme.IsToggled = false;
bSwitchSerialisation = swTheme.IsToggled;
}
else
{
swTheme.IsToggled = true;
bSwitchSerialisation = swTheme.IsToggled;
}
}
private void CBBr_CheckedChanged(object sender, CheckedChangedEventArgs e)
@ -68,7 +71,6 @@ namespace TheGameExtreme.view
Application.Current.Resources["WhiteColor"] = Color.White;
Application.Current.Resources["SkyBlueColor"] = Color.SkyBlue;
}
else
{
@ -76,10 +78,17 @@ namespace TheGameExtreme.view
Application.Current.Resources["WhiteColor"] = Color.Black;
Application.Current.Resources["BlueSkyColor"] = Color.SkyBlue;
}
}
}
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();
}
}

Loading…
Cancel
Save