コード例 #1
0
ファイル: Dish.cs プロジェクト: mynameiskate/Menu-Editor
 public Dish(string name, IngredientList ingredients)
 {
     Name        = name;
     Ingredients = ingredients;
     ingredients.PropertyChanged += Ingredients_PropertyChanged;
     UpdateInfo();
 }
コード例 #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();
        }
コード例 #3
0
 public void RefreshIngredientGrid(DataGrid grid, IngredientList list)
 {
     grid.DataContext = typeof(IngredientList);
     grid.DataContext = list;
 }
コード例 #4
0
 public Drinks(string name, IngredientList ingredients, TemperatureType degree) : base(name, ingredients)
 {
     Temperature = degree;
 }
コード例 #5
0
ファイル: Dish.cs プロジェクト: mynameiskate/Menu-Editor
 public Dish()
 {
     Ingredients = new IngredientList();
     Ingredients.PropertyChanged += Ingredients_PropertyChanged;
     Name = "New dish";
 }
コード例 #6
0
 public Snacks(string name, IngredientList ingredients, Snack type, Drinks drink) : base(name, ingredients)
 {
     SnackType  = type;
     ServedWith = drink;
 }
コード例 #7
0
 public MainCourse(string name, IngredientList ingredients, bool vegetarian, MealType meal) : base(name, ingredients)
 {
     Meal       = meal;
     Vegeterian = vegetarian;
 }