AnnotToolContentViewModel.Properties.cs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. using ComPDFKitViewer.AnnotEvent;
  2. using ComPDFKitViewer.PdfViewer;
  3. using PDF_Office.CustomControl;
  4. using Prism.Commands;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Windows.Media;
  11. namespace PDF_Office.ViewModels.Tools
  12. {
  13. /// <summary>
  14. /// 改变工具栏注释属性值
  15. /// </summary>
  16. public class AnnotPropertyPanel
  17. {
  18. public AnnotHandlerEventArgs annot;
  19. public event EventHandler<Dictionary<AnnotArgsType, object>> DataChanged;
  20. public event EventHandler<object> DefaultStored;
  21. public AnnotPropertyPanel(){ }
  22. public void DataChangedInvoke(object sender, Dictionary<AnnotArgsType, object> keyValues)
  23. {
  24. DataChanged?.Invoke(sender, keyValues);
  25. }
  26. }
  27. public sealed partial class AnnotToolContentViewModel
  28. {
  29. #region 属性
  30. #region 注释工具
  31. //高亮
  32. private Brush highLightColor = new SolidColorBrush(Color.FromRgb(0xFF, 0xBB, 0x00));
  33. public Brush HighLightColor { get { return highLightColor; } set { SetProperty(ref highLightColor, value); } }
  34. //
  35. private double highLightOpacity = 1;
  36. public double HighLightOpacity {get { return highLightOpacity; } set { SetProperty(ref highLightOpacity, value); } }
  37. //
  38. private Brush underLine = new SolidColorBrush(Color.FromRgb(0xFF, 0xBB, 0x00));
  39. public Brush UnderLineColor {get { return underLine; } set { SetProperty(ref underLine, value); }}
  40. //
  41. private double underLineOpacity = 1;
  42. public double UnderLineOpacity { get { return underLineOpacity; } set { SetProperty(ref underLineOpacity, value); }}
  43. //
  44. private Brush squigglyColor = new SolidColorBrush(Color.FromRgb(0xFF, 0xBB, 0x00));
  45. public Brush SquigglyColor{ get { return squigglyColor; } set { SetProperty(ref squigglyColor, value); } }
  46. //
  47. private double squigglyOpacity = 1;
  48. public double SquigglyOpacity {get { return squigglyOpacity; } set { SetProperty(ref squigglyOpacity, value); } }
  49. //
  50. private Brush strikeoutColor = new SolidColorBrush(Color.FromRgb(0xFF, 0xBB, 0x00));
  51. public Brush StrikeoutColor{ get { return strikeoutColor; } set { SetProperty(ref strikeoutColor, value); }}
  52. //
  53. private double strikeoutOpacity = 1;
  54. public double StrikeoutOpacity {get { return strikeoutOpacity; } set { SetProperty(ref strikeoutOpacity, value); } }
  55. #endregion
  56. #endregion
  57. private CPDFViewer PDFViewer;
  58. private ViewContentViewModel viewContentViewModel;
  59. public DelegateCommand<CustomIconToggleBtn> MyToolsCommand { get; set; }
  60. AnnotPropertyPanel propertyPanel = new AnnotPropertyPanel();
  61. }
  62. }