private void GuiDoCalculationsForHero()
        {
            // Retrieve hero from the GUI
            var hero = GetEditedHero();

            heroLevel = hero.Level;

            // Retrieve worn items from the GUI
            var items = new List <Item>
            {
                guiItemChoiceBracers.Tag as Item,
                guiItemChoiceFeet.Tag as Item,
                guiItemChoiceHands.Tag as Item,
                guiItemChoiceHead.Tag as Item,
                guiItemChoiceLeftFinger.Tag as Item,
                guiItemChoiceLegs.Tag as Item,
                guiItemChoiceNeck.Tag as Item,
                guiItemChoiceRightFinger.Tag as Item,
                guiItemChoiceShoulders.Tag as Item,
                guiItemChoiceTorso.Tag as Item,
                guiItemChoiceWaist.Tag as Item,
                guiSetBonusEditor.GetEditedItem()
            };

            items = items.Where(i => i != null)
                    .Select(i => i.DeepClone())
                    .ToList();

            var mainHand = (guiItemChoiceMainHand.Tag as Item).DeepClone();

            var offHand = (guiItemChoiceOffHand.Tag as Item).DeepClone();

            var d3Calculator = new D3Calculator(hero, mainHand, offHand, items.ToArray());

            // Retrieve used skills from the GUI
            var passiveSkills = passiveCheckBoxes
                                .Where(p => p.Checked)
                                .Select(checkBox => PassiveSkillModifierFactory.GetFromSlug(checkBox.Tag as string))
                                .ToList();

            // Some buffs are applied after passives skills: followers skills and active skills
            var activeSkills = new List <ID3SkillModifier>();

            // Barbarian active skills
            AddActiveSkillIfChecked(activeSkills, guiSkillWarCry_Invigorate, typeof(WarCry_Invigorate));

            // Demon Hunter active skills
            AddActiveSkillIfChecked(activeSkills, guiSkillCompanion_BoarCompanion, typeof(Companion_BoarCompanion));

            // Monk active skills
            AddActiveSkillIfChecked(activeSkills, guiSkillMantraOfHealing_TimeOfNeed, typeof(MantraOfHealing_TimeOfNeed));
            AddActiveSkillIfChecked(activeSkills, guiSkillMantraOfEvasion_HardTarget, typeof(MantraOfEvasion_HardTarget));
            AddActiveSkillIfChecked(activeSkills, guiSkillMantraOfRetribution_Transgression, typeof(MantraOfRetribution_Transgression));
            AddActiveSkillIfChecked(activeSkills, guiSkillMysticAlly_EarthAlly, typeof(MysticAlly_EarthAlly));
            AddActiveSkillIfChecked(activeSkills, guiSkillMysticAlly_FireAlly, typeof(MysticAlly_FireAlly));

            // Witch Doctor active skills

            // Wizard skills

            // Followers
            AddActiveSkillIfChecked(activeSkills, guiSkillAnatomy, typeof(Anatomy));
            AddActiveSkillIfChecked(activeSkills, guiSkillFocusedMind, typeof(FocusedMind));
            AddActiveSkillIfChecked(activeSkills, guiSkillPoweredArmor, typeof(PoweredArmor));

            calculatedDps = d3Calculator.GetHeroDps(passiveSkills, activeSkills);

            UpdateItemsSummary(d3Calculator);

            UpdateCalculationResults(d3Calculator);

            DoActionOnCalculatedControls(UpdateResultControlColor);
        }
        private void GuiDoCalculationsForHero()
        {
            // Retrieve hero from the GUI
            var hero = GetEditedHero();

            heroLevel = hero.level;

            // Retrieve worn items from the GUI
            var items = new List <Item>
            {
                guiBracersEditor.GetEditedItem(),
                guiFeetEditor.GetEditedItem(),
                guiHandsEditor.GetEditedItem(),
                guiHeadEditor.GetEditedItem(),
                guiLeftFingerEditor.GetEditedItem(),
                guiLegsEditor.GetEditedItem(),
                guiNeckEditor.GetEditedItem(),
                guiRightFingerEditor.GetEditedItem(),
                guiShouldersEditor.GetEditedItem(),
                guiTorsoEditor.GetEditedItem(),
                guiWaistEditor.GetEditedItem(),
                guiSetBonusEditor.GetEditedItem()
            };

            var mainHand = guiMainHandEditor.GetEditedItem();

            var offHand = guiOffHandEditor.GetEditedItem();

            var d3Calculator = new D3Calculator(hero, mainHand, offHand, items.ToArray());

            // Retrieve used skills from the GUI
            var passiveSkills = passiveCheckBoxes
                                .Where(p => p.Checked)
                                .Select(checkBox => PassiveSkillModifierFactory.GetFromSlug(checkBox.Tag as string))
                                .ToList();

            // Some buffs are applied after passives skills: followers skills and active skills
            var activeSkills = new List <ID3SkillModifier>();

            // Barbarian active skills
            if (guiSkillWarCry_Invigorate.Checked)
            {
                activeSkills.Add(new WarCry_Invigorate());
            }

            // Demon Hunter active skills

            // Monk active skills
            if (guiSkillMantraOfHealing_TimeOfNeed.Checked)
            {
                activeSkills.Add(new MantraOfHealing_TimeOfNeed());
            }
            if (guiSkillMantraOfEvasion_HardTarget.Checked)
            {
                activeSkills.Add(new MantraOfEvasion_HardTarget());
            }
            if (guiSkillMysticAlly_EarthAlly.Checked)
            {
                activeSkills.Add(new MysticAlly_EarthAlly());
            }

            // Witch Doctor active skills

            // Wizard skills

            // Followers
            if (guiSkillAnatomy.Checked)
            {
                activeSkills.Add(new Anatomy());
            }
            if (guiSkillFocusedMind.Checked)
            {
                activeSkills.Add(new FocusedMind());
            }
            if (guiSkillPoweredArmor.Checked)
            {
                activeSkills.Add(new PoweredArmor());
            }

            guiCalculatedDPS.Text = d3Calculator.GetHeroDps(passiveSkills, activeSkills).Min.ToString();

            UpdateItemsSummary(d3Calculator);

            UpdateCalculationResults(d3Calculator);
        }