Ejemplo n.º 1
0
 public Dish(string name, IngredientList ingredients)
 {
     Name        = name;
     Ingredients = ingredients;
     ingredients.PropertyChanged += Ingredients_PropertyChanged;
     UpdateInfo();
 }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 public void RefreshIngredientGrid(DataGrid grid, IngredientList list)
 {
     grid.DataContext = typeof(IngredientList);
     grid.DataContext = list;
 }
Ejemplo n.º 4
0
 public Drinks(string name, IngredientList ingredients, TemperatureType degree) : base(name, ingredients)
 {
     Temperature = degree;
 }
Ejemplo n.º 5
0
 public Dish()
 {
     Ingredients = new IngredientList();
     Ingredients.PropertyChanged += Ingredients_PropertyChanged;
     Name = "New dish";
 }
Ejemplo n.º 6
0
 public Snacks(string name, IngredientList ingredients, Snack type, Drinks drink) : base(name, ingredients)
 {
     SnackType  = type;
     ServedWith = drink;
 }
Ejemplo n.º 7
0
 public MainCourse(string name, IngredientList ingredients, bool vegetarian, MealType meal) : base(name, ingredients)
 {
     Meal       = meal;
     Vegeterian = vegetarian;
 }