Пример #1
0
        private void UpdateControls()
        {
            // tosses the character information relevant to each character
            #region Condition Monitor
            ConditionMonitorUserControl uc =
                this.tabControl.TabPages[(int)DashBoardPages.CM].Controls[0] as ConditionMonitorUserControl;
            uc.MaxPhysical = this.CurrentNPC.PhysicalCM;
            uc.MaxStun     = this.CurrentNPC.StunCM;
            uc.Physical    = uc.MaxPhysical;
            uc.Stun        = uc.MaxStun;
            #endregion

            #region Dice Roller
            DiceRollerControl dice =
                this.tabControl.TabPages[(int)DashBoardPages.Dice].Controls[0] as DiceRollerControl;
            //dice.NumberOfEdge = this.CurrentNPC.EDG;    // todo figure out number of edge dice
            #endregion
        }
Пример #2
0
        private void UpdateControls()
        {
            // tosses the character information relevant to each character
            #region Condition Monitor
            ConditionMonitorUserControl uc =
                this.tabControl.TabPages[(int)DashBoardPages.CM].Controls[0] as ConditionMonitorUserControl;
            uc.MaxPhysical = this.CurrentNPC.PhysicalCM;
            uc.MaxStun     = this.CurrentNPC.StunCM;
            uc.Physical    = uc.MaxPhysical;
            uc.Stun        = uc.MaxStun;
            #endregion

            #region Skill tab
            FlowLayoutPanel panel = new FlowLayoutPanel();
            foreach (Skill skill in this.CurrentNPC.Skills)
            {
                if (skill.KnowledgeSkill)
                {
                    continue;   // improvement for knowledge skills goes here
                }
                // insert new skill control
                SmallSkillControl ucSkill = new SmallSkillControl(this);
                ucSkill.Skill      = skill;
                ucSkill.DiceClick += DiceClick_Clicked;
                // add the skill to the collection of skills to show
                panel.Controls.Add(ucSkill);
            }
            panel.Dock        = DockStyle.Fill;
            panel.AutoScroll  = true;
            panel.MouseEnter += (object sender, EventArgs e) => { panel.Focus(); };
            this.tabControl.TabPages[(int)DashBoardPages.Skills].Controls.Add(panel);
            #endregion

            #region Dice Roller
            DiceRollerControl dice =
                this.tabControl.TabPages[(int)DashBoardPages.Dice].Controls[0] as DiceRollerControl;
            //dice.NumberOfEdge = this.CurrentNPC.EDG;    // todo figure out number of edge dice
            #endregion
        }