You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Projet_IHM/Sources/Stim/MainPage.xaml.cs

30 lines
774 B

namespace Stim;
using Model;
using StimPersistance;
using StimStub;
using Microsoft.Maui.Storage;
public partial class MainPage : ContentPage
{
public IPersistance persistance = new Persistance(FileSystem.Current.AppDataDirectory);
public Manager Manager { get; set; }
public MainPage()
{
InitializeComponent();
Manager = new(persistance);
BindingContext = Manager;
}
private async void OnClickGameList(object sender, EventArgs e)
{
await Navigation.PushAsync(new DetailledPage((sender as CollectionView).SelectedItem as Game));
}
private async void GoToAddGamePage(object sender, EventArgs e)
{
await Navigation.PushAsync(new AddGamePage(Manager));
}
}