protected override void OnBeginPrint(PrintEventArgs e) { base.OnBeginPrint(e); _iPosition = 0; _iPrintEnd = sci.GetTextLength(); _iCurrentPage = 1; }
protected virtual ContextMenuStrip BuildMenu(IMenuBuilder <ContextMenuStrip> builder) { return(builder .Item("Cut", "Ctrl+X", Cut, sci.HasSelections) .Item("Copy", "Ctrl+C", sci.Copy, sci.HasSelections) .Item("Paste", "Ctrl+V", Paste, sci.CanPaste) .Separator() .Item("Clear All", SmartClear, () => sci.GetTextLength() > lastLen) .Item("Clear History", () => history.Clear(), () => history.Size > 0) .Separator() .Item("Search", "Ctrl+F", Search, () => sci.GetTextLength() > 0) .Finish()); }
public override void Initialize(IApp app) { base.Initialize(app); var srv = App.GetService <IStylesConfigService>(); srv.EnumerateStyleItems("Output").UpdateStyles(sci); App.GetService <IConfigService>().ConfigUpdated += ConfigUpdated; var builder = App.GetService <IMenuService>().CreateMenuBuilder <ContextMenuStrip>(); var menu = builder .Item("Copy", "Ctrl+C", sci.Copy, sci.HasSelections) .Item("Select All", "Ctrl+A", sci.SelectAll, () => sci.GetTextLength() > 0) .Separator() .Item("Clear", Clear, () => sci.GetTextLength() > 0) .Separator() .Item("Word Wrap", null, sci.ToggleWrapMode, null, () => sci.WordWrapMode != WordWrapMode.None) .Finish(); sci.ContextMenuStrip = menu; UpdateOutputConfig(App.Config <OutputConfig>()); }