Exemplo n.º 1
0
        /// <remarks>
        /// Creates a new <see cref="IDocument"/> object. Only create
        /// <see cref="IDocument"/> with this method.
        /// </remarks>
        public IDocument CreateDocument()
        {
            DefaultDocument doc = new DefaultDocument();

            doc.TextBufferStrategy             = new GapTextBufferStrategy();
            doc.FormattingStrategy             = new DefaultFormattingStrategy();
            doc.LineManager                    = new DefaultLineManager(doc, null);
            doc.FoldingManager                 = new FoldingManager(doc, doc.LineManager);
            doc.FoldingManager.FoldingStrategy = new ParserFoldingStrategy();
            doc.MarkerStrategy                 = new MarkerStrategy(doc);
            doc.BookmarkManager                = new BookmarkManager(doc.LineManager);
            return(doc);
        }
Exemplo n.º 2
0
        private static void AddDocument()
        {
            Netron.Neon.TextEditor.Document.DefaultDocument defaultDocument1 =
                new Netron.Neon.TextEditor.Document.DefaultDocument();
            Netron.Neon.TextEditor.Document.DefaultFormattingStrategy defaultFormattingStrategy1 =
                new Netron.Neon.TextEditor.Document.DefaultFormattingStrategy();
            Netron.Neon.TextEditor.Document.DefaultHighlightingStrategy defaultHighlightingStrategy1 =
                new Netron.Neon.TextEditor.Document.DefaultHighlightingStrategy();
            Netron.Neon.TextEditor.Document.GapTextBufferStrategy gapTextBufferStrategy1 =
                new Netron.Neon.TextEditor.Document.GapTextBufferStrategy();
            Netron.Neon.TextEditor.Document.DefaultTextEditorProperties defaultTextEditorProperties1 =
                new Netron.Neon.TextEditor.Document.DefaultTextEditorProperties();
            defaultDocument1.FormattingStrategy     = defaultFormattingStrategy1;
            defaultHighlightingStrategy1.Extensions = new string[0];
            defaultDocument1.HighlightingStrategy   = defaultHighlightingStrategy1;
            defaultDocument1.ReadOnly           = false;
            defaultDocument1.TextBufferStrategy = gapTextBufferStrategy1;
            defaultDocument1.TextContent        = "";
            defaultTextEditorProperties1.AllowCaretBeyondEOL    = false;
            defaultTextEditorProperties1.AutoInsertCurlyBracket = true;
            defaultTextEditorProperties1.BracketMatchingStyle   = Netron.Neon.TextEditor.Document.BracketMatchingStyle.After;
            defaultTextEditorProperties1.ConvertTabsToSpaces    = false;
            defaultTextEditorProperties1.CreateBackupCopy       = false;
            defaultTextEditorProperties1.DocumentSelectionMode  = Netron.Neon.TextEditor.Document.DocumentSelectionMode.Normal;
            defaultTextEditorProperties1.EnableFolding          = true;
//            defaultTextEditorProperties1.Encoding = ((System.Text.Encoding)(resources.GetObject("defaultTextEditorProperties1.Encoding")));
            defaultTextEditorProperties1.Font                 = new System.Drawing.Font("Courier New", 10F);
            defaultTextEditorProperties1.HideMouseCursor      = false;
            defaultTextEditorProperties1.IndentStyle          = Netron.Neon.TextEditor.Document.IndentStyle.None;
            defaultTextEditorProperties1.IsIconBarVisible     = true;
            defaultTextEditorProperties1.LineTerminator       = "\r\n";
            defaultTextEditorProperties1.LineViewerStyle      = Netron.Neon.TextEditor.Document.LineViewerStyle.FullRow;
            defaultTextEditorProperties1.MouseWheelScrollDown = true;
            defaultTextEditorProperties1.MouseWheelTextZoom   = true;
            defaultTextEditorProperties1.ShowEOLMarker        = true;
            defaultTextEditorProperties1.ShowHorizontalRuler  = false;
            defaultTextEditorProperties1.ShowInvalidLines     = false;
            defaultTextEditorProperties1.ShowLineNumbers      = true;
            defaultTextEditorProperties1.ShowMatchingBracket  = false;
            defaultTextEditorProperties1.ShowSpaces           = true;
            defaultTextEditorProperties1.ShowTabs             = true;
            defaultTextEditorProperties1.ShowVerticalRuler    = true;
            defaultTextEditorProperties1.TabIndent            = 4;
            defaultTextEditorProperties1.UseAntiAliasedFont   = false;
            defaultTextEditorProperties1.VerticalRulerRow     = 80;
            defaultDocument1.TextEditorProperties             = defaultTextEditorProperties1;
        }