private async void recipiesByCategory(string catname) { RecipesByCategoryList ml = await RecipesByCategoryDataProc.LoadMeal(catname); foreach (RecipesByCategoryModel cm in ml.meals) { listBox1.Items.Add(cm.strMeal); } }
private async void openForm2() { //MessageBox.Show(listBox1.SelectedItem.ToString()); // MessageBox.Show(ml.meals[listBox1.SelectedIndex].strMeal); RecipesByCategoryList ml = await RecipesByCategoryDataProc.LoadMeal(this.catname); // MessageBox.Show(ml.meals[listBox1.SelectedIndex].idMeal.ToString()); Form2 form2 = new Form2(); form2.setWindow(ml.meals[listBox1.SelectedIndex].idMeal); form2.Show(); }