/// <summary>Returns a text summary of the licence info</summary> public Rtf.Builder InfoStringRtf() { var rtf = new Rtf.Builder(); if (!Valid) { rtf.Append(new Rtf.TextStyle { FontSize = 10, FontStyle = Rtf.EFontStyle.Bold, ForeColourIndex = rtf.ColourIndex(Color.DarkRed) }); rtf.AppendLine("Free Edition Licence"); rtf.Append(new Rtf.TextStyle { FontSize = 8, FontStyle = Rtf.EFontStyle.Regular }); rtf.AppendLine("This copy of RyLogViewer is using the free edition licence."); rtf.AppendLine("All features are available, however limits are in place."); rtf.AppendLine("If you find RyLogViewer useful, please consider purchasing a licence."); } else { var blck = new Rtf.TextStyle { FontSize = 8, ForeColourIndex = rtf.ColourIndex(Color.Black) }; var blue = new Rtf.TextStyle { FontSize = 8, ForeColourIndex = rtf.ColourIndex(Color.DarkBlue) }; rtf.Append(blck).Append("Licence Holder:\t").Append(blue).AppendLine(LicenceHolder); rtf.Append(blck).Append("Email Address: \t").Append(blue).AppendLine(EmailAddress); rtf.Append(blck).Append("Company: \t").Append(blue).AppendLine(Company); rtf.Append(blck).Append("Versions: \t").Append(blue).AppendLine(VersionMask); } return(rtf); }
private void RichText(object sender, EventArgs e) { var rtf = new Rtf.Builder(); rtf.TextStyle = new Rtf.TextStyle { FontIndex = rtf.FontIndex(Rtf.FontDesc.CourierNew), FontStyle = Rtf.EFontStyle.Bold | Rtf.EFontStyle.Underline, ForeColourIndex = rtf.ColourIndex(Color.Red), BackColourIndex = rtf.ColourIndex(Color.Green), FontSize = 18, }; rtf.Append("Heading\n"); rtf.TextStyle = Rtf.TextStyle.Default; rtf.Append("More Rtf text"); var content = rtf.ToString(); Rylogic.Gui.WinForms.HelpUI.ShowDialog(this, Rylogic.Gui.WinForms.HelpUI.EContent.Rtf, "RTF Help", content); }