Example #1
0
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            labelItemName.Content = WowItem.Name;
            labelItemId.Content   = WowItem.Id;

            if (WowItem.GetType() == typeof(WowWeapon))
            {
                labelIcon.Content = "๐Ÿ—ก";
            }
            else if (WowItem.GetType() == typeof(WowArmor))
            {
                labelIcon.Content = "๐Ÿ›ก";
            }
            else if (WowItem.GetType() == typeof(WowConsumable))
            {
                labelIcon.Content = "๐Ÿ";
            }
            else if (WowItem.GetType() == typeof(WowContainer))
            {
                labelIcon.Content = "๐ŸŽ’";
            }
            else if (WowItem.GetType() == typeof(WowGem))
            {
                labelIcon.Content = "๐Ÿ’Ž";
            }
            else if (WowItem.GetType() == typeof(WowKey))
            {
                labelIcon.Content = "๐Ÿ—๏ธ";
            }
            else if (WowItem.GetType() == typeof(WowMoneyItem))
            {
                labelIcon.Content = "๐Ÿ’ฐ";
            }
            else if (WowItem.GetType() == typeof(WowProjectile) || WowItem.GetType() == typeof(WowQuiver))
            {
                labelIcon.Content = "๐Ÿน";
            }
            else if (WowItem.GetType() == typeof(WowQuestItem))
            {
                labelIcon.Content = "๐Ÿ’ก";
            }
            else if (WowItem.GetType() == typeof(WowReagent))
            {
                labelIcon.Content = "๐Ÿงช";
            }
            else if (WowItem.GetType() == typeof(WowRecipe))
            {
                labelIcon.Content = "๐Ÿ“œ";
            }
            else if (WowItem.GetType() == typeof(WowTradegood))
            {
                labelIcon.Content = "๐Ÿ“ฆ";
            }
            else if (WowItem.GetType() == typeof(WowMiscellaneousItem))
            {
                labelIcon.Content = "๐Ÿ“ฆ";
            }
            else
            {
                labelIcon.Content = "โ“";
            }

            labelItemType.Content = $"{WowItem.Type} - {WowItem.Subtype} - iLvl {WowItem.ItemLevel} - {WowItem.Durability}/{WowItem.MaxDurability}";

            labelItemName.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString(BotUtils.GetColorByQuality(WowItem.ItemQuality)));
        }