private void EditBtn_Click(object sender, EventArgs e)
        {
            SkillChallengeBuilderForm skillChallengeBuilderForm = new SkillChallengeBuilderForm(this.fChallenge);

            if (skillChallengeBuilderForm.ShowDialog() == DialogResult.OK)
            {
                this.fChallenge.Name       = skillChallengeBuilderForm.SkillChallenge.Name;
                this.fChallenge.Complexity = skillChallengeBuilderForm.SkillChallenge.Complexity;
                this.fChallenge.Level      = skillChallengeBuilderForm.SkillChallenge.Level;
                this.fChallenge.Success    = skillChallengeBuilderForm.SkillChallenge.Success;
                this.fChallenge.Failure    = skillChallengeBuilderForm.SkillChallenge.Failure;
                this.fChallenge.Notes      = skillChallengeBuilderForm.SkillChallenge.Notes;
                this.fChallenge.Skills.Clear();
                foreach (SkillChallengeData skill in skillChallengeBuilderForm.SkillChallenge.Skills)
                {
                    this.fChallenge.Skills.Add(skill.Copy());
                }
                this.update_view();
            }
        }
Пример #2
0
        private void EditBtn_Click(object sender, EventArgs e)
        {
            SkillChallengeBuilderForm dlg = new SkillChallengeBuilderForm(fChallenge);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fChallenge.Name       = dlg.SkillChallenge.Name;
                fChallenge.Complexity = dlg.SkillChallenge.Complexity;
                fChallenge.Level      = dlg.SkillChallenge.Level;
                fChallenge.Success    = dlg.SkillChallenge.Success;
                fChallenge.Failure    = dlg.SkillChallenge.Failure;
                fChallenge.Notes      = dlg.SkillChallenge.Notes;

                fChallenge.Skills.Clear();
                foreach (SkillChallengeData scd in dlg.SkillChallenge.Skills)
                {
                    fChallenge.Skills.Add(scd.Copy());
                }

                update_view();
            }
        }