AboutDialog.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using System;
  2. using System.Reflection;
  3. using System.Windows.Forms;
  4. /// <summary>
  5. ///
  6. /// </summary>
  7. namespace com.insanitydesign.MarkdownViewerPlusPlus.Forms
  8. {
  9. /// <summary>
  10. /// About Dialog for this plugin with basic information and link to the website.
  11. /// </summary>
  12. public partial class AboutDialog : Form
  13. {
  14. /// <summary>
  15. /// Init the about dialog text from the Assembly Information
  16. /// </summary>
  17. public AboutDialog()
  18. {
  19. InitializeComponent();
  20. //Get the assembly information for the About dialog
  21. string title = ((AssemblyTitleAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyTitleAttribute), false)).Title;
  22. string description = ((AssemblyDescriptionAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyDescriptionAttribute), false)).Description;
  23. string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
  24. //About Text
  25. this.lblAbout.Text = $@"{title}
  26. {description}
  27. Version: {version}
  28. Many thanks to:
  29. Notepad++ PluginPack.net by kbilsted
  30. Markdig by lunet-io
  31. PDFSharp by empira Software GmbH
  32. HTMLRenderer by ArthurHub
  33. SVG.NET by vvvv
  34. FontAwesome
  35. dcurtis
  36. For more information, visit the website or check the included README.md
  37. ";
  38. }
  39. /// <summary>
  40. ///
  41. /// </summary>
  42. /// <param name="sender"></param>
  43. /// <param name="e"></param>
  44. private void btnClose_Click(object sender, System.EventArgs e)
  45. {
  46. this.Close();
  47. }
  48. /// <summary>
  49. /// Visit GitHub
  50. /// </summary>
  51. /// <param name="sender"></param>
  52. /// <param name="e"></param>
  53. private void btnVisit_Click(object sender, System.EventArgs e)
  54. {
  55. System.Diagnostics.Process.Start("https://github.com/nea/MarkdownViewerPlusPlus");
  56. }
  57. /// <summary>
  58. ///
  59. /// </summary>
  60. /// <param name="sender"></param>
  61. /// <param name="e"></param>
  62. private void picBoxDonate_Click(object sender, EventArgs e)
  63. {
  64. System.Diagnostics.Process.Start("https://www.paypal.me/insanitydesign");
  65. }
  66. }
  67. }