Persistance

Binding
Thomas MUZARD 2 years ago committed by thomas muzard
parent be960a98b8
commit 97a7b84ac2

@ -6,6 +6,7 @@ using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace ParionsCuite.DataContractPersistance
{
@ -39,10 +40,24 @@ namespace ParionsCuite.DataContractPersistance
Directory.CreateDirectory(FilePath);
}
/*
using (Stream s = File.Create(Path.Combine(FilePath, FileName)))
{
serialiser.WriteObject(s, evenements);
}
*/
var setting = new XmlWriterSettings() { Indent = true };
using (TextWriter tw = File.CreateText(Path.Combine(FilePath, FileName)))
{
using (XmlWriter writer = XmlWriter.Create(tw, setting))
{
serialiser.WriteObject(writer, evenements);
}
}
}
}
}

@ -59,8 +59,11 @@
<!-- 2e ligne -->
<Grid Grid.Row="1">
<ContentView>
<ajout:Ajouts_Pari/>
</ContentView>
</Grid>
</Grid>
</Grid>

@ -5,7 +5,7 @@
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
<RuntimeIdentifiers>maccatalyst-arm64</RuntimeIdentifiers>
<!--<RuntimeIdentifiers>maccatalyst-arm64</RuntimeIdentifiers>-->
<OutputType>Exe</OutputType>
<RootNamespace>ParionsCuite</RootNamespace>
<UseMaui>true</UseMaui>

Loading…
Cancel
Save