public Dish(string name, IngredientList ingredients) { Name = name; Ingredients = ingredients; ingredients.PropertyChanged += Ingredients_PropertyChanged; UpdateInfo(); }
public MainWindow() { InitializeComponent(); Menu = new DishList(); Menu.FillList(); dishGrid.DataContext = Menu; ingredientGrid.DataContext = Ingredients; var ingredients = new ObservableCollection <Ingredient>() { new DairyProduct("Cow milk", 0.6f, DairyProduct.Group.Milk, 250), new DairyProduct("Vanilla ice cream", 2.01f, DairyProduct.Group.IceCream, 100), new Fruit("Banana", 0.89f, "Yellow", 0.12f, 150), new Vegetable("Tomato", 0.3f, Vegetable.PungencyDegree.None, "Red", 150), new Meat("Chiken", 1f, Meat.MeatType.Chicken, 100), new Meat("Beef", 1f, Meat.MeatType.Beef, 100) }; FullList = new IngredientList(ingredients); pluginCheckBox.DataContext = this; fullListGrid.ItemsSource = FullList.Ingredients; FillPluginList(); }
public void RefreshIngredientGrid(DataGrid grid, IngredientList list) { grid.DataContext = typeof(IngredientList); grid.DataContext = list; }
public Drinks(string name, IngredientList ingredients, TemperatureType degree) : base(name, ingredients) { Temperature = degree; }
public Dish() { Ingredients = new IngredientList(); Ingredients.PropertyChanged += Ingredients_PropertyChanged; Name = "New dish"; }
public Snacks(string name, IngredientList ingredients, Snack type, Drinks drink) : base(name, ingredients) { SnackType = type; ServedWith = drink; }
public MainCourse(string name, IngredientList ingredients, bool vegetarian, MealType meal) : base(name, ingredients) { Meal = meal; Vegeterian = vegetarian; }