示例#1
0
        public SkillsDetail(IEnumerable <SkillAggregate> skillAggregate, Database.Database.Type type)
        {
            InitializeComponent();
            _skills = skillAggregate;
            _type   = type;

            switch (_type)
            {
            case Database.Database.Type.Damage:
            {
                var header = new SkillsHeaderDps();
                ContentWidth = header.Width;
                header.LabelName.MouseRightButtonUp             += LabelNameOnMouseRightButtonUp;
                header.LabelAverageCrit.MouseRightButtonUp      += LabelAverageCritOnMouseRightButtonUp;
                header.LabelAverageHit.MouseRightButtonUp       += LabelAverageHitOnMouseRightButtonUp;
                header.LabelBiggestCrit.MouseRightButtonUp      += LabelBiggestCritOnMouseRightButtonUp;
                header.LabelCritRateDmg.MouseRightButtonUp      += LabelCritRateDmgOnMouseRightButtonUp;
                header.LabelDamagePercentage.MouseRightButtonUp += LabelDamagePercentageOnMouseRightButtonUp;
                header.LabelNumberHitDmg.MouseRightButtonUp     += LabelNumberHitDmgOnMouseRightButtonUp;
                header.LabelTotalDamage.MouseRightButtonUp      += LabelTotalDamageOnMouseRightButtonUp;
                header.LabelNumberCritDmg.MouseRightButtonUp    += LabelNumberCritDmgOnMouseRightButtonUp;
                header.LabelAverageTotal.MouseRightButtonUp     += LabelAverageTotalOnMouseRightButtonUp;
                _currentSortedLabel = header.LabelTotalDamage;
                SkillsList.Items.Add(header);
            }
            break;

            case Database.Database.Type.Heal:
            {
                var header = new SkillsHeaderHeal();
                ContentWidth = header.Width;

                header.LabelName.MouseRightButtonUp           += LabelNameOnMouseRightButtonUp;
                header.LabelCritRateHeal.MouseRightButtonUp   += LabelCritRateHealOnMouseRightButtonUp;
                header.LabelNumberHitHeal.MouseRightButtonUp  += LabelNumberHitHealOnMouseRightButtonUp;
                header.LabelNumberCritHeal.MouseRightButtonUp += LabelNumberCritHealOnMouseRightButtonUp;
                header.LabelTotalHeal.MouseRightButtonUp      += LabelTotalHealOnMouseRightButtonUp;
                header.LabelAverage.MouseRightButtonUp        += LabelAverageOnMouseRightButtonUp;
                header.LabelAverageCrit.MouseRightButtonUp    += LabelAverageHealCritOnMouseRightButtonUp;
                header.LabelAverageHit.MouseRightButtonUp     += LabelAverageHealHitOnMouseRightButtonUp;
                header.LabelBiggestCrit.MouseRightButtonUp    += LabelBiggestHealCritOnMouseRightButtonUp;
                header.LabelBiggestHit.MouseRightButtonUp     += LabelBiggestHealHitOnMouseRightButtonUp;
                _currentSortedLabel = header.LabelTotalHeal;
                SkillsList.Items.Add(header);
            }
            break;

            case Database.Database.Type.Mana:
            {
                var header = new SkillsHeaderMana();
                ContentWidth = header.Width;

                header.LabelName.MouseRightButtonUp          += LabelNameOnMouseRightButtonUp;
                header.LabelNumberHitMana.MouseRightButtonUp += LabelNumberHitManaOnMouseRightButtonUp;
                header.LabelTotalMana.MouseRightButtonUp     += LabelTotalManaOnMouseRightButtonUp;
                _currentSortedLabel = header.LabelTotalMana;
                SkillsList.Items.Add(header);
            }
            break;

            case Database.Database.Type.Counter:
            {
                var header = new SkillsHeaderCounter();
                ContentWidth = header.Width;

                header.LabelName.MouseRightButtonUp      += LabelNameOnMouseRightButtonUp;
                header.LabelNumberHit.MouseRightButtonUp += LabelNumberHitCounterOnMouseRightButtonUp;
                _currentSortedLabel = header.LabelNumberHit;
                SkillsList.Items.Add(header);
            }
            break;

            default: throw new ArgumentOutOfRangeException();
            }

            Repaint();
        }
