Esempio n. 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;
        }
Esempio n. 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;
                }
            }
        }
Esempio n. 3
0
 private void AddMotor(IControladorConexion obj)
 {
     ComboMotor.Items.Add(obj.ToString());
     Motores.Add(obj);
 }