Ajout des routes et manager (Persistance de Game)
continuous-integration/drone/push Build is failing Details

pull/99/head
Rémi LAVERGNE 11 months ago
parent 531b45f159
commit fcb586b474

@ -1,10 +1,26 @@
namespace Trek_12 using DataContractPersistence;
using Models.Game;
namespace Trek_12
{ {
public partial class App : Application public partial class App : Application
{ {
public string FileName { get; set; } = "data.json";
public string FilePath { get; set; } = Path.Combine(AppDomain.CurrentDomain.BaseDirectory);
public Game Manager { get; private set; }
public App() public App()
{ {
InitializeComponent(); InitializeComponent();
if(File.Exists(Path.Combine(FilePath, FileName)))
{
Manager = new Game(new DataContractJson());
}
Manager.LoadData();
MainPage = new AppShell(); MainPage = new AppShell();
} }

@ -56,9 +56,9 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /> <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Remove="Resources\Images\checked.png" /> <None Remove="Resources\Images\checked.png" />
<None Remove="Resources\Images\maptest.png" /> <None Remove="Resources\Images\maptest.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -68,32 +68,33 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Models\Models.csproj" /> <ProjectReference Include="..\DataContractPersistence\DataContractPersistence.csproj" />
<ProjectReference Include="..\Stub\Stub.csproj" /> <ProjectReference Include="..\Models\Models.csproj" />
<ProjectReference Include="..\Stub\Stub.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Views\PageLeaderBoard.xaml.cs"> <Compile Update="Views\PageLeaderBoard.xaml.cs">
<DependentUpon>PageLeaderBoard.xaml</DependentUpon> <DependentUpon>PageLeaderBoard.xaml</DependentUpon>
</Compile> </Compile>
<Compile Update="Views\pageProfils.xaml.cs"> <Compile Update="Views\pageProfils.xaml.cs">
<DependentUpon>PageProfils.xaml</DependentUpon> <DependentUpon>PageProfils.xaml</DependentUpon>
</Compile> </Compile>
<Compile Update="Views\pageRegles.xaml.cs"> <Compile Update="Views\pageRegles.xaml.cs">
<DependentUpon>PageRegles.xaml</DependentUpon> <DependentUpon>PageRegles.xaml</DependentUpon>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<MauiXaml Update="Views\Components\ContentLeaderBoard.xaml"> <MauiXaml Update="Views\Components\ContentLeaderBoard.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="Views\PageBoard.xaml"> <MauiXaml Update="Views\PageBoard.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="Views\PageLeaderBoard.xaml"> <MauiXaml Update="Views\PageLeaderBoard.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
</ItemGroup> </ItemGroup>

Loading…
Cancel
Save