private static List<IListItem> GetPartialListViewForLegendaryPower(string headerText, LegendaryPower power, D3Picture icon)
        {
            var list = new List<IListItem>
            {
                new SectionHeaderListItem(headerText),
                new PowerListItem(power, icon)
            };

            return list;
        }
        private static IListItem GetDataForItem(string label, Item item, D3Picture icon)
        {
            if (item == null || item.Name == null)
            {
                return null;
            }

            if (icon != null)
            {
                return new GearItemListItem(label, item, icon);
            }

            return new GearItemListItem(label, item);
        }
        private static List<IListItem> GetPartialListViewForPassiveSkill(String headerText, PassiveSkill passive, D3Picture icon)
        {
            var list = new List<IListItem>
            {
                new SectionHeaderListItem(headerText)
            };

            if (passive.Skill != null)
            {
                list.Add(new SkillListItem(passive.Skill, icon));
            }

            return list;
        }
        private static List<IListItem> GetPartialListViewForActiveSkill(String headerText, ActiveSkill active, D3Picture icon)
        {
            var list = new List<IListItem>
            {
                new SectionHeaderListItem(headerText)
            };

            if (active.Skill != null)
            {
                list.Add(new SkillListItem(active.Skill, icon));
            }
            if (active.Rune != null)
            {
                list.Add(new RuneListItem(active.Rune));
            }

            return list;
        }
Пример #5
0
        /// <summary>
        /// Fetches the icons of all hero legendary powers.
        /// </summary>
        /// <param name="powers"></param>
        public void FetchLegendaryPowerIcons(LegendaryPower[] powers)
        {
            if (powers == null)
            {
                return;
            }

            var powerCount = powers.Length;
            System.Console.WriteLine(powerCount);
            if (powerCount >= 1)
            {
                LegendaryPower1 = FetchIconOf(powers[0]);
                System.Console.WriteLine(LegendaryPower1);
            }
            if (powerCount >= 2)
            {
                LegendaryPower2 = FetchIconOf(powers[1]);
                System.Console.WriteLine(LegendaryPower2);
            }
            if (powerCount >= 3)
            {
                LegendaryPower3 = FetchIconOf(powers[2]);
                System.Console.WriteLine(LegendaryPower3);
            }
        }
Пример #6
0
        /// <summary>
        /// Fetches the icons of all hero passive skills.
        /// </summary>
        /// <param name="skills"></param>
        public void FetchPassiveSkillIcons(PassiveSkill[] skills)
        {
            if (skills == null)
            {
                return;
            }

            var passiveCount = skills.Length;
            if (passiveCount >= 1)
            {
                PassiveSkill1 = FetchIconOf(skills[0]);
            }
            if (passiveCount >= 2)
            {
                PassiveSkill2 = FetchIconOf(skills[1]);
            }
            if (passiveCount >= 3)
            {
                PassiveSkill3 = FetchIconOf(skills[2]);
            }
            if (passiveCount >= 4)
            {
                PassiveSkill4 = FetchIconOf(skills[3]);
            }
        }
Пример #7
0
        /// <summary>
        /// Fetches the icons of all hero items.
        /// </summary>
        /// <param name="items"></param>
        public void FetchItemIcons(HeroItems items)
        {
            if (items == null)
            {
                return;
            }

            Head = FetchIconOf(items.Head);
            Torso = FetchIconOf(items.Torso);
            Feet = FetchIconOf(items.Feet);
            Hands = FetchIconOf(items.Hands);
            Shoulders = FetchIconOf(items.Shoulders);
            Legs = FetchIconOf(items.Legs);
            Bracers = FetchIconOf(items.Bracers);
            MainHand = FetchIconOf(items.MainHand);
            OffHand = FetchIconOf(items.OffHand);
            Waist = FetchIconOf(items.Waist);
            RightFinger = FetchIconOf(items.RightFinger);
            LeftFinger = FetchIconOf(items.LeftFinger);
            Neck = FetchIconOf(items.Neck);
        }
Пример #8
0
        /// <summary>
        /// Fetches the icons of all hero active skills.
        /// </summary>
        /// <param name="skills"></param>
        public void FetchActiveSkillIcons(ActiveSkill[] skills)
        {
            if (skills == null)
            {
                return;
            }

            ActiveSkill1 = FetchIconOf(skills[0]);
            ActiveSkill2 = FetchIconOf(skills[1]);
            ActiveSkill3 = FetchIconOf(skills[2]);
            ActiveSkill4 = FetchIconOf(skills[3]);
            ActiveSkill5 = FetchIconOf(skills[4]);
            ActiveSkill6 = FetchIconOf(skills[5]);
        }
Пример #9
0
 public static D3Picture GetItemIcon(String icon)
 {
     D3Picture picture;
     using (var stream = DataProvider.FetchData(GetItemIconUrl(icon, "small")))
     {
         picture = new D3Picture(stream);
     }
     return picture;
 }
Пример #10
0
 public static D3Picture GetSkillIcon(String icon, String size)
 {
     D3Picture picture;
     using (var stream = DataProvider.FetchData(GetSkillIconUrl(icon, size)))
     {
         picture = new D3Picture(stream);
     }
     return picture;
 }
 private IListItem GetDataForItem(int id, Item itemSummary, D3Picture icon)
 {
     return GetDataForItem(Resources.GetString(id), itemSummary, icon);
 }
Пример #12
0
 public SkillListItem(Skill skill, D3Picture icon)
 {
     Skill = skill;
     Icon = icon;
 }
Пример #13
0
 public PowerListItem(LegendaryPower power, D3Picture icon)
 {
     Power = power;
     Icon = icon;
 }
Пример #14
0
 public GearItemListItem(String label, Item item, D3Picture icon)
 {
     this.label = label;
     this.item = item;
     this.icon = icon;
 }