Пример #1
0
        public async void setWindow(string text)
        {
            MealModel mm = await DataProccesor.LoadMeal(text);

            pictureBox1.Load(mm.strMealThumb);

            this.Text = "Recipe - " + mm.strMeal;

            label1.Text = mm.strMeal; //first label in ListBox for title of recipe
            fillListBox(mm);          //calling function that will handle item in the right container
            textBox1.Text = mm.strInstructions;
        }
Пример #2
0
        public async void setWindow(int num)
        {
            MealModel mm = await DataProccesor.LoadMeal(num);

            pictureBox1.Load(mm.strMealThumb);

            if (num == 0)
            {
                this.Text = "Random Recipe - " + mm.strMeal;          //same function is using for both random recipe and showing any other recipe
            }
            else
            {
                this.Text = "Recipe - " + mm.strMeal;
            }

            label1.Text = mm.strMeal; //first label in ListBox for title of recipe
            fillListBox(mm);          //calling function that will handle item in the right container
            textBox1.Text = mm.strInstructions;
        }