private void btnDisplay_Click(object sender, EventArgs e) { if (lsvSearch.SelectedIndices.Count > 0) { frmDisplayRecipe displayRecipe = new frmDisplayRecipe(); displayRecipe.LoadFoodstuff(fsMasterlist[lsvSearch.SelectedIndices[0]]); displayRecipe.ShowDialog(); } }
private void btnDisplayRecipe_Click(object sender, EventArgs e) { if (lsvSearch.SelectedItems.Count > 0) { frmDisplayRecipe displayRecipe = new frmDisplayRecipe(); displayRecipe.LoadFoodstuff(fsMasterlist[lsvSearch.SelectedIndices[0]]); displayRecipe.ShowDialog(); } else { //message stating an item needs to be selected first... } }