Example #1
0
        private void ViewPlanButton_Click(object sender, EventArgs e)
        {
            if (dayPlanListBox.SelectedItem != null)
            {
                NC_NutrientInfo form = new NC_NutrientInfo(AvailablePlans[int.Parse(dayPlanListBox.SelectedValue.ToString())]);

                form.ShowDialog();
                form.Dispose();
            }
        }
Example #2
0
        private void ViewCustomFoodButton_Click(object sender, EventArgs e)
        {
            if (customFoodListBox.SelectedItem != null)
            {
                NC_NutrientInfo form = new NC_NutrientInfo(AvailableCustomFood[int.Parse(customFoodListBox.SelectedValue.ToString())]);

                if (form.ShowDialog(this) != DialogResult.OK && form.updateData)
                {
                    UpdateData();
                }

                form.Dispose();
            }
        }