using LocalDataStorageWithSQLite.Models; using LocalDataStorageWithSQLite.StorageUtils; using Microsoft.Maui.Storage; namespace LocalDataStorageWithSQLite { public partial class MainPage : ContentPage { int count = 0; public MainPage() { InitializeComponent(); //string src = "Source Sample"; //List srcs = new List() { "src1", "src2", "src3", "src4", "src5" }; //PreferenceStorage ps = new PreferenceStorage(); //FileSystemStorage fs = new FileSystemStorage(); //ps.Set("src", src); //fs.Set("srcs", srcs); //var fromPs = ps.Get("src"); //var fromFs = fs.Get>("srcs"); //int a = 0; } public async void OnNewButtonClicked(object sender, EventArgs args) { statusMessage.Text = ""; await App.PersonRepo.AddNewPerson(newPerson.Text); statusMessage.Text = App.PersonRepo.StatusMessage; } public async void OnGetButtonClicked(object sender, EventArgs args) { statusMessage.Text = ""; List people = await App.PersonRepo.GetAllPeople(); peopleList.ItemsSource = people; } } }