Example #1
0
 private void EliminarSeleccionBoton_Click(object sender, EventArgs e)
 {
     if (OnEliminarComida != null)
     {
         OnEliminarComida.Invoke((Comida)comidasList.SelectedItem);
     }
 }
Example #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (OnEliminarComida != null)
     {
         OnEliminarComida.Invoke(nombreTextBox.Text, proteinasTextBox.Text, grasasTextBox.Text, CarbohidratosTextBox.Text);
     }
 }
 private void EliminarButton_Click(object sender, EventArgs e)
 {
     //ComidasListbox.Items.RemoveAt(ComidasListbox.SelectedIndex); 
     if (OnEliminarComida != null)
     {
         OnEliminarComida.Invoke((Comida)ComidasListbox.SelectedItem);
     }
 }
        private void eliminarButton_Click(object sender, EventArgs e)
        {
            ArrayList vSelectedItems = new ArrayList(comidasList.SelectedItems);

            foreach (Comida item in vSelectedItems)
            {
                OnEliminarComida.Invoke(item);
            }
        }
Example #5
0
 private void eliminarButton_Click(object sender, EventArgs e)
 {
     if (listadoComidas.SelectedItem != null)
     {
         Comida comida = (Comida)listadoComidas.SelectedItem;
         if (OnEliminarComida != null)
         {
             OnEliminarComida.Invoke(comida);
         }
     }
 }