Help.xaml.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Shapes;
  13. using System.Reflection;
  14. namespace AGV_WPF
  15. {
  16. /// <summary>
  17. /// Help.xaml 的交互逻辑
  18. /// </summary>
  19. public partial class Help : Window
  20. {
  21. public Help()
  22. {
  23. InitializeComponent();
  24. label2.Content = "版 本:AGV-Ver" + AssemblyVersion;
  25. label1.Content = string.Format("产品名称:{0}", ProductName);
  26. }
  27. public string AssemblyVersion
  28. {
  29. get
  30. {
  31. return Assembly.GetExecutingAssembly().GetName().Version.ToString();
  32. }
  33. }
  34. public string ProductName
  35. {
  36. get
  37. {
  38. object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
  39. if (attributes.Length == 0)
  40. {
  41. return "";
  42. }
  43. return ((AssemblyProductAttribute)attributes[0]).Product;
  44. }
  45. }
  46. /// <summary>
  47. /// 公司主页超链接
  48. /// </summary>
  49. /// <param name="sender"></param>
  50. /// <param name="e"></param>
  51. private void hyperlinkCompany_Click(object sender, RoutedEventArgs e)
  52. {
  53. System.Diagnostics.Process.Start("http://www.casun.cn/");
  54. }
  55. }
  56. }