예제 #1
0
 protected override void OnViewLoaded(object view)
 {
     _view = (ICodeEditorView)view;
     if (_view == null)
     {
         throw new InvalidCastException();
     }
     _view.IsDirtyChanged += OnDirtyChanged;
     _view.SetResourceDirectory("Resources");
     _view.SetContent(_fileContent);
     _view.SetLexer(_fileLexer);
     base.OnViewLoaded(view);
 }
예제 #2
0
        // Code editor features

        #region Features

        public void SetLanguage(Lexer lexer)
        {
            _fileLexer = lexer;
            _view?.SetLexer(_fileLexer);
        }