Beispiel #1
0
            public override void Paint(Graphics graphics, Revision revision, Rectangle rect)
            {
                if (_text == null || _text.Text != revision.Body)
                {
                    _text = new TextWithHyperlinks(revision.Body, GetHyperlinkExtractor(revision));
                    _text.InvalidateRequired += OnTextInvalidateRequired;
                }

                DefaultPaint(graphics, Resources.StrBody.AddColon(), _text, rect);
            }
Beispiel #2
0
            protected void DefaultPaint(Graphics graphics, Font font, string header, TextWithHyperlinks content, Rectangle rect)
            {
                var r1         = new Rectangle(rect.X, rect.Y, HeaderWidth - 4, DefaultElementHeight);
                var r2         = new Rectangle(rect.X + HeaderWidth, rect.Y, rect.Width - HeaderWidth, rect.Height);
                var headerFont = GitterApplication.FontManager.UIFont.Font;

                r1.Y += GetYOffset(headerFont);
                r2.Y += GetYOffset(font);
                using (var brush = new SolidBrush(Owner.Style.Colors.GrayText))
                {
                    GitterApplication.TextRenderer.DrawText(
                        graphics, header, headerFont, brush, r1, HeaderFormat);
                }
                content.Render(Owner.Style, graphics, font, r2);
            }
Beispiel #3
0
            protected void DefaultPaint(Graphics graphics, string header, TextWithHyperlinks content, Rectangle rect)
            {
                var font = GitterApplication.FontManager.UIFont.Font;

                DefaultPaint(graphics, font, header, content, rect);
            }