コード例 #1
0
        public static void ApplyDefaults(TextEditorControl control)
        {
            if (control == null)
            {
                return;
            }

            TextEditorOptions defaults = new TextEditorOptions();

            defaults.ApplyToControl(control);
        }
コード例 #2
0
        public bool LoadContent(ConfigurationContent configContent)
        {
            if (configContent == null)
            {
                throw new NullParameterException("Configuration content param is null!");
            }

            if (configContent.TextEditorOptions == null)
            {
                throw new NullPropertyException("Configuration content does not contain TextEditorOptions item!");
            }

            _configContent     = configContent;
            _textEditorOptions = _configContent.TextEditorOptions;
            LoadInitial();
            _isContentLoaded = true;
            return(true);
        }
コード例 #3
0
        public TextEditorOptions CreateCopy()
        {
            TextEditorOptions newOpts = new TextEditorOptions();

            newOpts.ConvertTabsToSpaces    = this.ConvertTabsToSpaces;
            newOpts.ShowEOLMarkers         = this.ShowEOLMarkers;
            newOpts.ShowInvalidLines       = this.ShowInvalidLines;
            newOpts.ShowLineNumbers        = this.ShowLineNumbers;
            newOpts.ShowMatchingBracket    = this.ShowMatchingBracket;
            newOpts.ShowSpaces             = this.ShowSpaces;
            newOpts.ShowTabs               = this.ShowTabs;
            newOpts.IndentStyleDef         = this.IndentStyleDef;
            newOpts.TabIndent              = this.TabIndent;
            newOpts.VerticalRulerRow       = this.VerticalRulerRow;
            newOpts.HighlightSelectAndCase = this.HighlightSelectAndCase;
            newOpts.HighlightComments      = this.HighlightComments;

            newOpts.SelectHighlightColorArgb  = this.SelectHighlightColorArgb;
            newOpts.CaseHighlightColorArgb    = this.CaseHighlightColorArgb;
            newOpts.CommentHighlightColorArgb = this.CommentHighlightColorArgb;

            newOpts.ShowFoldMarkers    = this.ShowFoldMarkers;
            newOpts.MarkCaretLine      = this.MarkCaretLine;
            newOpts.UseAntiAliasedFont = this.UseAntiAliasedFont;
            newOpts.AutoRemoveModifiedSignForKnownScriptableObjects = this.AutoRemoveModifiedSignForKnownScriptableObjects;
            newOpts.FoldHighlightedSelectAndCase = this.FoldHighlightedSelectAndCase;
            newOpts.FoldComments = this.FoldComments;

            newOpts.FoldCodeBlocks      = this.FoldCodeBlocks;
            newOpts.AllowCaretBeyondEOL = this.AllowCaretBeyondEOL;

            newOpts.AnalyzeSql           = this.AnalyzeSql;
            newOpts.ResultViewType       = this.ResultViewType;
            newOpts.CustomTextEditorFont = this.CustomTextEditorFont;

            newOpts.CodeCompCacheTimeout         = CodeCompCacheTimeout;
            newOpts.CodeCompCacheCollectInterval = CodeCompCacheCollectInterval;

            return(newOpts);
        }