コード例 #1
0
        /// <summary>
        /// Loads the item properties
        /// </summary>
        private void LoadProperties()
        {
            string[] bareAttr;
            bareAttr = ItemHtmlHelper.GetBareAttributes(this.item, this.filterExtra);
            string bgcolor = "#2e1f15";

            // Base Item Attributes
            if (bareAttr[0].Length == 0)
            {
                this.webBrowser1.Hide();
                this.label2.Hide();
            }
            else
            {
                this.webBrowser1.DocumentText = string.Format(CultureInfo.InvariantCulture, "<body bgcolor={0} text=white><font face=\"Albertus MT\" size=1>{1}", bgcolor, bareAttr[0]);
                this.webBrowser1.Show();
                this.label2.Show();
            }

            // Prefix Attributes
            if (bareAttr[2].Length == 0)
            {
                this.webBrowser2.Hide();
                this.label1.Hide();
            }
            else
            {
                this.webBrowser2.DocumentText = string.Format(CultureInfo.InvariantCulture, "<body bgcolor={0} text=white><font face=\"Albertus MT\" size=1>{1}", bgcolor, bareAttr[2]);
                this.webBrowser2.Show();
                this.label1.Show();
            }

            // Suffix Attributes
            if (bareAttr[3].Length == 0)
            {
                this.webBrowser3.Hide();
                this.label3.Hide();
            }
            else
            {
                this.webBrowser3.DocumentText = string.Format(CultureInfo.InvariantCulture, "<body bgcolor={0} text=white><font face=\"Albertus MT\" size=1>{1}", bgcolor, bareAttr[3]);
                this.webBrowser3.Show();
                this.label3.Show();
            }
        }