Exemplo n.º 1
0
 private void DeleteIngredientExecute(object obj)
 {
     if (obj is Ingredient ingredient)
     {
         RecipeIngredients.Remove(ingredient);
     }
 }
Exemplo n.º 2
0
 async Task DeleteIngredient()
 {
     try
     {
         RecipeIngredients.Remove(SelectedIngredient);
         OnPropertyChanged(nameof(CanRecipeSubmit));
     }
     catch (Exception ex)
     {
         //_logger.Error("Got exception", ex);
         await Application.Current.MainPage.DisplayAlert("Błąd", ex.Message, "Ok");
     }
 }
 public void DeleteIngredient()
 {
     try
     {
         RecipeIngredients.Remove(SelectedIngredient);
         NotifyOfPropertyChange(() => CanAddRecipeSubmit);
     }
     catch (Exception ex)
     {
         _logger.Error("Got exception", ex);
         MessageBox.Show(ex.Message, ex.GetType().ToString());
     }
 }
Exemplo n.º 4
0
 public void RemoveRecipeIngredient(RecipeIngredient recipeIngredient)
 {
     RecipeIngredients.Remove(recipeIngredient);
 }