예제 #1
0
        /// <summary>
        /// Loads the item properties
        /// </summary>
        private void LoadProperties()
        {
            this.Data = ItemProvider.GetFriendlyNames(this.Item, FriendlyNamesExtraScopes.ItemFullDisplay, this.checkBoxFilterExtraInfo.Checked);

            // ItemName
            this.labelItemName.ForeColor = this.Data.Item.GetColor(Data.BaseItemInfoDescription);
            this.labelItemName.Text      = this.Data.FullName.RemoveAllTQTags();

            // Base Item Attributes
            if (this.Data.BaseAttributes.Any())
            {
                this.flowLayoutBaseItemProperties.Controls.Clear();
                foreach (var prop in this.Data.BaseAttributes)
                {
                    this.flowLayoutBaseItemProperties.Controls.Add(ItemTooltip.MakeRow(prop));
                }
                this.flowLayoutBaseItemProperties.Show();
                this.labelBaseItemProperties.Show();
            }
            else
            {
                this.flowLayoutBaseItemProperties.Hide();
                this.labelBaseItemProperties.Hide();
            }

            // Prefix Attributes
            if (this.Data.PrefixAttributes.Any())
            {
                this.flowLayoutPrefixProperties.Controls.Clear();
                foreach (var prop in this.Data.PrefixAttributes)
                {
                    this.flowLayoutPrefixProperties.Controls.Add(ItemTooltip.MakeRow(prop));
                }
                this.flowLayoutPrefixProperties.Show();
                this.labelPrefixProperties.Show();
            }
            else
            {
                this.flowLayoutPrefixProperties.Hide();
                this.labelPrefixProperties.Hide();
            }

            // Suffix Attributes
            if (this.Data.SuffixAttributes.Any())
            {
                this.flowLayoutSuffixProperties.Controls.Clear();
                foreach (var prop in this.Data.SuffixAttributes)
                {
                    this.flowLayoutSuffixProperties.Controls.Add(ItemTooltip.MakeRow(prop));
                }
                this.flowLayoutSuffixProperties.Show();
                this.labelSuffixProperties.Show();
            }
            else
            {
                this.flowLayoutSuffixProperties.Hide();
                this.labelSuffixProperties.Hide();
            }
        }