public static string ShowEditor(string initial, TextEditorType type, bool dialog) { TextEditor se = new TextEditor(initial, type); if (dialog) se.ShowDialog(); else se.Show(); return se.saved; }
public static TextEditor CreateNewEditor (TextEditorType textEditorType = TextEditorType.Default) { var result = new TextEditor (currentFactory.CreateNewEditor (), textEditorType) { ZoomLevel = zoomLevel }; result.ZoomLevelChanged += delegate { zoomLevel.Value = result.ZoomLevel; }; return result; }
public static string ShowEditor(string initial, TextEditorType type, bool dialog) { var se = new TextEditor(initial, type); se.Text = "Readme editor"; if (dialog) { se.ShowDialog(); } else { se.Show(); } return se.saved; }
private TextEditor(string text, TextEditorType type) { InitializeComponent(); Icon = Resources.fomm02; Settings.Default.windowPositions.GetWindowPosition("TextEditor", this); switch (type) { case TextEditorType.Text: rtbEdit = new RichTextBox(); panel1.Controls.Add(rtbEdit); rtbEdit.Text = text; rtbEdit.Dock = DockStyle.Fill; rtbEdit.TextChanged += textChanged; break; } }
public static TextEditor CreateNewEditor(IReadonlyTextDocument document, TextEditorType textEditorType = TextEditorType.Default) { if (document == null) { throw new System.ArgumentNullException("document"); } var result = new TextEditor(currentFactory.CreateNewEditor(document), textEditorType) { ZoomLevel = zoomLevel }; result.ZoomLevelChanged += delegate { zoomLevel.Value = result.ZoomLevel; }; return(result); }
ITextEditorImpl ITextEditorFactory.CreateNewEditor(IReadonlyTextDocument document, TextEditorType textEditorType) { return(new SourceEditorView(document, textEditorType)); }
ITextEditorImpl ITextEditorFactory.CreateNewEditor(string fileName, string mimeType, TextEditorType textEditorType) { return(new SourceEditorView(fileName, mimeType, textEditorType)); }
ITextEditorImpl ITextEditorFactory.CreateNewEditor(TextEditorType textEditorType) { return(new SourceEditorView(textEditorType)); }
public static TextEditor CreateNewEditor(DocumentContext ctx, IReadonlyTextDocument document, TextEditorType textEditorType = TextEditorType.Default) { var result = CreateNewEditor(document, textEditorType); result.InitializeExtensionChain(ctx); return(result); }
public static TextEditor CreateNewEditor (IReadonlyTextDocument document, TextEditorType textEditorType = TextEditorType.Default) { if (document == null) throw new System.ArgumentNullException ("document"); var result = new TextEditor (currentFactory.CreateNewEditor (document), textEditorType) { ZoomLevel = zoomLevel }; result.ZoomLevelChanged += delegate { zoomLevel.Value = result.ZoomLevel; }; return result; }
public static TextEditor CreateNewEditor (DocumentContext ctx, IReadonlyTextDocument document, TextEditorType textEditorType = TextEditorType.Default) { var result = CreateNewEditor (document, textEditorType); result.InitializeExtensionChain (ctx); return result; }
public static TextEditor CreateNewEditor(TextBufferFileModel textBufferFileModel, TextEditorType textEditorType = TextEditorType.Default) { var result = new TextEditor(currentFactory.CreateNewEditor(textBufferFileModel), textEditorType); InitializeTextEditor(result); return(result); }