public ViewIngredients(RecipesModel db)
        {
            InitializeComponent();

            Ingredients = new Ingredients(db);

            Clear();
            Refresh();
        }
예제 #2
0
        /// <summary>
        /// Find a reference of RecipesModel and use it as Db on this window
        /// </summary>
        /// <returns>True if it found and set the Db reference. False otherwise</returns>
        private bool FindAndMaybeSetDb()
        {
            bool        set         = false;
            ViewRecipes viewRecipes = FindViewRecipes();

            if (viewRecipes != null)
            {
                Db  = viewRecipes.Db;
                set = true;
            }

            return(set);
        }
예제 #3
0
        public Ingredients(RecipesModel recipesModel)
        {
            Db = recipesModel;

            RefreshList();
        }
예제 #4
0
        public Recipes(RecipesModel recipesModel)
        {
            Db = recipesModel;

            RefreshList();
        }