Beispiel #1
0
 internal GeneralPage(ConfigPage page) : this()
 {
     _UI.CommonEventAction += () => Config.Instance.FireConfigChangedEvent(Features.None);
 }
Beispiel #2
0
 internal SuperQuickInfoPage(ConfigPage page) : this()
 {
 }
Beispiel #3
0
 internal ScrollbarMarkerPage(ConfigPage page) : this()
 {
 }
Beispiel #4
0
 internal ScrollbarMarkerPage(ConfigPage page) : this()
 {
     _UI.CommonEventAction += () => Config.Instance.FireConfigChangedEvent(Features.ScrollbarMarkers);
 }
Beispiel #5
0
 internal CSharpSuperQuickInfoPage(ConfigPage page) : this()
 {
     _UI.CommonEventAction += () => Config.Instance.FireConfigChangedEvent(Features.SuperQuickInfo);
 }
Beispiel #6
0
 internal GeneralPage(ConfigPage page) : this()
 {
 }
Beispiel #7
0
 internal CSharpNaviBarPage(ConfigPage page) : this()
 {
     _UI.CommonEventAction += () => Config.Instance.FireConfigChangedEvent(Features.NaviBar);
 }
 internal CSharpSuperQuickInfoPage(ConfigPage page) : this()
 {
     //_UI.CommonEventAction += Config.Instance.FireConfigChangedEvent;
 }
 internal SyntaxStyleOptionPage(ConfigPage service, Func <IEnumerable <StyleBase> > styleLoader, Func <IEnumerable <StyleBase> > defaultStyleLoader) : this()
 {
     _service            = service;
     _styleLoader        = styleLoader;
     _defaultStyleLoader = defaultStyleLoader;
 }
        static void RenderPreview(Bitmap bmp, FontInfo fontInfo, StyleBase style)
        {
            var fontSize = (float)(fontInfo.wPointSize + style.FontSize);

            if (fontSize < 2)
            {
                return;
            }
            using (var g = Graphics.FromImage(bmp))
                using (var f = new Font(String.IsNullOrEmpty(style.Font) ? fontInfo.bstrFaceName : style.Font, fontSize, ConfigPage.GetFontStyle(style)))
                    using (var b = style.ForeColor.A == 0 ? (Brush)Brushes.Black.Clone() : new SolidBrush(style.ForeColor.ToGdiColor())) {
                        const string t = "Preview 01ioIOlLWM";
                        var          m = g.MeasureString(t, f, bmp.Size);
                        g.SmoothingMode      = SmoothingMode.HighQuality;
                        g.TextRenderingHint  = TextRenderingHint.AntiAlias;
                        g.CompositingQuality = CompositingQuality.HighQuality;
                        using (var bb = ConfigPage.GetPreviewBrush(style.BackgroundEffect, style.BackColor, ref m)) {
                            g.FillRectangle(bb, new Rectangle(0, 0, (int)m.Width, (int)m.Height));
                        }
                        g.DrawString(t, f, b, new RectangleF(PointF.Empty, bmp.PhysicalDimension));
                    }
        }
Beispiel #11
0
 internal MarkdownHighlightPage(ConfigPage page) : this()
 {
     _ServicePage           = page;
     _UI.CommonEventAction += () => Config.Instance.FireConfigChangedEvent(Features.SyntaxHighlight);
 }
Beispiel #12
0
 internal CSharpScrollbarMarkerPage(ConfigPage page) : this()
 {
     //_UI.CommonEventAction += Config.Instance.FireConfigChangedEvent;
 }
 internal CSharpSyntaxHighlightPage(ConfigPage page) : this()
 {
     _ServicePage = page;
 }