fix : persistance !
continuous-integration/drone/push Build is passing Details

Popup_qui_marche_pas
Jade VAN BRABANDT 2 years ago
parent 63eae4f24b
commit f177b1521a

@ -32,17 +32,18 @@
</VerticalStackLayout> </VerticalStackLayout>
<VerticalStackLayout Grid.Column="1" Grid.Row="1"> <VerticalStackLayout Grid.Column="1" Grid.Row="1">
<Label Text="Description" FontSize="30" HorizontalOptions="Center"/> <Label Text="Description" FontSize="30" HorizontalOptions="Center"/>
<Entry x:Name="DescriptionEntry"/> <Editor x:Name="DescriptionEntry" HeightRequest="200" Margin="10,0,10,0"/>
</VerticalStackLayout> </VerticalStackLayout>
<VerticalStackLayout Grid.Column="1" Grid.Row="2"> <VerticalStackLayout Grid.Column="1" Grid.Row="2" Padding="0,150,0,0">
<Label Text="Année de sortie" FontSize="30" HorizontalOptions="Center"/> <Label Text="Année de sortie" FontSize="30" HorizontalOptions="Center"/>
<Entry x:Name="YearEntry"/> <Entry x:Name="YearEntry"/>
</VerticalStackLayout> </VerticalStackLayout>
<VerticalStackLayout Grid.Column="1" Grid.Row="3"> <VerticalStackLayout Grid.Column="1" Grid.Row="3" Padding="0,150,0,0">
<Label Text="Jaquette" FontSize="30" HorizontalOptions="Center"/> <Label Text="Jaquette" FontSize="30" HorizontalOptions="Center"/>
<!-- Please faut commenter quand y'a des trucs à implémenter ou alors faire un ticket-->
<Button Margin="5"/> <Button Margin="5"/>
</VerticalStackLayout> </VerticalStackLayout>
<VerticalStackLayout Grid.Column="1" Grid.Row="4"> <VerticalStackLayout Grid.Column="1" Grid.Row="4" Padding="0,150,0,0">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>

@ -11,6 +11,20 @@ public partial class App : Application
{ {
InitializeComponent(); InitializeComponent();
MainPage = new AppShell(); MainPage = new AppShell();
Manager = new(new Stub()); if (File.Exists(Path.Combine(FileSystem.Current.AppDataDirectory, "games.xml"))) Manager = new Manager(new Persistance(FileSystem.Current.AppDataDirectory));
else Manager = new(new Stub());
}
protected override Window CreateWindow(IActivationState activationState)
{
Window window = base.CreateWindow(activationState);
window.Stopped += (s, e) =>
{
Manager._persistance = new Persistance(FileSystem.Current.AppDataDirectory);
var test = Manager;
Manager.SaveGames();
};
return window;
} }
} }

@ -53,7 +53,7 @@
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image Source="{Binding Cover}" Aspect="AspectFit" Margin="0,0,0,0" WidthRequest="600" HeightRequest="750"/> <Image Source="{Binding Cover}" Aspect="AspectFit" Margin="0,0,0,0" WidthRequest="900" HeightRequest="750"/>
<Label FontAttributes="Bold" FontSize="30" Text="{Binding Name}" Grid.Row="1" HorizontalTextAlignment="Center"/> <Label FontAttributes="Bold" FontSize="30" Text="{Binding Name}" Grid.Row="1" HorizontalTextAlignment="Center"/>
<Grid Grid.Row="2"> <Grid Grid.Row="2">

@ -82,7 +82,7 @@
<Style TargetType="Editor"> <Style TargetType="Editor">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" /> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
<Setter Property="BackgroundColor" Value="Transparent" /> <Setter Property="BackgroundColor" Value="{StaticResource Gray500}" />
<Setter Property="FontFamily" Value="Arial"/> <Setter Property="FontFamily" Value="Arial"/>
<Setter Property="FontSize" Value="15" /> <Setter Property="FontSize" Value="15" />
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" /> <Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />

@ -56,10 +56,19 @@
<ProjectReference Include="..\Stub\Stub.csproj" /> <ProjectReference Include="..\Stub\Stub.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Update="DetailledPage - Copier.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup> <ItemGroup>
<MauiXaml Update="AddGamePage.xaml"> <MauiXaml Update="AddGamePage.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="DetailledPage - Copier.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="DetailledPage.xaml"> <MauiXaml Update="DetailledPage.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>

Loading…
Cancel
Save