示例#1
0
 public BadgeStyle(IFontStyle defaultFontStyle, ISectionStyle defaultTextSectionStyle, IBadgeGeometry geometry,
                   double shadowRight, double shadowBottom)
 {
     DefaultFontStyle        = defaultFontStyle;
     DefaultTextSectionStyle = defaultTextSectionStyle;
     BadgeGeometry           = geometry;
     ShadowRight             = shadowRight;
     ShadowBottom            = shadowBottom;
 }
示例#2
0
        public void AddIconSection(ISectionStyle style)
        {
            if (!BadgeQueryData.Icon)
            {
                return;
            }

            var height = Convert.ToInt32(BadgeStyle.DefaultFontStyle.GetTextSize("test").Height) + BadgeGeometry.Padding.Top + BadgeGeometry.Padding.Bottom;
            var width  = height + BadgeGeometry.Padding.Middle;

            AddSection(new Section(SectionType.Icon, style, w: width, h: height));
        }
示例#3
0
 public Section(string text, SectionType sectionType, ISectionStyle style)
 {
     Text         = text;
     SectionType  = sectionType;
     SectionStyle = style;
     W            = 0;
     H            = 0;
     X            = 0;
     Y            = 0;
     Tw           = 0;
     Th           = 0;
     Path         = "";
 }
示例#4
0
 public Section(SectionType sectionType, ISectionStyle style, double w, double h)
 {
     Text         = "";
     SectionType  = sectionType;
     SectionStyle = style;
     W            = w;
     H            = h;
     X            = 0;
     Y            = 0;
     Tw           = 0;
     Th           = 0;
     Path         = "";
 }