Exemple #1
0
        public DialogResult ShowDialog(Heroes.Core.Battle.Characters.Hero hero)
        {
            _hero = hero;

            foreach (Heroes.Core.Spell spell in hero._spells.Values)
            {
                _spells.Add(spell);
            }

            this.lblSpellPoint.Text = _hero._spellPointLeft.ToString();

            Clear();
            PplSpells();

            return this.ShowDialog();
        }
Exemple #2
0
        public frmCastSpell()
        {
            InitializeComponent();

            SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer | ControlStyles.ResizeRedraw
                | ControlStyles.UserPaint, true);

            _hero = null;
            _spells = new ArrayList();
            _currentPage = 0;

            _frmSpellInfo = null;

            _panelSpells = new Panel[]
            {
                this.panelSpell1, this.panelSpell2, this.panelSpell3, this.panelSpell4, this.panelSpell5, this.panelSpell6,
                this.panelSpell7, this.panelSpell8, this.panelSpell9, this.panelSpell10, this.panelSpell11, this.panelSpell12
            };

            _lblSpells = new Label[]
            {
                this.lblSpell1, this.lblSpell2, this.lblSpell3, this.lblSpell4, this.lblSpell5, this.lblSpell6,
                this.lblSpell7, this.lblSpell8, this.lblSpell9, this.lblSpell10, this.lblSpell11, this.lblSpell12
            };

            _lblNames = new Label[]
            {
                this.lblSpellName1, this.lblSpellName2, this.lblSpellName3, this.lblSpellName4, this.lblSpellName5, this.lblSpellName6,
                this.lblSpellName7, this.lblSpellName8, this.lblSpellName9, this.lblSpellName10, this.lblSpellName11, this.lblSpellName12
            };

            this.panelCancel.Click += new EventHandler(panelCancel_Click);

            foreach (Panel p in _panelSpells)
            {
                p.MouseClick += new MouseEventHandler(p_MouseClick);
                p.MouseDown += new MouseEventHandler(p_MouseDown);
                p.MouseUp += new MouseEventHandler(p_MouseUp);
            }
        }