public virtual IViewContent CreateContentForFile(string fileName) { TextEditorView t = new TextEditorView(); t.LoadFile(fileName); return t; }
public virtual IViewContent CreateContentForLanguage(string language, string content) { TextEditorView t = new TextEditorView(); StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService)); ((TextEditorControl)t.Control).Document.TextContent = stringParserService.Parse(content); ((TextEditorControl)t.Control).Document.HighlightingStrategy = HighlightingManager.Manager.FindHighlighterByName(language); return t; }