private void LoadingComponents() { string getComida1Name = ""; string getComida2Name = ""; string getComida3Name = ""; int getComida1Cal = 0; int getComida2Cal = 0; int getComida3Cal = 0; int getComida1Index = -1; int getComida2Index = -1; int getComida3Index = -1; if (SelectA1.SelectedIndex != 0) { getComida1Name = SelectA1.Text; getComida1Index = SelectA1.SelectedIndex - 1; getComida1Cal = int.Parse(getCaloriasAli[getComida1Index]); } if (SelectA2.SelectedIndex != 0) { getComida2Name = SelectA2.Text; getComida2Index = SelectA2.SelectedIndex - 1; getComida2Cal = int.Parse(getCaloriasAli[getComida2Index]); } if (SelectA3.SelectedIndex != 0) { getComida3Name = SelectA3.Text; getComida3Index = SelectA3.SelectedIndex - 1; getComida3Cal = int.Parse(getCaloriasAli[getComida3Index]); } Hooks.Hooks hook = new Hooks.Hooks(); hook.RealTimeCal(getComida1Name, getComida2Name, getComida3Name, getComida1Cal, getComida2Cal, getComida3Cal, labelAli1, labelAli2, labelAli3, labelCal1, labelCal2, labelCal3, labelCalTotal); }