SignatureAnnotProperty.xaml.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using PDF_Office.Model.AnnotPanel;
  2. using PDF_Office.ViewModels.PropertyPanel.AnnotPanel;
  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 PDF_Office.Views.PropertyPanel.AnnotPanel
  18. {
  19. /// <summary>
  20. /// SignatureAnnotProperty.xaml 的交互逻辑
  21. /// </summary>
  22. public partial class SignatureAnnotProperty : UserControl
  23. {
  24. public SignatureAnnotProperty()
  25. {
  26. InitializeComponent();
  27. }
  28. private void ListBoxItem_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  29. {
  30. (DataContext as SignatureAnnotPropertyViewModel).SetSignature((sender as ListBoxItem).DataContext as Signature);
  31. }
  32. private void Save_Click(object sender, RoutedEventArgs e)
  33. {
  34. MenuItem item = sender as MenuItem;
  35. (DataContext as SignatureAnnotPropertyViewModel).SaveToPath(item.Tag.ToString(), item.DataContext as Signature);
  36. }
  37. private void Delete_Click(object sender, RoutedEventArgs e)
  38. {
  39. MenuItem item = sender as MenuItem;
  40. (DataContext as SignatureAnnotPropertyViewModel).DeleteSignature(item.DataContext as Signature);
  41. }
  42. private void DeleteAll_Click(object sender, RoutedEventArgs e)
  43. {
  44. (DataContext as SignatureAnnotPropertyViewModel).DeleteAll();
  45. }
  46. }
  47. }