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; }
/// <summary> /// Fetches the icon of a given legendary power. /// </summary> /// <param name="power"></param> /// <returns></returns> private static D3Picture FetchIconOf(LegendaryPower power) { if (power == null || power.Icon == null) { return null; } return D3Api.GetItemIcon(power.Icon, "large"); }
/// <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); } }
private static void UpdateNodeText(TreeNode node, LegendaryPower d3Object) { node.Text += $" >> {d3Object.Name}"; }
public PowerListItem(LegendaryPower power, D3Picture icon) { Power = power; Icon = icon; }
public PowerListItem(LegendaryPower power) { Power = power; }