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

            #region Skill tab
            //TODO fix this
            #endregion

            #region Dice Roller

            /*
             * DiceRollerControl dice =
             *  tabControl.TabPages[(int)DashBoardPages.Dice].Controls[0] as DiceRollerControl;
             * dice.NumberOfEdge = this.CurrentNPC.EDG;    // todo figure out number of edge dice
             */
            #endregion
        }
Beispiel #2
0
        /*
         * Updates the tabs
         */
        private void UpdateTabs()
        {
            InitTabpages();

            // setup the controls for fixed tabs
            _conditionMonitorUserControl = new ConditionMonitorUserControl();
            _conditionMonitorUserControl.CurrentCharacterDamageApplied += _conditionMonitorUserControl_CurrentCharacterDamageApplied;;
            this.tabControl.TabPages[(int)DashBoardPages.CM].Controls.Add(_conditionMonitorUserControl);
            this.tabControl.TabPages[(int)DashBoardPages.Dice].Controls.Add(new DiceRollerControl());
        }
Beispiel #3
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
        }
Beispiel #4
0
        private void UpdateControls()
        {
            if (CurrentNPC == null)
            {
                return;
            }
            // 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    = CurrentNPC.PhysicalCMFilled;
            uc.Stun        = CurrentNPC.StunCMFilled;
            uc.Modifier    = CurrentNPC.DamageInitModifier;
            uc.MaxOverflow = CurrentNPC.CMOverflow;

            #endregion

            #region Skill tab

            this.tabControl.TabPages[(int)DashBoardPages.Skills].Controls.Clear();
            FlowLayoutPanel panel = new FlowLayoutPanel();
            foreach (Skill skill in this.CurrentNPC.SkillsSection.Skills.Where(s => s.Rating > 0))
            {
                if (skill.IsKnowledgeSkill)
                {
                    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
            // todo figure out number of edge dice
            #endregion

            #region Spelltab
            this.tabControl.TabPages[(int)DashBoardPages.Spells].Controls.Clear();
            FlowLayoutPanel spellPanel = new FlowLayoutPanel();

            foreach (Spell spell in this.CurrentNPC.Spells.OrderBy(s => s.Category))
            {
                //get a new spellcontroll
                var ucSpell = GetSmallSpellControl(spell);
                LanguageManager.Instance.Load(GlobalOptions.Instance.Language, ucSpell);
                // add the skill to the collection of skills to show
                spellPanel.Controls.Add(ucSpell);
            }
            spellPanel.Dock        = DockStyle.Fill;
            spellPanel.AutoScroll  = true;
            spellPanel.MouseEnter += (object sender, EventArgs e) => { panel.Focus(); };
            this.tabControl.TabPages[(int)DashBoardPages.Spells].Controls.Add(spellPanel);

            #endregion
            LanguageManager.Instance.Load(GlobalOptions.Instance.Language, this);
        }
 /*
  * Updates the tabs 
  */
 private void UpdateTabs()
 {
     InitTabpages();
     
     // setup the controls for fixed tabs
     _conditionMonitorUserControl = new ConditionMonitorUserControl();
     _conditionMonitorUserControl.CurrentCharacterDamageApplied += _conditionMonitorUserControl_CurrentCharacterDamageApplied; ;
     this.tabControl.TabPages[(int)DashBoardPages.CM].Controls.Add(_conditionMonitorUserControl);
     this.tabControl.TabPages[(int)DashBoardPages.Dice].Controls.Add(new DiceRollerControl());
 }