Example #1
0
        public Editor(EditorFile file)
        {
            MaxHistoryLength      = 2048;
            DoubleBuffered        = true;
            File                  = file;
            Dock                  = DockStyle.Fill;
            WordWrapMode          = WordWrapMode.WordWrapControlWidth;
            HighlightingRangeType = HighlightingRangeType.VisibleRange;
            switch (File.Type)
            {
            case Trax.EditorFile.Types.HTML: Language = Language.HTML; break;

            default: Language = Language.Custom; break;
            }
            Encoding = Encoding.GetEncoding(Properties.Settings.Default.EncodingDefault);
            WordWrap = Properties.Settings.Default.WordWrap;
            if (File.Type == EditorFile.Types.Timetable)
            {
                IsReplaceMode = true;
            }
            FullAsyncMode = true;
            SyntaxModule  = new EditorSyntax(this);
            if (File.Type == EditorFile.Types.SceneryMain || File.Type == EditorFile.Types.SceneryPart)
            {
                ToolTipNeeded += SyntaxModule.HintParser;
            }
            SelectionChangedDelayed += SyntaxModule.SameWordHighlight;
            IsReplaceModeChanged    += Editor_IsReplaceModeChanged;
        }
Example #2
0
 public void ReloadScheme()
 {
     SyntaxModule = null;
     SyntaxModule = new EditorSyntax(this);
     SyntaxModule.GetStyles(true);
     SyntaxModule.HighlightSyntax(VisibleRange);
     File.Container.DocumentMap.BackColor = EditorSyntax.Styles.Background;
 }