private static Reward GetTestReward() { RewardFactory factory = new RewardFactory(); return(factory.Generate("Mystery Prize", "Receive a mysterious wrapped present. What's inside??", 10.00)); }
private void addButton_Click(object sender, EventArgs e) { RewardFactory factory = new RewardFactory(); Reward newReward = factory.Generate("", "", 10.00); EditRewardForm form = new EditRewardForm(newReward); form.ShowDialog(); if (form.SavedReward.IsEmpty == false) { AddRewardToListview(form.SavedReward); } }
private void UpdateReward() { string preserveKey = reward.Key; reward = factory.Generate(choreNameTextbox.Text, descriptionTextbox.Text, (Double)priceUpDown.Value); reward.SetKey(preserveKey); if (isActiveCheckbox.Checked) { reward.Activate(); } else { reward.Inactivate(); } }