cldupland 5 years ago
commit 6664b8875d

Binary file not shown.

@ -3,4 +3,6 @@
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<application android:label="TheGameExtreme.Android" android:icon="@drawable/Apple"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
</manifest>

@ -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>
//------------------------------------------------------------------------------

@ -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);
}
}*/
}
}
}

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="TheGameExtreme.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary>
<Color x:Key="BlackColor">black</Color>
<Color x:Key="WhiteColor">white</Color>
<Color x:Key="SkyBlueColor">SkyBlue</Color>
<Color x:Key="BlackColor">black</Color>
<Color x:Key="WhiteColor">white</Color>
<Color x:Key="SkyBlueColor">SkyBlue</Color>
</ResourceDictionary>
</Application.Resources>
</Application>

@ -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)
{

@ -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
{
[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)
@ -41,9 +47,6 @@ namespace TheGameExtreme.view
}
}
private void CBFr_CheckedChanged(object sender, CheckedChangedEventArgs e)
@ -67,8 +70,6 @@ namespace TheGameExtreme.view
Application.Current.Resources["BlackColor"] = Color.Black;
Application.Current.Resources["WhiteColor"] = Color.White;
Application.Current.Resources["SkyBlueColor"] = Color.SkyBlue;
}
else
{
@ -80,7 +81,25 @@ namespace TheGameExtreme.view
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);
}
}
}*/
}
}

Loading…
Cancel
Save