コード例 #1
0
        public PowerAttackForm(PowerAttack attack, bool functional_template, int level, IRole role)
        {
            InitializeComponent();

            Array defences = Enum.GetValues(typeof(DefenceType));

            foreach (DefenceType defence in defences)
            {
                DefenceBox.Items.Add(defence);
            }

            Application.Idle += new EventHandler(Application_Idle);

            fAttack             = attack.Copy();
            fFunctionalTemplate = functional_template;
            fLevel = level;
            fRole  = role;

            BonusBox.Value          = fAttack.Bonus;
            DefenceBox.SelectedItem = fAttack.Defence;

            set_suggestion();

            if (!fFunctionalTemplate)
            {
                InfoLbl.Visible = false;
                Height         -= InfoLbl.Height;
            }
        }
コード例 #2
0
 public PowerAttackForm(PowerAttack attack, bool functional_template, int level, IRole role)
 {
     this.InitializeComponent();
     foreach (DefenceType value in Enum.GetValues(typeof(DefenceType)))
     {
         this.DefenceBox.Items.Add(value);
     }
     Application.Idle        += new EventHandler(this.Application_Idle);
     this.fAttack             = attack.Copy();
     this.fFunctionalTemplate = functional_template;
     this.fLevel                  = level;
     this.fRole                   = role;
     this.BonusBox.Value          = this.fAttack.Bonus;
     this.DefenceBox.SelectedItem = this.fAttack.Defence;
     this.set_suggestion();
     if (!this.fFunctionalTemplate)
     {
         this.InfoLbl.Visible = false;
         PowerAttackForm height = this;
         height.Height = height.Height - this.InfoLbl.Height;
     }
 }