Exemplo n.º 1
0
        private void btDiet_Click(object sender, EventArgs e)
        {
            DietSpecificForChild fDietAll =
                new DietSpecificForChild(index, listChildren, listMeals, language);

            fDietAll.Show();
        }
Exemplo n.º 2
0
 //Conditions for show a child diet without allergies
 private void btAllergiesDiet_Click(object sender, EventArgs e)
 {
     try
     {
         if (clbChildren.CheckedItems.Count == 1)
         {
             DietSpecificForChild fDietAll =
                 new DietSpecificForChild(clbChildren.SelectedIndex,
                                          listChildren, listMeals, language);
             fDietAll.Show();
         }
         else if (clbChildren.CheckedItems.Count == 0)
         {
             WarningNotSelct warningNot = new WarningNotSelct(language["NotSelc"]);
             warningNot.Show();
         }
         else
         {
             WarningSelectOnlyOne warningOnyl = new WarningSelectOnlyOne(language["Only1Ch"]);
             warningOnyl.Show();
         }
     }
     catch (Exception)
     {
         Warning warning = new Warning(language["WFail"]);
         warning.Show();
     }
 }