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.
58 lines
1.6 KiB
58 lines
1.6 KiB
using Model;
|
|
using System.Diagnostics;
|
|
using Microsoft.Maui.Media;
|
|
|
|
namespace Views
|
|
{
|
|
public partial class AddRecipe : ContentPage
|
|
{
|
|
private List<Ingredient> ingredientList;
|
|
private List<PreparationStep> preparationStepList;
|
|
|
|
public MasterManager Master => (Application.Current as App).Master;
|
|
|
|
public List<Unit> UnitList { get; set; } = new List<Unit> { Unit.unit, Unit.kG, Unit.mG, Unit.G, Unit.L, Unit.cL, Unit.mL };
|
|
public List<Ingredient> IngredientList { get => ingredientList; set => ingredientList = value; }
|
|
public List<PreparationStep> PreparationStepList { get => preparationStepList; set => preparationStepList = value; }
|
|
public AddRecipe(List<PreparationStep> preparationStepList)
|
|
{
|
|
PreparationStepList = preparationStepList;
|
|
}
|
|
|
|
public AddRecipe(List<Ingredient> ingredientList)
|
|
{
|
|
IngredientList = ingredientList;
|
|
}
|
|
|
|
public bool IsCaptureSupported => throw new NotImplementedException();
|
|
|
|
public AddRecipe()
|
|
{
|
|
InitializeComponent();
|
|
BindingContext = this;
|
|
}
|
|
private void PickPhoto(object sender, EventArgs e)
|
|
{
|
|
MediaPicker.PickPhotoAsync();
|
|
}
|
|
|
|
private void AddRecipeValidation(object sender, EventArgs e)
|
|
{
|
|
if (IsCaptureSupported)
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private void AddStepRecipe(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void RemoveStepRecipe(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
}
|
|
} |