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 EditSelected() { if (rewardsListview.SelectedItems.Count == 1) { Reward selected = GetSelected(); EditRewardForm form = new EditRewardForm(selected); form.ShowDialog(); if (form.SavedReward.IsEmpty == false) { UpdateInListView(form.SavedReward); } } }