private void CheckedListBox1_ItemCheck(object sender, ItemCheckEventArgs e) { MessageBox.Show(e.Index.ToString()); PanelTipoPersona pntp = PanelTipoPersona.getInstance(0); pntp.envio(e.Index); }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { this.Controls.Remove(panelTipoPersona); if (cbTipoPero.Text == "Alumno") { panelTipoPersona = PanelTipoPersona.getInstance(0); } if (cbTipoPero.Text == "Apoderado") { panelTipoPersona = PanelTipoPersona.getInstance(1); } if (cbTipoPero.Text == "Profesor") { panelTipoPersona = PanelTipoPersona.getInstance(2); } panelTipoPersona.agregarControles(); agregarCaracPanelesAgrega(); }
public void iniciarComponentes() { this.panelPersona = new Panel(); this.panelBotonesInferiores = new Panel(); this.panelTipoPersona = null; this.button1 = new Button(); this.button2 = new Button(); this.button3 = new Button(); this.button4 = new Button(); this.button5 = new Button(); this.txbTelefono = new TextBox(); this.txbDireccion = new TextBox(); this.txbApelliMa = new TextBox(); this.txbApelliPa = new TextBox(); this.label5 = new Label(); this.label7 = new Label(); this.label8 = new Label(); this.label9 = new Label(); this.txbNombre = new TextBox(); this.txbDni = new TextBox(); this.label10 = new Label(); this.label11 = new Label(); this.label2 = new Label(); this.cbTipoPero = new ComboBox(); this.fechaNacimiento = new DateTimePicker(); panelTipoPersona = PanelTipoPersona.getInstance(0); this.SuspendLayout(); this.SuspendLayout(); this.SuspendLayout(); // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(0, 7); this.label2.Name = "label1"; this.label2.Size = new System.Drawing.Size(47, 13); this.label2.TabIndex = 6; this.label2.Text = "Quién eres?"; // // cbTipoPero // this.cbTipoPero.FormattingEnabled = true; this.cbTipoPero.Items.AddRange(new object[] { "Alumno", "Apoderado", "Profesor" }); this.cbTipoPero.Text = "Alumno"; this.cbTipoPero.Location = new System.Drawing.Point(83, 5); this.cbTipoPero.Name = "cbTipoPero"; this.cbTipoPero.TabIndex = 9; this.cbTipoPero.SelectedIndexChanged += new EventHandler(this.comboBox1_SelectedIndexChanged); // // LABEL DNI // this.label10.AutoSize = true; this.label10.Location = new System.Drawing.Point(0, 40); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(26, 13); this.label10.TabIndex = 1; this.label10.Text = "Dni:"; // //TEXBOX DNI // this.txbDni.Location = new System.Drawing.Point(83, 35); this.txbDni.Name = "Dni"; this.txbDni.Size = new System.Drawing.Size(100, 20); this.txbDni.TabIndex = 2; // // LABEL NOMBRE // this.label11.AutoSize = true; this.label11.Location = new System.Drawing.Point(0, 70); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(47, 13); this.label11.TabIndex = 0; this.label11.Text = "Nombre:"; // // TEXBOX NOOMBRE // this.txbNombre.Location = new System.Drawing.Point(83, 65); this.txbNombre.Name = "Nombre"; this.txbNombre.Size = new System.Drawing.Size(100, 20); this.txbNombre.TabIndex = 3; // // LABEL APELLIDOS // this.label9.AutoSize = true; this.label9.Location = new System.Drawing.Point(0, 95); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(55, 13); this.label9.TabIndex = 4; this.label9.Text = "Apellidos: "; // // TEXTBOX PATERNO // this.txbApelliPa.Location = new System.Drawing.Point(83, 90); this.txbApelliPa.Name = "Paterno"; this.txbApelliPa.Size = new System.Drawing.Size(79, 20); this.txbApelliPa.TabIndex = 8; // // TEXTBOX MATERNO // this.txbApelliMa.Location = new System.Drawing.Point(186, 90); this.txbApelliMa.Name = "Materno"; this.txbApelliMa.Size = new System.Drawing.Size(85, 20); this.txbApelliMa.TabIndex = 9; // // label DESCRIPCION // this.label7.AutoSize = true; this.label7.Location = new System.Drawing.Point(0, 125); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(55, 13); this.label7.TabIndex = 6; this.label7.Text = "Dirección:"; // // textBox8 DESCRIPCION // this.txbDireccion.Location = new System.Drawing.Point(83, 120); this.txbDireccion.Multiline = true; this.txbDireccion.Name = "Descripcion"; this.txbDireccion.Size = new System.Drawing.Size(141, 32); this.txbDireccion.TabIndex = 10; // fechaNC // this.fechaNacimiento.Location = new System.Drawing.Point(82, 160); this.fechaNacimiento.Name = "fechaNacimiento"; this.fechaNacimiento.Size = new System.Drawing.Size(189, 20); this.fechaNacimiento.TabIndex = 15; // // FECHA // this.label8.Location = new System.Drawing.Point(0, 155); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(64, 30); this.label8.TabIndex = 5; this.label8.Text = "Fecha Nacimiento: "; // textBox7 TELEFONO // this.txbTelefono.Location = new System.Drawing.Point(83, 200); this.txbTelefono.Name = "telefono"; this.txbTelefono.Size = new System.Drawing.Size(79, 20); this.txbTelefono.TabIndex = 14; // // TELEFONO // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(0, 202); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(52, 13); this.label5.TabIndex = 7; this.label5.Text = "Telefono:"; //PanelTIPPOPERSONADEFECTO // // this.panelTipoPersona.Location = new System.Drawing.Point(50, 250); this.panelTipoPersona.Name = "panelRegistro"; this.panelTipoPersona.Size = new System.Drawing.Size(400, 450); this.panelTipoPersona.TabIndex = 10; /// /////////////////CAMBIARRRRRRR // // button5 // this.button5.Location = new System.Drawing.Point(200, 0); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size(100, 23); this.button5.TabIndex = 4; this.button5.Text = " Guardar"; this.button5.UseVisualStyleBackColor = true; this.button5.Click += new EventHandler(btnAgregar); // // button4 // this.button4.Location = new System.Drawing.Point(160, 25); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(75, 23); this.button4.TabIndex = 3; this.button4.Text = " Cursos.."; this.button4.UseVisualStyleBackColor = true; // // button3 // this.button3.Location = new System.Drawing.Point(100, 0); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(100, 23); this.button3.TabIndex = 2; this.button3.Text = " Editar"; this.button3.UseVisualStyleBackColor = true; // // button2 // this.button2.Location = new System.Drawing.Point(74, 25); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 23); this.button2.TabIndex = 1; this.button2.Text = " Limpiar"; this.button2.UseVisualStyleBackColor = true; // // btnAgregarT // this.button1.Location = new System.Drawing.Point(0, 0); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(100, 23); this.button1.TabIndex = 0; this.button1.Text = "Cancelar"; this.button1.UseVisualStyleBackColor = true; // // BOtones inferiores // this.panelBotonesInferiores.AutoSize = true; this.panelBotonesInferiores.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelBotonesInferiores.Controls.Add(this.button5); this.panelBotonesInferiores.Controls.Add(this.button4); this.panelBotonesInferiores.Controls.Add(this.button3); this.panelBotonesInferiores.Controls.Add(this.button2); this.panelBotonesInferiores.Controls.Add(this.button1); this.panelBotonesInferiores.Location = new System.Drawing.Point(50, 425); this.panelBotonesInferiores.Name = "panelBotonesInferiores"; this.panelBotonesInferiores.Size = new System.Drawing.Size(300, 64); this.panelBotonesInferiores.TabIndex = 2; // PanelRegistro Llenado // this.panelPersona.ResumeLayout(false); this.panelPersona.PerformLayout(); this.panelPersona.ResumeLayout(false); this.panelPersona.PerformLayout(); this.panelPersona.ResumeLayout(false); this.panelPersona.Controls.Add(this.fechaNacimiento); this.panelPersona.Controls.Add(this.txbTelefono); this.panelPersona.Controls.Add(this.txbDireccion); this.panelPersona.Controls.Add(this.txbApelliMa); this.panelPersona.Controls.Add(this.txbApelliPa); this.panelPersona.Controls.Add(this.label5); this.panelPersona.Controls.Add(this.label7); this.panelPersona.Controls.Add(this.label8); this.panelPersona.Controls.Add(this.label9); this.panelPersona.Controls.Add(this.txbNombre); this.panelPersona.Controls.Add(this.txbDni); this.panelPersona.Controls.Add(this.label10); this.panelPersona.Controls.Add(this.label11); this.panelPersona.Controls.Add(this.label2); this.panelPersona.Controls.Add(this.cbTipoPero); this.panelPersona.Location = new System.Drawing.Point(50, 20); this.panelPersona.Size = new System.Drawing.Size(274, 220); this.panelPersona.TabIndex = 1; // // PanelCentral // this.Location = new System.Drawing.Point(0, 0); this.Controls.Add(panelBotonesInferiores); this.Controls.Add(this.panelPersona); this.Controls.Add(this.panelTipoPersona); this.Name = "PanelCentral"; this.Size = new System.Drawing.Size(375, 422); this.TabIndex = 1; }