示例#1
0
 private void DeleteIngredientExecute(object obj)
 {
     if (obj is Ingredient ingredient)
     {
         RecipeIngredients.Remove(ingredient);
     }
 }
示例#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());
     }
 }
示例#4
0
 public void RemoveRecipeIngredient(RecipeIngredient recipeIngredient)
 {
     RecipeIngredients.Remove(recipeIngredient);
 }