예제 #1
0
        private void SectionAddBtn_Click(object sender, EventArgs e)
        {
            OptionPowerSectionForm optionPowerSectionForm = new OptionPowerSectionForm(new PlayerPowerSection());

            if (optionPowerSectionForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.fPower.Sections.Add(optionPowerSectionForm.Section);
                this.update_sections();
            }
        }
예제 #2
0
        private void SectionAddBtn_Click(object sender, EventArgs e)
        {
            PlayerPowerSection section = new PlayerPowerSection();

            OptionPowerSectionForm dlg = new OptionPowerSectionForm(section);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fPoison.Sections.Add(dlg.Section);
                update_sections();
            }
        }
예제 #3
0
 private void SectionEditBtn_Click(object sender, EventArgs e)
 {
     if (this.SelectedSection != null)
     {
         int section = this.fPower.Sections.IndexOf(this.SelectedSection);
         OptionPowerSectionForm optionPowerSectionForm = new OptionPowerSectionForm(this.SelectedSection);
         if (optionPowerSectionForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             this.fPower.Sections[section] = optionPowerSectionForm.Section;
             this.update_sections();
         }
     }
 }
예제 #4
0
        private void SectionEditBtn_Click(object sender, EventArgs e)
        {
            if (SelectedSection != null)
            {
                int index = fPoison.Sections.IndexOf(SelectedSection);

                OptionPowerSectionForm dlg = new OptionPowerSectionForm(SelectedSection);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    fPoison.Sections[index] = dlg.Section;
                    update_sections();
                }
            }
        }