Example #1
0
        public void Componentes_Panel()
        {
            //Creacion de los componentes del panel
            btn_volver.Location = new System.Drawing.Point(23, 340);
            btn_volver.Name     = "btn_volver";
            btn_volver.Size     = new System.Drawing.Size(75, 23);
            btn_volver.Text     = "Volver";
            btn_volver.UseVisualStyleBackColor = true;
            btn_volver.TabIndex = 13;
            btn_volver.Click   += new System.EventHandler(evento_volver);//Regresa a la forma enterior

            btn_agregar.Location = new System.Drawing.Point(369, 292);
            btn_agregar.Name     = "btn_agregar";
            btn_agregar.Size     = new System.Drawing.Size(75, 42);
            btn_agregar.Text     = "Agregar Trabajador";
            btn_agregar.UseVisualStyleBackColor = true;
            btn_agregar.Click   += new System.EventHandler(evento_agregar);//Agrega un nuevo trabajador
            btn_agregar.TabIndex = 12;

            text1.Location = new System.Drawing.Point(166, 12);
            text1.Name     = "nombres";
            text1.Size     = new System.Drawing.Size(100, 20);
            text1.TabIndex = 0;


            text2.Location = new System.Drawing.Point(166, 64);
            text2.Name     = "a_paterno";
            text2.Size     = new System.Drawing.Size(100, 20);
            text2.TabIndex = 1;


            text3.Location = new System.Drawing.Point(166, 123);
            text3.Name     = "a_materno";
            text3.Size     = new System.Drawing.Size(100, 20);
            text3.TabIndex = 2;

            masked5.Location       = new System.Drawing.Point(200, 178);
            masked5.Name           = "id_trabajador";
            masked5.Mask           = "99999";
            masked5.Size           = new System.Drawing.Size(39, 20);
            masked5.ValidatingType = typeof(int);
            masked5.TabIndex       = 3;


            text4.Location  = new System.Drawing.Point(166, 226);
            text4.Name      = "correo";
            text4.TabIndex  = 4;
            text4.Size      = new System.Drawing.Size(100, 20);
            text4.KeyPress += new KeyPressEventHandler(evento_correo);

            masked6.Location = new System.Drawing.Point(182, 271);
            masked6.Name     = "telefono";
            masked6.TabIndex = 5;
            masked6.Size     = new System.Drawing.Size(77, 20);
            masked6.Mask     = "9999999999";


            text5.Location = new System.Drawing.Point(166, 308);
            text5.Name     = "curp";
            text5.TabIndex = 6;
            text5.Size     = new System.Drawing.Size(100, 20);

            text6.Location = new System.Drawing.Point(368, 10);
            text6.Name     = "colonia";
            text6.TabIndex = 7;
            text6.Size     = new System.Drawing.Size(100, 20);

            text7.Location = new System.Drawing.Point(368, 59);
            text7.Name     = "ciudad";
            text7.TabIndex = 8;
            text7.Size     = new System.Drawing.Size(100, 20);

            text8.Location       = new System.Drawing.Point(368, 114);
            text8.Name           = "id_turno";
            text8.TabIndex       = 9;
            text8.Size           = new System.Drawing.Size(100, 20);
            text8.ValidatingType = typeof(int);
            text8.Mask           = "99999";

            masked7.Location       = new System.Drawing.Point(395, 181);
            masked7.TabIndex       = 10;
            masked7.Name           = "id_puesto";
            masked7.Size           = new System.Drawing.Size(39, 20);
            masked7.ValidatingType = typeof(int);
            masked7.Mask           = "99999";

            masked8.Location = new System.Drawing.Point(395, 243);
            masked8.TabIndex = 11;
            masked8.Name     = "id_datos";
            masked8.Mask     = "99999";
            masked8.Size     = new System.Drawing.Size(39, 20);

            //Agregar los botones y text a el panel
            Panel_Empleados.Controls.Add(masked5);
            Panel_Empleados.Controls.Add(masked6);
            Panel_Empleados.Controls.Add(masked7);
            Panel_Empleados.Controls.Add(masked8);
            Panel_Empleados.Controls.Add(text1);
            Panel_Empleados.Controls.Add(text2);
            Panel_Empleados.Controls.Add(text3);
            Panel_Empleados.Controls.Add(text4);
            Panel_Empleados.Controls.Add(text5);
            Panel_Empleados.Controls.Add(text6);
            Panel_Empleados.Controls.Add(text7);
            Panel_Empleados.Controls.Add(text8);
            Panel_Empleados.Controls.Add(btn_volver);
            Panel_Empleados.Controls.Add(btn_agregar);
            Panel_Empleados.Controls.Add(l_5.Nombres_Empleado());//Invoca el objeto de la forma y la funcion de la libreria con todas las propiedades,
            //igual en los demas labels
            Panel_Empleados.Controls.Add(l_6.A_P_Empleado());
            Panel_Empleados.Controls.Add(l_7.A_M_Empleado());
            Panel_Empleados.Controls.Add(l_8.Id_Trabajador());
            Panel_Empleados.Controls.Add(l_9.Correo_Empleado());
            Panel_Empleados.Controls.Add(l_10.Telefono_Empleado());
            Panel_Empleados.Controls.Add(l_11.Curp_Empleado());
            Panel_Empleados.Controls.Add(l_12.Colonia_Empleado());
            Panel_Empleados.Controls.Add(l_13.Ciudad_Empleado());
            Panel_Empleados.Controls.Add(l_14.Calle_Empleado());
            Panel_Empleados.Controls.Add(l_15.Numero_Empleado());
            Panel_Empleados.Controls.Add(l_16.CP_Empleado());
        }