namespace pop { using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using Container = System.ComponentModel.Container; public class PersonForm : System.Windows.Forms.UserControl { private Container components; private System.Windows.Forms.TextBox iNameTextBox; private System.Windows.Forms.Label iNameLabel; private System.Windows.Forms.Label iDateOfBirthLabel; private System.Windows.Forms.TextBox iDateOfBirthTextBox; private System.Windows.Forms.TextBox iPhoneNumberTextBox; private System.Windows.Forms.Label iPhoneNumberLabel; private System.Windows.Forms.TextBox iHeightTextBox; private System.Windows.Forms.Label iHeightLabel; public PersonForm() { InitializeComponent(); } public Container GUI { get { return components; } } public Person Person { get { return new PersonImpl(iNameTextBox.Text + "%" + iDateOfBirthTextBox.Text + "%" + iPhoneNumberTextBox.Text + "%" + iHeightTextBox.Text); } set { iNameTextBox.Text = value.Name; iDateOfBirthTextBox.Text = value.DateOfBirth.ToString(); iPhoneNumberTextBox.Text = value.PhoneNumber; iHeightTextBox.Text = value.Height.ToString(); } } public override void Dispose() { base.Dispose(); components.Dispose(); } private void InitializeComponent() { this.iDateOfBirthTextBox = new System.Windows.Forms.TextBox(); this.iNameLabel = new System.Windows.Forms.Label(); this.iHeightLabel = new System.Windows.Forms.Label(); this.iPhoneNumberTextBox = new System.Windows.Forms.TextBox(); this.iHeightTextBox = new System.Windows.Forms.TextBox(); this.iDateOfBirthLabel = new System.Windows.Forms.Label(); this.iNameTextBox = new System.Windows.Forms.TextBox(); this.iPhoneNumberLabel = new System.Windows.Forms.Label(); this.SuspendLayout(); // // iDateOfBirthTextBox // this.iDateOfBirthTextBox.Location = new System.Drawing.Point(96, 72); this.iDateOfBirthTextBox.Name = "iDateOfBirthTextBox"; this.iDateOfBirthTextBox.Size = new System.Drawing.Size(232, 20); this.iDateOfBirthTextBox.TabIndex = 4; this.iDateOfBirthTextBox.Text = ""; // // iNameLabel // this.iNameLabel.Location = new System.Drawing.Point(8, 24); this.iNameLabel.Name = "iNameLabel"; this.iNameLabel.Size = new System.Drawing.Size(80, 24); this.iNameLabel.TabIndex = 2; this.iNameLabel.Text = "Name"; this.iNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // iHeightLabel // this.iHeightLabel.Location = new System.Drawing.Point(216, 120); this.iHeightLabel.Name = "iHeightLabel"; this.iHeightLabel.Size = new System.Drawing.Size(40, 23); this.iHeightLabel.TabIndex = 7; this.iHeightLabel.Text = "Height"; this.iHeightLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // iPhoneNumberTextBox // this.iPhoneNumberTextBox.Location = new System.Drawing.Point(96, 120); this.iPhoneNumberTextBox.Name = "iPhoneNumberTextBox"; this.iPhoneNumberTextBox.Size = new System.Drawing.Size(96, 20); this.iPhoneNumberTextBox.TabIndex = 6; this.iPhoneNumberTextBox.Text = ""; // // iHeightTextBox // this.iHeightTextBox.Location = new System.Drawing.Point(264, 120); this.iHeightTextBox.Name = "iHeightTextBox"; this.iHeightTextBox.Size = new System.Drawing.Size(64, 20); this.iHeightTextBox.TabIndex = 8; this.iHeightTextBox.Text = ""; // // iDateOfBirthLabel // this.iDateOfBirthLabel.Location = new System.Drawing.Point(8, 72); this.iDateOfBirthLabel.Name = "iDateOfBirthLabel"; this.iDateOfBirthLabel.Size = new System.Drawing.Size(80, 24); this.iDateOfBirthLabel.TabIndex = 5; this.iDateOfBirthLabel.Text = "DateOfBirth"; this.iDateOfBirthLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // iNameTextBox // this.iNameTextBox.Location = new System.Drawing.Point(96, 24); this.iNameTextBox.Name = "iNameTextBox"; this.iNameTextBox.Size = new System.Drawing.Size(232, 20); this.iNameTextBox.TabIndex = 3; this.iNameTextBox.Text = ""; // // iPhoneNumberLabel // this.iPhoneNumberLabel.Location = new System.Drawing.Point(8, 120); this.iPhoneNumberLabel.Name = "iPhoneNumberLabel"; this.iPhoneNumberLabel.Size = new System.Drawing.Size(80, 24); this.iPhoneNumberLabel.TabIndex = 1; this.iPhoneNumberLabel.Text = "Phone"; this.iPhoneNumberLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // PersonForm // this.Controls.AddRange(new System.Windows.Forms.Control[] { this.iHeightTextBox, this.iHeightLabel, this.iPhoneNumberTextBox, this.iDateOfBirthLabel, this.iDateOfBirthTextBox, this.iNameTextBox, this.iNameLabel, this.iPhoneNumberLabel}); this.Name = "PersonForm"; this.Size = new System.Drawing.Size(432, 224); this.ResumeLayout(false); } } }