diff --git a/Documentations/TheGame_GANTT.xlsx b/Documentations/TheGame_GANTT.xlsx index 003dd34..ea5461d 100644 Binary files a/Documentations/TheGame_GANTT.xlsx and b/Documentations/TheGame_GANTT.xlsx differ diff --git a/TheGameExtreme.Android/Properties/AndroidManifest.xml b/TheGameExtreme.Android/Properties/AndroidManifest.xml index c09a9f3..3b6c783 100644 --- a/TheGameExtreme.Android/Properties/AndroidManifest.xml +++ b/TheGameExtreme.Android/Properties/AndroidManifest.xml @@ -3,4 +3,6 @@ + + \ No newline at end of file diff --git a/TheGameExtreme.Android/Resources/Resource.designer.cs b/TheGameExtreme.Android/Resources/Resource.designer.cs index 884c56f..455e66d 100644 --- a/TheGameExtreme.Android/Resources/Resource.designer.cs +++ b/TheGameExtreme.Android/Resources/Resource.designer.cs @@ -1,11 +1,11 @@ #pragma warning disable 1591 //------------------------------------------------------------------------------ // -// 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é. // //------------------------------------------------------------------------------ diff --git a/TheGameExtreme/IO/IOOptions.cs b/TheGameExtreme/IO/IOOptions.cs new file mode 100644 index 0000000..7bcf752 --- /dev/null +++ b/TheGameExtreme/IO/IOOptions.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; + +namespace TheGameExtreme.IO +{ + class IOOptions + { + string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "file.xml"); + + public void SaveOptionParameter() + { + /*if (!File.Exists(path)) + { + XmlSerializer ser = new XmlSerializer(typeof(bool)); + using (StreamWriter sw = File.CreateText(path)) + { + sw.WriteLine(swTheme.IsToggled); + } + + }*/ + } + + } +} diff --git a/TheGameExtreme/view/App.xaml b/TheGameExtreme/view/App.xaml index 3d463ec..7cadacc 100644 --- a/TheGameExtreme/view/App.xaml +++ b/TheGameExtreme/view/App.xaml @@ -1,13 +1,14 @@  - - + + - black - white - SkyBlue - + black + white + SkyBlue + + + - \ No newline at end of file diff --git a/TheGameExtreme/view/App.xaml.cs b/TheGameExtreme/view/App.xaml.cs index 9866ca3..b77a7be 100644 --- a/TheGameExtreme/view/App.xaml.cs +++ b/TheGameExtreme/view/App.xaml.cs @@ -16,7 +16,7 @@ namespace TheGameExtreme } protected override void OnStart() - { + { // Handle when your app starts } diff --git a/TheGameExtreme/view/HomePage.xaml.cs b/TheGameExtreme/view/HomePage.xaml.cs index 20ea13f..aa0721b 100644 --- a/TheGameExtreme/view/HomePage.xaml.cs +++ b/TheGameExtreme/view/HomePage.xaml.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; - +using System.IO; +using System.Xml.Serialization; using Xamarin.Forms; +using System.Diagnostics; namespace TheGameExtreme.view { @@ -12,6 +14,12 @@ namespace TheGameExtreme.view { InitializeComponent(); NavigationPage.SetHasNavigationBar(this, false); + /*string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "file.xml"); + XmlSerializer xs = new XmlSerializer(typeof(bool)); + FileStream fs = new FileStream(path, FileMode.Open); + bool test = (bool)xs.Deserialize(fs); + Debug.WriteLine(test);*/ + } private async void OpenGame(object sender, EventArgs args) { diff --git a/TheGameExtreme/view/Settings.xaml.cs b/TheGameExtreme/view/Settings.xaml.cs index 95fc16a..de3c6c0 100644 --- a/TheGameExtreme/view/Settings.xaml.cs +++ b/TheGameExtreme/view/Settings.xaml.cs @@ -1,31 +1,37 @@ using System; 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; 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) @@ -40,10 +46,7 @@ namespace TheGameExtreme.view CBFr.IsChecked = true; } - - - - + } private void CBFr_CheckedChanged(object sender, CheckedChangedEventArgs e) @@ -66,9 +69,7 @@ namespace TheGameExtreme.view { Application.Current.Resources["BlackColor"] = Color.Black; Application.Current.Resources["WhiteColor"] = Color.White; - Application.Current.Resources["SkyBlueColor"] = Color.SkyBlue; - - + Application.Current.Resources["SkyBlueColor"] = Color.SkyBlue; } else { @@ -76,11 +77,29 @@ namespace TheGameExtreme.view Application.Current.Resources["WhiteColor"] = Color.Black; Application.Current.Resources["BlueSkyColor"] = Color.SkyBlue; } - } + } private async void SettingToHomePage(object sender, EventArgs e) { + //serialisationSwitch(); 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); + } + + } + }*/ } }