CPDFImageRotateUI.xaml.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace compdfkit_tools.Edit
  16. {
  17. public partial class CPDFImageRotateUI : UserControl
  18. {
  19. public event EventHandler<double> RotationChanged;
  20. public CPDFImageRotateUI()
  21. {
  22. InitializeComponent();
  23. }
  24. public Orientation Orientation
  25. {
  26. get
  27. {
  28. return ImageRotateUI.Orientation;
  29. }
  30. set
  31. {
  32. ImageRotateUI.Orientation = value;
  33. }
  34. }
  35. private void RotateLeftBtn_Click(object sender, RoutedEventArgs e)
  36. {
  37. RotationChanged?.Invoke(this, -90);
  38. }
  39. private void RotateRightBtn_Click(object sender, RoutedEventArgs e)
  40. {
  41. RotationChanged?.Invoke(this, 90);
  42. }
  43. }
  44. }