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); }
// Code editor features #region Features public void SetLanguage(Lexer lexer) { _fileLexer = lexer; _view?.SetLexer(_fileLexer); }