private void addButton_Click(object sender, EventArgs e)
        {
            ChoreFactory  factory  = new ChoreFactory();
            Chore         newChore = factory.Generate("", "", 0.50);
            EditChoreForm form     = new EditChoreForm(newChore);

            form.ShowDialog();

            if (form.SavedChore.IsEmpty == false)
            {
                AddChoreToView(form.SavedChore);
            }
        }
Exemplo n.º 2
0
        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();
            }
        }