Beispiel #1
0
 /// <summary>
 /// Internally used ctor for glyph information class.
 /// </summary>
 /// <remarks>
 /// The default settings are:
 /// <list type="bullet">
 ///     <item>Tag: Parameter</item>
 ///     <item>Url: Parameter</item>
 ///     <item>Type: Parameter</item>
 ///     <item>Width: Parameter</item>
 ///     <item>Height: Parameter</item>
 ///     <item>Visible: True</item>
 /// </list>
 /// </remarks>
 /// <param name="tag">Tag this definition refers to.</param>
 /// <param name="type">Type of glyph.</param>
 /// <param name="imageUrl">URL of resource</param>
 /// <param name="width">Width in pixel (will bend image to fit into given value).</param>
 /// <param name="height">Height in pixel (will bend image to fit into given value).</param>
 public HtmlGlyphs(string tag, HtmlGlyphsType type, string imageUrl, int width, int height)
 {
     _tag      = tag;
     _imageUrl = imageUrl;
     _type     = type;
     _width    = width;
     _height   = height;
     _visible  = true;
 }
Beispiel #2
0
 /// <summary>
 /// Default ctor for glyph information class.
 /// </summary>
 /// <remarks>
 /// The default settings are:
 /// <list type="bullet">
 ///     <item>Tag: Empty</item>
 ///     <item>Url: Empty</item>
 ///     <item>Type: BothTags</item>
 ///     <item>Width: 32</item>
 ///     <item>Height: 16</item>
 ///     <item>Visible: False</item>
 /// </list>
 /// </remarks>
 public HtmlGlyphs()
 {
     _tag      = "";
     _imageUrl = "";
     _type     = HtmlGlyphsType.BothTags;
     _width    = 32;
     _height   = 16;
     _visible  = false;
 }
Beispiel #3
0
        /// <summary>
        /// Internally used ctor for glyph information class.
        /// </summary>
        /// <param name="tag"></param>
        /// <param name="type"></param>
        /// <param name="imageUrl"></param>
        /// <param name="prefix"></param>
        public HtmlGlyphs(string tag, HtmlGlyphsType type, string imageUrl, string prefix)
        {
            _tag      = tag;
            _imageUrl = imageUrl;
            _type     = type;
            string key = String.Format("{0}{1}{2}", prefix, tag.ToUpper(), GetTypeCode(type));
            Size   s   = imageSize[key];

            _width   = s.Width;
            _height  = s.Height;
            _visible = true;
        }
Beispiel #4
0
        private static string GetTypeCode(HtmlGlyphsType type)
        {
            switch (type)
            {
            case HtmlGlyphsType.OpenTag:
                return("-OPEN");

            case HtmlGlyphsType.CloseTag:
                return("-CLOSE");

            default:
                return("");
            }
        }
Beispiel #5
0
 internal static string GetGlyphKey(string tag, HtmlGlyphsType type)
 {
     return(String.Concat(tag, type));
 }