AboutForm.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using System;
  2. using System.Windows.Forms;
  3. using FastReport.Utils;
  4. using System.Globalization;
  5. namespace FastReport.Forms
  6. {
  7. internal partial class AboutForm : BaseDialogForm
  8. {
  9. private void label5_Click(object sender, EventArgs e)
  10. {
  11. ProcessHelper.StartProcess(label5.Text);
  12. }
  13. private void AboutForm_Shown(object sender, EventArgs e)
  14. {
  15. }
  16. private void AboutForm_KeyDown(object sender, KeyEventArgs e)
  17. {
  18. if (e.KeyData == Keys.Escape)
  19. DialogResult = DialogResult.Cancel;
  20. }
  21. public override void Localize()
  22. {
  23. base.Localize();
  24. MyRes res = new MyRes("Forms,About");
  25. Text = res.Get("");
  26. label2.Text = res.Get("Version") + " " + Config.Version
  27. #if Demo
  28. + " " + typeof(DataBand).Name[0].ToString() + typeof(Exception).Name[3].ToString() +
  29. typeof(Math).Name[0].ToString().ToLower() + typeof(Object).Name[0].ToString().ToLower()
  30. #endif
  31. #if TIMETRIAL
  32. + " " + typeof(Timer).Name[0].ToString() + typeof(Timer).Name[4].ToString() +
  33. typeof(Timer).Name[1].ToString() + typeof(Math).Name[1].ToString() + typeof(ListBox).Name[0].ToString().ToLower()
  34. #endif
  35. #if Academic
  36. + " " + typeof(AboutForm).Name[0].ToString() + typeof(Char).Name[0].ToString().ToLower() +
  37. typeof(Char).Name[2].ToString() + typeof(DataFormats).Name[0].ToString().ToLower() +
  38. typeof(Exception).Name[0].ToString().ToLower() + typeof(Math).Name[0].ToString().ToLower() +
  39. typeof(Exception).Name[6].ToString() + typeof(Char).Name[0].ToString().ToLower()
  40. #endif
  41. #if COMMUNITY
  42. + "\nCommunity Edition"
  43. #endif
  44. ;
  45. string company;
  46. if (CultureInfo.CurrentCulture.Name == "ru-RU")
  47. {
  48. company = " ООО Быстрые отчеты";
  49. label5.Text = "https://www.fastreport.ru";
  50. }
  51. else
  52. {
  53. company = " Fast Reports Inc.";
  54. label5.Text = "https://www.fast-report.com";
  55. }
  56. label3.Text = "© 2008-" + DateTime.Now.Year.ToString() + company;
  57. label4.Text = res.Get("Visit");
  58. }
  59. public AboutForm()
  60. {
  61. InitializeComponent();
  62. Localize();
  63. int labelWidth = ClientSize.Width;
  64. label3.Width = labelWidth;
  65. label4.Width = labelWidth;
  66. label5.Width = labelWidth;
  67. UIUtils.CheckRTL(this);
  68. }
  69. }
  70. }