Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 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);
         }
     }
 }