private void btnAceptar_Click(object sender, EventArgs e) { Entidades.Tempera tempera = new Entidades.Tempera((ConsoleColor)this.cmbColor.SelectedItem, this.txtMarca.Text, int.Parse(this.txtCantidad.Text)); MessageBox.Show(tempera); this.DialogResult = DialogResult.OK; }
private int ObtenerIndiceTempera(Tempera tempera) { int posicion = -1; if (this != null) { for (int i = 0; i < this.colores.Length; i++) { if (this.colores[i] == tempera) { posicion = i; break; } } } return(posicion); }