private void ApplyFormToChore() { string preserveKey = editChore.Key; editChore = factory.Generate(nameTextbox.Text, descriptionTextbox.Text, (double)valueUpDown.Value); editChore.SetKey(preserveKey); if (isActiveCheckbox.Checked) { editChore.Activate(); } else { editChore.Inactivate(); } }