Ejemplo n.º 1
0
 private void SectionRightBtn_Click(object sender, EventArgs e)
 {
     if (this.SelectedSection != null)
     {
         int num = this.fPower.Sections.IndexOf(this.SelectedSection);
         PlayerPowerSection selectedSection = this.SelectedSection;
         selectedSection.Indent = selectedSection.Indent + 1;
         this.update_sections();
         this.SectionList.SelectedIndices.Add(num);
     }
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 3
0
 private void SectionUpBtn_Click(object sender, EventArgs e)
 {
     if (this.SelectedSection != null)
     {
         int selectedSection     = this.fPower.Sections.IndexOf(this.SelectedSection);
         PlayerPowerSection item = this.fPower.Sections[selectedSection - 1];
         this.fPower.Sections[selectedSection - 1] = this.SelectedSection;
         this.fPower.Sections[selectedSection]     = item;
         this.update_sections();
         this.SectionList.SelectedIndices.Add(selectedSection - 1);
     }
 }
Ejemplo n.º 4
0
        private void SectionDownBtn_Click(object sender, EventArgs e)
        {
            if (SelectedSection != null)
            {
                int index = fPoison.Sections.IndexOf(SelectedSection);

                PlayerPowerSection tmp = fPoison.Sections[index + 1];
                fPoison.Sections[index + 1] = SelectedSection;
                fPoison.Sections[index]     = tmp;

                update_sections();

                SectionList.SelectedIndices.Add(index + 1);
            }
        }
Ejemplo n.º 5
0
        private void Application_Idle(object sender, EventArgs e)
        {
            int num = this.fPower.Sections.IndexOf(this.SelectedSection);

            this.SectionRemoveBtn.Enabled = this.SelectedSection != null;
            this.SectionEditBtn.Enabled   = this.SelectedSection != null;
            this.SectionUpBtn.Enabled     = (this.SelectedSection == null ? false : num != 0);
            this.SectionDownBtn.Enabled   = (this.SelectedSection == null ? false : num != this.fPower.Sections.Count - 1);
            this.SectionLeftBtn.Enabled   = (this.SelectedSection == null ? false : this.SelectedSection.Indent > 0);
            this.SectionRightBtn.Enabled  = false;
            if (num > 0)
            {
                PlayerPowerSection item = this.fPower.Sections[num - 1];
                this.SectionRightBtn.Enabled = (this.SelectedSection == null ? false : this.SelectedSection.Indent <= item.Indent);
            }
        }
Ejemplo n.º 6
0
        void Application_Idle(object sender, EventArgs e)
        {
            int index = fPoison.Sections.IndexOf(SelectedSection);

            SectionRemoveBtn.Enabled = (SelectedSection != null);
            SectionEditBtn.Enabled   = (SelectedSection != null);

            SectionUpBtn.Enabled   = ((SelectedSection != null) && (index != 0));
            SectionDownBtn.Enabled = ((SelectedSection != null) && (index != fPoison.Sections.Count - 1));

            SectionLeftBtn.Enabled  = ((SelectedSection != null) && (SelectedSection.Indent > 0));
            SectionRightBtn.Enabled = false;
            if (index > 0)
            {
                PlayerPowerSection prev = fPoison.Sections[index - 1];
                SectionRightBtn.Enabled = ((SelectedSection != null) && (SelectedSection.Indent <= prev.Indent));
            }
        }
 public OptionPowerSectionForm(PlayerPowerSection section)
 {
     this.InitializeComponent();
     this.HeaderBox.Items.Add("Attack");
     this.HeaderBox.Items.Add("Trigger");
     this.HeaderBox.Items.Add("Effect");
     this.HeaderBox.Items.Add("Aftereffect");
     this.HeaderBox.Items.Add("Hit");
     this.HeaderBox.Items.Add("Miss");
     this.HeaderBox.Items.Add("Target");
     this.HeaderBox.Items.Add("Prerequisite");
     this.HeaderBox.Items.Add("Requirement");
     this.HeaderBox.Items.Add("Sustain");
     this.HeaderBox.Items.Add("Special");
     this.fSection        = section.Copy();
     this.HeaderBox.Text  = this.fSection.Header;
     this.DetailsBox.Text = this.fSection.Details;
 }