Subido por Eduardo Tenorio

ProyectoETS

Anuncio
PROYECTO
Programación Visual
8 DE FEBRERO DE 2023
UMAD
Eduardo Tenorio Santiago
Formulario Participante
Código Diseñador
partial class FrmRegister
{
/// <summary>
/// Variable del diseñador necesaria.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Limpiar los recursos que se estén usando.
/// </summary>
/// <param name="disposing">true si los recursos administrados se deben desechar; false en caso
contrario.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Código generado por el Diseñador de Windows Forms
/// <summary>
/// Método necesario para admitir el Diseñador. No se puede modificar
/// el contenido de este método con el editor de código.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(FrmRegister));
this.grpForm = new System.Windows.Forms.GroupBox();
this.txtId = new System.Windows.Forms.TextBox();
this.lblId = new System.Windows.Forms.Label();
this.lblArea = new System.Windows.Forms.Label();
this.lblProyect = new System.Windows.Forms.Label();
this.lblVideo = new System.Windows.Forms.Label();
this.lblStudies = new System.Windows.Forms.Label();
this.lblGender = new System.Windows.Forms.Label();
this.lblAge = new System.Windows.Forms.Label();
this.lblLastName = new System.Windows.Forms.Label();
this.lblFirstName = new System.Windows.Forms.Label();
this.txtArea = new System.Windows.Forms.TextBox();
this.txtProyect = new System.Windows.Forms.TextBox();
this.txtVideo = new System.Windows.Forms.TextBox();
this.txtStudies = new System.Windows.Forms.TextBox();
this.cmbGender = new System.Windows.Forms.ComboBox();
this.nmrAge = new System.Windows.Forms.NumericUpDown();
this.txtLastName = new System.Windows.Forms.TextBox();
this.txtFirstName = new System.Windows.Forms.TextBox();
this.grpControls = new System.Windows.Forms.GroupBox();
this.bttNewRegister = new System.Windows.Forms.Button();
this.bttClear = new System.Windows.Forms.Button();
this.bttRegister = new System.Windows.Forms.Button();
this.grpForm.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nmrAge)).BeginInit();
this.grpControls.SuspendLayout();
this.SuspendLayout();
//
// grpForm
//
this.grpForm.Controls.Add(this.txtId);
this.grpForm.Controls.Add(this.lblId);
this.grpForm.Controls.Add(this.lblArea);
this.grpForm.Controls.Add(this.lblProyect);
this.grpForm.Controls.Add(this.lblVideo);
this.grpForm.Controls.Add(this.lblStudies);
this.grpForm.Controls.Add(this.lblGender);
this.grpForm.Controls.Add(this.lblAge);
this.grpForm.Controls.Add(this.lblLastName);
this.grpForm.Controls.Add(this.lblFirstName);
this.grpForm.Controls.Add(this.txtArea);
this.grpForm.Controls.Add(this.txtProyect);
this.grpForm.Controls.Add(this.txtVideo);
this.grpForm.Controls.Add(this.txtStudies);
this.grpForm.Controls.Add(this.cmbGender);
this.grpForm.Controls.Add(this.nmrAge);
this.grpForm.Controls.Add(this.txtLastName);
this.grpForm.Controls.Add(this.txtFirstName);
this.grpForm.Location = new System.Drawing.Point(12, 12);
this.grpForm.Name = "grpForm";
this.grpForm.Size = new System.Drawing.Size(568, 396);
this.grpForm.TabIndex = 0;
this.grpForm.TabStop = false;
this.grpForm.Text = "Formulario";
//
// txtId
//
this.txtId.Enabled = false;
this.txtId.Location = new System.Drawing.Point(133, 27);
this.txtId.Name = "txtId";
this.txtId.Size = new System.Drawing.Size(140, 22);
this.txtId.TabIndex = 17;
//
// lblId
//
this.lblId.AutoSize = true;
this.lblId.Location = new System.Drawing.Point(23, 32);
this.lblId.Name = "lblId";
this.lblId.Size = new System.Drawing.Size(93, 17);
this.lblId.TabIndex = 16;
this.lblId.Text = "Identificador: ";
//
// lblArea
//
this.lblArea.AutoSize = true;
this.lblArea.Location = new System.Drawing.Point(317, 116);
this.lblArea.Name = "lblArea";
this.lblArea.Size = new System.Drawing.Size(46, 17);
this.lblArea.TabIndex = 15;
this.lblArea.Text = "Área: ";
//
// lblProyect
//
this.lblProyect.AutoSize = true;
this.lblProyect.Location = new System.Drawing.Point(317, 73);
this.lblProyect.Name = "lblProyect";
this.lblProyect.Size = new System.Drawing.Size(72, 17);
this.lblProyect.TabIndex = 14;
this.lblProyect.Text = "Proyecto: ";
//
// lblVideo
//
this.lblVideo.AutoSize = true;
this.lblVideo.Location = new System.Drawing.Point(317, 30);
this.lblVideo.Name = "lblVideo";
this.lblVideo.Size = new System.Drawing.Size(52, 17);
this.lblVideo.TabIndex = 13;
this.lblVideo.Text = "Video: ";
//
// lblStudies
//
this.lblStudies.AutoSize = true;
this.lblStudies.Location = new System.Drawing.Point(23, 294);
this.lblStudies.Name = "lblStudies";
this.lblStudies.Size = new System.Drawing.Size(70, 17);
this.lblStudies.TabIndex = 12;
this.lblStudies.Text = "Estudios: ";
//
// lblGender
//
this.lblGender.AutoSize = true;
this.lblGender.Location = new System.Drawing.Point(23, 203);
this.lblGender.Name = "lblGender";
this.lblGender.Size = new System.Drawing.Size(64, 17);
this.lblGender.TabIndex = 11;
this.lblGender.Text = "Genero: ";
//
// lblAge
//
this.lblAge.AutoSize = true;
this.lblAge.Location = new System.Drawing.Point(23, 159);
this.lblAge.Name = "lblAge";
this.lblAge.Size = new System.Drawing.Size(49, 17);
this.lblAge.TabIndex = 10;
this.lblAge.Text = "Edad: ";
//
// lblLastName
//
this.lblLastName.AutoSize = true;
this.lblLastName.Location = new System.Drawing.Point(23, 116);
this.lblLastName.Name = "lblLastName";
this.lblLastName.Size = new System.Drawing.Size(66, 17);
this.lblLastName.TabIndex = 9;
this.lblLastName.Text = "Apellido: ";
//
// lblFirstName
//
this.lblFirstName.AutoSize = true;
this.lblFirstName.Location = new System.Drawing.Point(23, 73);
this.lblFirstName.Name = "lblFirstName";
this.lblFirstName.Size = new System.Drawing.Size(66, 17);
this.lblFirstName.TabIndex = 8;
this.lblFirstName.Text = "Nombre: ";
//
// txtArea
//
this.txtArea.Location = new System.Drawing.Point(408, 113);
this.txtArea.MaxLength = 100;
this.txtArea.Name = "txtArea";
this.txtArea.Size = new System.Drawing.Size(140, 22);
this.txtArea.TabIndex = 7;
//
// txtProyect
//
this.txtProyect.Location = new System.Drawing.Point(408, 70);
this.txtProyect.MaxLength = 100;
this.txtProyect.Name = "txtProyect";
this.txtProyect.Size = new System.Drawing.Size(140, 22);
this.txtProyect.TabIndex = 6;
//
// txtVideo
//
this.txtVideo.Location = new System.Drawing.Point(408, 27);
this.txtVideo.Name = "txtVideo";
this.txtVideo.Size = new System.Drawing.Size(140, 22);
this.txtVideo.TabIndex = 5;
//
// txtStudies
//
this.txtStudies.Location = new System.Drawing.Point(133, 254);
this.txtStudies.Multiline = true;
this.txtStudies.Name = "txtStudies";
this.txtStudies.Size = new System.Drawing.Size(140, 96);
this.txtStudies.TabIndex = 4;
//
// cmbGender
//
this.cmbGender.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbGender.FormattingEnabled = true;
this.cmbGender.Items.AddRange(new object[] {
"Masculino",
"Femenino"});
this.cmbGender.Location = new System.Drawing.Point(133, 199);
this.cmbGender.Name = "cmbGender";
this.cmbGender.Size = new System.Drawing.Size(140, 24);
this.cmbGender.TabIndex = 3;
//
// nmrAge
//
this.nmrAge.Location = new System.Drawing.Point(133, 156);
this.nmrAge.Maximum = new decimal(new int[] {
28,
0,
0,
0});
this.nmrAge.Name = "nmrAge";
this.nmrAge.Size = new System.Drawing.Size(139, 22);
this.nmrAge.TabIndex = 2;
//
// txtLastName
//
this.txtLastName.Location = new System.Drawing.Point(133, 113);
this.txtLastName.MaxLength = 100;
this.txtLastName.Name = "txtLastName";
this.txtLastName.Size = new System.Drawing.Size(140, 22);
this.txtLastName.TabIndex = 1;
//
// txtFirstName
//
this.txtFirstName.Location = new System.Drawing.Point(133, 70);
this.txtFirstName.MaxLength = 100;
this.txtFirstName.Name = "txtFirstName";
this.txtFirstName.Size = new System.Drawing.Size(140, 22);
this.txtFirstName.TabIndex = 0;
//
// grpControls
//
this.grpControls.Controls.Add(this.bttNewRegister);
this.grpControls.Controls.Add(this.bttClear);
this.grpControls.Controls.Add(this.bttRegister);
this.grpControls.Location = new System.Drawing.Point(586, 17);
this.grpControls.Name = "grpControls";
this.grpControls.Size = new System.Drawing.Size(202, 391);
this.grpControls.TabIndex = 1;
this.grpControls.TabStop = false;
this.grpControls.Text = "Controles";
//
// bttNewRegister
//
this.bttNewRegister.Location = new System.Drawing.Point(58, 307);
this.bttNewRegister.Name = "bttNewRegister";
this.bttNewRegister.Size = new System.Drawing.Size(91, 66);
this.bttNewRegister.TabIndex = 2;
this.bttNewRegister.Text = "Nuevo Registro";
this.bttNewRegister.UseVisualStyleBackColor = true;
this.bttNewRegister.Click += new System.EventHandler(this.bttNewRegister_Click);
//
// bttClear
//
this.bttClear.Location = new System.Drawing.Point(58, 206);
this.bttClear.Name = "bttClear";
this.bttClear.Size = new System.Drawing.Size(91, 23);
this.bttClear.TabIndex = 1;
this.bttClear.Text = "Limpiar";
this.bttClear.UseVisualStyleBackColor = true;
this.bttClear.Click += new System.EventHandler(this.bttClear_Click);
//
// bttRegister
//
this.bttRegister.Location = new System.Drawing.Point(58, 79);
this.bttRegister.Name = "bttRegister";
this.bttRegister.Size = new System.Drawing.Size(91, 23);
this.bttRegister.TabIndex = 0;
this.bttRegister.Text = "Registrarse";
this.bttRegister.UseVisualStyleBackColor = true;
this.bttRegister.Click += new System.EventHandler(this.bttRegister_Click);
//
// FrmRegister
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 431);
this.Controls.Add(this.grpControls);
this.Controls.Add(this.grpForm);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmRegister";
this.Text = "Registro Convocatoria";
this.Load += new System.EventHandler(this.FrmRegister_Load);
this.grpForm.ResumeLayout(false);
this.grpForm.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nmrAge)).EndInit();
this.grpControls.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox grpForm;
private System.Windows.Forms.TextBox txtId;
private System.Windows.Forms.Label lblId;
private System.Windows.Forms.Label lblArea;
private System.Windows.Forms.Label lblProyect;
private System.Windows.Forms.Label lblVideo;
private System.Windows.Forms.Label lblStudies;
private System.Windows.Forms.Label lblGender;
private System.Windows.Forms.Label lblAge;
private System.Windows.Forms.Label lblLastName;
private System.Windows.Forms.Label lblFirstName;
private System.Windows.Forms.TextBox txtArea;
private System.Windows.Forms.TextBox txtProyect;
private System.Windows.Forms.TextBox txtVideo;
private System.Windows.Forms.TextBox txtStudies;
private System.Windows.Forms.ComboBox cmbGender;
private System.Windows.Forms.NumericUpDown nmrAge;
private System.Windows.Forms.TextBox txtLastName;
private System.Windows.Forms.TextBox txtFirstName;
private System.Windows.Forms.GroupBox grpControls;
private System.Windows.Forms.Button bttNewRegister;
private System.Windows.Forms.Button bttClear;
private System.Windows.Forms.Button bttRegister;
}
Clase Participante
public class Participant
{
#region Propiedades
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
public string Gender { get; set; }
public string Id { get; set; }
public string Studies { get; set; }
public string Video { get; set; }
public string Proyect { get; set; }
public string Area { get; set; }
#endregion
#region Metodos
public Participant()
{
this.FirstName = "Eduardo";
this.LastName = "Tenorio";
this.Age = 11;
this.Gender = "Masculino";
this.Id = "RandomId123";
this.Studies = "Preparatoria";
this.Video = "Video";
this.Area = "Ciencias";
}
public Participant(string id)
{
this.FirstName = "Eduardo";
this.LastName = "Tenorio";
this.Age = 11;
this.Gender = "Masculino";
this.Id = id;
this.Studies = "Preparatoria";
this.Video = "Video";
this.Area = "Ciencias";
}
public Participant(string firstName,string lastName)
{
this.FirstName = firstName;
this.LastName = lastName;
this.Age = 11;
this.Gender = "Masculino";
this.Id = "RandomId123";
this.Studies = "Preparatoria";
this.Video = "Video";
this.Area = "Ciencias";
}
public Participant(string firstName,string lastName,int age,string
gender,string id,string studies,string video,string proyect,string area)
{
this.FirstName = firstName;
this.LastName = lastName;
this.Age = age;
this.Gender = gender;
this.Id = id;
this.Studies = studies;
this.Video = video;
this.Proyect = proyect;
this.Area = area;
}
public string CreateId()
{
Random random = new Random();
int randomNum = random.Next();
string id = "RO" + randomNum;
return id;
}
#endregion
}
Diagrama clase
Descargar