예제 #1
0
 public void ApplyToEdit(SyntaxEdit SyntaxEdit)
 {
     SyntaxEdit.Source.BeginUpdate(UpdateReason.Other);
     try
     {
         SyntaxEdit.Outlining.AllowOutlining = this.AllowOutlining;
         SyntaxEdit.Outlining.OutlineOptions = this.OutlineOptions;
         SyntaxEdit.Font                   = this.Font;
         SyntaxEdit.Gutter.Options         = this.GutterOptions;
         SyntaxEdit.Gutter.Width           = this.GutterWidth;
         SyntaxEdit.Margin.Position        = this.MarginPos;
         SyntaxEdit.NavigateOptions        = this.NavigateOptions;
         SyntaxEdit.Scrolling.ScrollBars   = this.ScrollBars;
         SyntaxEdit.Selection.Options      = this.SelectionOptions;
         SyntaxEdit.Gutter.Visible         = this.ShowGutter;
         SyntaxEdit.Margin.Visible         = this.ShowMargin;
         SyntaxEdit.Source.Lines.TabStops  = this.TabStops;
         SyntaxEdit.Source.Lines.UseSpaces = this.UseSpaces;
         SyntaxEdit.WordWrap               = this.WordWrap;
         this.CopyStyles(this.LexStyles, this.GetLexStyles(SyntaxEdit));
         SyntaxEdit.Spelling.SpellColor         = this.LexStyles[this.LexStyles.Length - 1].ForeColor;
         SyntaxEdit.HyperText.HighlightUrls     = this.HighlightUrls;
         SyntaxEdit.HyperText.UrlColor          = this.LexStyles[this.LexStyles.Length - 2].ForeColor;
         SyntaxEdit.HyperText.UrlStyle          = this.LexStyles[this.LexStyles.Length - 2].FontStyle;
         SyntaxEdit.Gutter.LineNumbersForeColor = this.lexStyles[this.LexStyles.Length - 3].ForeColor;
     }
     finally
     {
         SyntaxEdit.Source.EndUpdate();
     }
     SyntaxEdit.Invalidate();
 }
예제 #2
0
파일: Margin.cs 프로젝트: stevencohn/Orqa
 protected internal void DrawLine(int X, int Y, bool Erase)
 {
     this.drawX = X;
     this.drawY = Y;
     if (this.owner != null)
     {
         Rectangle  rectangle1;
         SyntaxEdit edit1 = (SyntaxEdit)this.owner;
         if (edit1.Pages.PageType == PageType.PageLayout)
         {
             IEditPage page1 = edit1.Pages.GetPageAtPoint(X, Y);
             if (page1 == null)
             {
                 return;
             }
             rectangle1 = page1.ClientRect;
         }
         else
         {
             rectangle1 = edit1.ClientRect;
         }
         if (Erase)
         {
             edit1.Invalidate(new Rectangle(X, rectangle1.Top, 1, rectangle1.Height));
         }
         else
         {
             Graphics graphics1 = edit1.CreateGraphics();
             try
             {
                 graphics1.DrawLine(this.pen, X, rectangle1.Top, X, (int)(rectangle1.Bottom - 1));
             }
             finally
             {
                 graphics1.Dispose();
             }
         }
     }
 }