private void _c_ZHandleCreated() { _c.Call(SCI_SETWRAPMODE, SC_WRAP_WORD); _c.zSetMarginWidth(1, 8); _c.Call(SCI_MARKERDEFINE, 0, SC_MARK_FULLRECT); _c.Call(SCI_MARKERSETBACK, 0, 0xA0E0B0); //_c.zStyleFont(STYLE_DEFAULT); //Segoe UI, 9. Too narrow and looks too small when compared with the code font. //_c.zStyleFont(STYLE_DEFAULT, "Segoe UI", 10); //too tall //_c.zStyleFont(STYLE_DEFAULT, "Verdana", 9); //too wide //_c.zStyleFont(STYLE_DEFAULT, "Calibri", 9); //too small _c.zStyleFont(STYLE_DEFAULT, "Tahoma", 9); var styles = new CiStyling.TStyles { FontSize = 9 }; styles.ToScintilla(_c, multiFont: true); _c.Call(SCI_SETZOOM, App.Settings.recipe_zoom); _c.ZTags.AddLinkTag("+recipe", Panels.Cookbook.OpenRecipe); _c.ZTags.AddLinkTag("+see", _SeeLinkClicked); //_c.ZTags.AddLinkTag("+lang", s => run.itSafe("https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/" + s)); //unreliable, the URLs may change _c.ZTags.AddLinkTag("+lang", s => run.itSafe("https://www.google.com/search?q=" + Uri.EscapeDataString(s + ", C# reference"))); //_c.ZTags.AddLinkTag("+guide", s => run.itSafe("https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/" + s)); //rejected. Use <google>. _c.ZTags.AddLinkTag("+ms", s => run.itSafe("https://www.google.com/search?q=" + Uri.EscapeDataString(s + " site:docs.microsoft.com"))); _c.ZTags.AddLinkTag("+nuget", s => DNuget.ZShow(s)); _c.ZTags.AddStyleTag(".k", new SciTags.UserDefinedStyle { textColor = 0xFF, bold = true }); //keyword #if DEBUG _AutoRenderCurrentRecipeScript(); #endif }
protected override void OnClosed(EventArgs e) { s_dialog = null; App.Model.UnloadingWorkspaceEvent -= Close; base.OnClosed(e); }
public static void NuGet() { DNuget.ZShow(); }