Exemple #1
0
 public PowerForm(CreaturePower power, bool functional_template, bool unused)
 {
     this.InitializeComponent();
     this.Pages.TabPages.Remove(this.AdvicePage);
     this.RangeBox.Items.Add("Melee");
     this.RangeBox.Items.Add("Melee Touch");
     this.RangeBox.Items.Add("Melee Weapon");
     this.RangeBox.Items.Add("Melee N");
     this.RangeBox.Items.Add("Reach N");
     this.RangeBox.Items.Add("Ranged N");
     this.RangeBox.Items.Add("Close Blast N");
     this.RangeBox.Items.Add("Close Burst N");
     this.RangeBox.Items.Add("Area Burst N within N");
     this.RangeBox.Items.Add("Personal");
     this.fPower = power.Copy();
     this.fFunctionalTemplate = functional_template;
     this.NameBox.Text        = this.fPower.Name;
     this.KeywordBox.Text     = this.fPower.Keywords;
     this.ConditionBox.Text   = this.fPower.Condition;
     this.update_action();
     this.update_attack();
     this.RangeBox.Text   = this.fPower.Range;
     this.DetailsBox.Text = this.fPower.Details;
     this.DescBox.Text    = this.fPower.Description;
 }
Exemple #2
0
        private void copy_power(CreaturePower power)
        {
            CreaturePower creaturePower = power.Copy();

            creaturePower.ID = Guid.NewGuid();
            if (this.fCallback == null)
            {
                this.fSelectedPower = power;
                base.DialogResult   = System.Windows.Forms.DialogResult.OK;
                base.Close();
                return;
            }
            this.fCallback(creaturePower);
            this.fAddedPowers.Add(creaturePower.Name);
            this.update_powers();
        }
        void copy_power(CreaturePower power)
        {
            CreaturePower cp = power.Copy();

            cp.ID = Guid.NewGuid();

            if (fCallback != null)
            {
                fCallback(cp);
                fAddedPowers.Add(cp.Name);

                update_powers();
            }
            else
            {
                fSelectedPower = power;

                DialogResult = DialogResult.OK;
                Close();
            }
        }