示例#2
0
        public SkillsDetail(Dictionary <DamageMeter.Skills.Skill.Skill, SkillStats> skills, Type type, Entity currentBoss, bool timedEncounter)
        {
            InitializeComponent();
            _currentBoss    = currentBoss;
            _timedEncounter = timedEncounter;
            TypeSkill       = type;
            switch (TypeSkill)
            {
            case Type.Dps:
            {
                var header = new SkillsHeaderDps();
                ContentWidth = header.Width;
                header.LabelName.MouseRightButtonUp             += LabelNameOnMouseRightButtonUp;
                header.LabelAverageCrit.MouseRightButtonUp      += LabelAverageCritOnMouseRightButtonUp;
                header.LabelAverageHit.MouseRightButtonUp       += LabelAverageHitOnMouseRightButtonUp;
                header.LabelBiggestCrit.MouseRightButtonUp      += LabelBiggestCritOnMouseRightButtonUp;
                header.LabelCritRateDmg.MouseRightButtonUp      += LabelCritRateDmgOnMouseRightButtonUp;
                header.LabelDamagePercentage.MouseRightButtonUp += LabelDamagePercentageOnMouseRightButtonUp;
                header.LabelNumberHitDmg.MouseRightButtonUp     += LabelNumberHitDmgOnMouseRightButtonUp;
                header.LabelTotalDamage.MouseRightButtonUp      += LabelTotalDamageOnMouseRightButtonUp;
                header.LabelNumberCritDmg.MouseRightButtonUp    += LabelNumberCritDmgOnMouseRightButtonUp;
                header.LabelAverageTotal.MouseRightButtonUp     += LabelAverageTotalOnMouseRightButtonUp;
                _currentSortedLabel = header.LabelTotalDamage;
                SkillsList.Items.Add(header);
            }
            break;

            case Type.Heal:
            {
                var header = new SkillsHeaderHeal();
                ContentWidth = header.Width;

                header.LabelName.MouseRightButtonUp           += LabelNameOnMouseRightButtonUp;
                header.LabelCritRateHeal.MouseRightButtonUp   += LabelCritRateHealOnMouseRightButtonUp;
                header.LabelNumberHitHeal.MouseRightButtonUp  += LabelNumberHitHealOnMouseRightButtonUp;
                header.LabelNumberCritHeal.MouseRightButtonUp += LabelNumberCritHealOnMouseRightButtonUp;
                header.LabelTotalHeal.MouseRightButtonUp      += LabelTotalHealOnMouseRightButtonUp;
                header.LabelAverage.MouseRightButtonUp        += LabelAverageOnMouseRightButtonUp;
                header.LabelAverageCrit.MouseRightButtonUp    += LabelAverageHealCritOnMouseRightButtonUp;
                header.LabelAverageHit.MouseRightButtonUp     += LabelAverageHealHitOnMouseRightButtonUp;
                header.LabelBiggestCrit.MouseRightButtonUp    += LabelBiggestHealCritOnMouseRightButtonUp;
                header.LabelBiggestHit.MouseRightButtonUp     += LabelBiggestHealHitOnMouseRightButtonUp;
                _currentSortedLabel = header.LabelTotalHeal;
                SkillsList.Items.Add(header);
            }
            break;

            default:
            case Type.Mana:

            {
                var header = new SkillsHeaderMana();
                ContentWidth = header.Width;

                header.LabelName.MouseRightButtonUp          += LabelNameOnMouseRightButtonUp;
                header.LabelNumberHitMana.MouseRightButtonUp += LabelNumberHitManaOnMouseRightButtonUp;
                header.LabelTotalMana.MouseRightButtonUp     += LabelTotalManaOnMouseRightButtonUp;
                _currentSortedLabel = header.LabelTotalMana;
                SkillsList.Items.Add(header);
            }
            break;
            }


            _skills = skills;
            Repaint();
        }