public PersonForm(PersonFormType type, Person person) : this(type) { nameInput.Text = person._firstName; lastNameInput.Text = person._lastName; ageInput.Text = person._age.ToString(); cityInput.Text = person._city; }
public PersonForm(PersonFormType type) : this() { switch (type) { case PersonFormType.Add: okButton.Text = "Add"; break; case PersonFormType.Edit: okButton.Text = "Edit"; break; case PersonFormType.View: okButton.Text = "OK"; cancelButton.Visible = false; nameInput.Enabled = false; lastNameInput.Enabled = false; ageInput.Enabled = false; cityInput.Enabled = false; break; default: break; } }