From 896cf06b1d505f1a1c008ba86ba758b564608fe1 Mon Sep 17 00:00:00 2001 From: Clement LESME Date: Wed, 10 May 2023 15:32:44 +0200 Subject: [PATCH] ajoue du logo --- CanYouBuildIt/App.xaml.cs | 4 ++-- .../DataContractPersistance/DataContractPers.cs | 9 ++++++--- .../Images/{logoCanYouBuildIt.png => logoapp.png} | Bin CanYouBuildIt/Views/Acceuil.xaml | 6 +++++- CanYouBuildIt/Views/Credits.xaml | 8 ++++++-- CanYouBuildIt/Views/Favoris.xaml | 6 +++++- 6 files changed, 24 insertions(+), 9 deletions(-) rename CanYouBuildIt/Resources/Images/{logoCanYouBuildIt.png => logoapp.png} (100%) diff --git a/CanYouBuildIt/App.xaml.cs b/CanYouBuildIt/App.xaml.cs index 1c5ec6c..30fecb5 100644 --- a/CanYouBuildIt/App.xaml.cs +++ b/CanYouBuildIt/App.xaml.cs @@ -8,8 +8,8 @@ public partial class App : Application public App() { manager.chargeDonne(); - manager.Persi = new DataContractPersistance.DataContractPers(); - manager.sauvegardeDonnee(); + //manager.Persi = new DataContractPersistance.DataContractPers(); + //manager.sauvegardeDonnee(); InitializeComponent(); MainPage = new AppShell(); diff --git a/CanYouBuildIt/DataContractPersistance/DataContractPers.cs b/CanYouBuildIt/DataContractPersistance/DataContractPers.cs index 4548dcc..c4923f7 100644 --- a/CanYouBuildIt/DataContractPersistance/DataContractPers.cs +++ b/CanYouBuildIt/DataContractPersistance/DataContractPers.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; +using System.Xml; namespace CanYouBuildIt.DataContractPersistance { @@ -37,13 +38,15 @@ namespace CanYouBuildIt.DataContractPersistance Directory.CreateDirectory(FilePath); File.Create(Path.Combine(FilePath, FileName)); } - else + var settings = new XmlWriterSettings() { Indent = true }; + using (TextWriter tw = File.CreateText(Path.Combine(FilePath, FileName))) { - using (Stream stream = File.OpenWrite(Path.Combine(FilePath, FileName))) + using (XmlWriter writer = XmlWriter.Create(tw, settings)) { - serializer.WriteObject(stream, lu); + serializer.WriteObject(writer, lu); } } + return true; } } diff --git a/CanYouBuildIt/Resources/Images/logoCanYouBuildIt.png b/CanYouBuildIt/Resources/Images/logoapp.png similarity index 100% rename from CanYouBuildIt/Resources/Images/logoCanYouBuildIt.png rename to CanYouBuildIt/Resources/Images/logoapp.png diff --git a/CanYouBuildIt/Views/Acceuil.xaml b/CanYouBuildIt/Views/Acceuil.xaml index fcf4307..ede3128 100644 --- a/CanYouBuildIt/Views/Acceuil.xaml +++ b/CanYouBuildIt/Views/Acceuil.xaml @@ -4,9 +4,13 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="CanYouBuildIt.Views.Acceuil" Title="Can You Build It" - BackgroundColor="White"> + BackgroundColor="DarkTurquoise"> + + + diff --git a/CanYouBuildIt/Views/Credits.xaml b/CanYouBuildIt/Views/Credits.xaml index a5fee63..5b11a39 100644 --- a/CanYouBuildIt/Views/Credits.xaml +++ b/CanYouBuildIt/Views/Credits.xaml @@ -2,9 +2,13 @@ + Title="Credits" + BackgroundColor="DarkTurquoise"> - + + + diff --git a/CanYouBuildIt/Views/Favoris.xaml b/CanYouBuildIt/Views/Favoris.xaml index 3fa82bc..0d2eaca 100644 --- a/CanYouBuildIt/Views/Favoris.xaml +++ b/CanYouBuildIt/Views/Favoris.xaml @@ -3,9 +3,13 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="CanYouBuildIt.Views.Favoris" Title="Favoris" - BackgroundColor="White"> + BackgroundColor="DarkTurquoise"> + + +