예제 #1
0
        private void ComboMotor_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ComboMotor.SelectedIndex == -1)
            {
                return;
            }
            IControladorConexion obj = Motores[ComboMotor.SelectedIndex];

            Contenedor.Controls.Clear();
            Height            = obj.Height + panel2.Height + panel1.Height;
            obj.Parent        = Contenedor;
            obj.Visible       = true;
            ControladorActual = obj;
        }
예제 #2
0
        private void SeleccionaControlador(string con)
        {
            CargaMotores();
            int i, n;

            n = ComboMotor.Items.Count;
            for (i = 0; i < n; i++)
            {
                string s = ComboMotor.Items[i].ToString();
                if (s == con)
                {
                    ComboMotor.SelectedIndex = i;
                    ControladorActual        = Motores[i];
                    return;
                }
            }
        }
예제 #3
0
 private void AddMotor(IControladorConexion obj)
 {
     ComboMotor.Items.Add(obj.ToString());
     Motores.Add(obj);
 }