CPDFTitleBarControl.xaml.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using compdfkit_tools.Helper;
  2. using ComPDFKitViewer.PdfViewer;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. namespace compdfkit_tools.PDFControl
  18. {
  19. /// <summary>
  20. /// TitleBarControl.xaml 的交互逻辑
  21. /// </summary>
  22. ///
  23. public partial class CPDFTitleBarControl : UserControl
  24. {
  25. public event EventHandler<string> OpenFileEvent;
  26. public CPDFTitleBarControl()
  27. {
  28. InitializeComponent();
  29. }
  30. private void OpenFileItem_Click(object sender, RoutedEventArgs e)
  31. {
  32. var fileItem = sender as MenuItem;
  33. if (fileItem != null)
  34. {
  35. string filePath = CommonHelper.GetFilePathOrEmpty();
  36. if (!string.IsNullOrEmpty(filePath))
  37. {
  38. OpenFileEvent?.Invoke(sender, filePath);
  39. }
  40. }
  41. }
  42. private void SaveFileItem_Click(object sender, RoutedEventArgs e)
  43. {
  44. }
  45. private void SaveAsItem_Click(object sender, RoutedEventArgs e)
  46. {
  47. }
  48. private void AboutUsItem_Click(object sender, RoutedEventArgs e)
  49. {
  50. System.Diagnostics.Process.Start("https://www.compdf.com/company/about");
  51. }
  52. private void ContactUs_Click(object sender, RoutedEventArgs e)
  53. {
  54. System.Diagnostics.Process.Start("https://www.compdf.com/contact-sales");
  55. }
  56. private void PrivacyAgreement_Click(object sender, RoutedEventArgs e)
  57. {
  58. System.Diagnostics.Process.Start("https://www.compdf.com/privacy-policy");
  59. }
  60. private void ServiceTerms_Click(object sender, RoutedEventArgs e)
  61. {
  62. System.Diagnostics.Process.Start("https://www.compdf.com/terms-of-service");
  63. }
  64. }
  65. }