Exemple #1
0
        DefaultSourceEditorOptions(TextStylePolicy currentPolicy)
        {
            WordNavigationStyle defaultWordNavigation = WordNavigationStyle.Unix;

            if (Platform.IsWindows)
            {
                defaultWordNavigation = WordNavigationStyle.Windows;
            }
            wordNavigationStyle = ConfigurationProperty.Create("WordNavigationStyle", defaultWordNavigation);

            UpdateStylePolicy(currentPolicy);
            FontService.RegisterFontChangedCallback("Editor", UpdateFont);
            FontService.RegisterFontChangedCallback("MessageBubbles", UpdateFont);
        }
        void LoadAllPrefs()
        {
            this.tabIsReindent = PropertyService.Get("TabIsReindent", false);
            this.enableSemanticHighlighting = PropertyService.Get("EnableSemanticHighlighting", true);
            //			this.autoInsertTemplates        = PropertyService.Get ("AutoInsertTemplates", false);
            this.autoInsertMatchingBracket = PropertyService.Get("AutoInsertMatchingBracket", false);
            this.smartSemicolonPlacement   = PropertyService.Get("SmartSemicolonPlacement", false);
            this.underlineErrors           = PropertyService.Get("UnderlineErrors", true);
            this.indentStyle              = PropertyService.Get("IndentStyle", IndentStyle.Smart);
            base.ShowLineNumberMargin     = PropertyService.Get("ShowLineNumberMargin", true);
            base.ShowFoldMargin           = PropertyService.Get("ShowFoldMargin", false);
            base.HighlightCaretLine       = PropertyService.Get("HighlightCaretLine", false);
            base.EnableSyntaxHighlighting = PropertyService.Get("EnableSyntaxHighlighting", true);
            base.HighlightMatchingBracket = PropertyService.Get("HighlightMatchingBracket", true);
            base.ShowRuler             = PropertyService.Get("ShowRuler", false);
            base.FontName              = PropertyService.Get("FontName", "Mono 10");
            base.GutterFontName        = PropertyService.Get("GutterFontName", "");
            base.ColorScheme           = PropertyService.Get("ColorScheme", "Default");
            this.defaultRegionsFolding = PropertyService.Get("DefaultRegionsFolding", false);
            this.defaultCommentFolding = PropertyService.Get("DefaultCommentFolding", true);
            this.useViModes            = PropertyService.Get("UseViModes", false);
            this.onTheFlyFormatting    = PropertyService.Get("OnTheFlyFormatting", true);

            WordNavigationStyle defaultWordNavigation = WordNavigationStyle.Unix;

            if (Platform.IsWindows || PropertyService.Get("ControlLeftRightMode", (string)null) == "SharpDevelop")
            {
                defaultWordNavigation = WordNavigationStyle.Windows;
            }
            this.WordNavigationStyle = PropertyService.Get("WordNavigationStyle", defaultWordNavigation);

            base.EnableAnimations           = PropertyService.Get("EnableAnimations", true);
            this.EnableHighlightUsages      = PropertyService.Get("EnableHighlightUsages", false);
            base.DrawIndentationMarkers     = PropertyService.Get("DrawIndentationMarkers", false);
            this.lineEndingConversion       = PropertyService.Get("LineEndingConversion", LineEndingConversion.Ask);
            base.GenerateFormattingUndoStep = PropertyService.Get("GenerateFormattingUndoStep", false);
            base.ShowWhitespaces            = PropertyService.Get("ShowWhitespaces", Mono.TextEditor.ShowWhitespaces.Never);
            base.IncludeWhitespaces         = PropertyService.Get("IncludeWhitespaces", Mono.TextEditor.IncludeWhitespaces.All);
            base.WrapLines       = PropertyService.Get("WrapLines", false);
            base.EnableQuickDiff = PropertyService.Get("EnableQuickDiff", false);
        }