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.
SAE-2.01/MCTG/Views/Home.xaml.cs

30 lines
824 B

using DataPersistence;
using Model;
using Model.Managers;
using System.ComponentModel;
namespace Views
{
public partial class Home : ContentPage
{
public MasterManager MasterMgr => (App.Current as App).MasterMgr;
public User? user => (App.Current as App).CurrentUser;
public RecipeCollection AllRecipe => (App.Current as App).AllRecipes;
public RecipeCollection RecipesDisplayed { get; private set; }
public Home()
{
RecipesDisplayed = AllRecipe;
InitializeComponent();
BindingContext = this;
}
private void SearchBar_SearchButtonPressed(object sender, EventArgs e)
{
RecipesDisplayed = AllRecipe.ResearchByName((sender as SearchBar).Text);
}
}
}