AnnotToolContentViewModel.Properties.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 AnnotAttribEvent AnnotEvent { get; set; }
  19. public AnnotHandlerEventArgs annot;
  20. public event EventHandler<Dictionary<AnnotArgsType, object>> DataChanged;
  21. public event EventHandler<object> DefaultStored;
  22. public AnnotPropertyPanel(){ }
  23. public void DataChangedInvoke(object sender, Dictionary<AnnotArgsType, object> keyValues)
  24. {
  25. DataChanged?.Invoke(sender, keyValues);
  26. }
  27. }
  28. public sealed partial class AnnotToolContentViewModel
  29. {
  30. #region 属性
  31. #region 注释工具
  32. //高亮
  33. private Brush highLightColor = new SolidColorBrush(Color.FromRgb(0xFF, 0xBB, 0x00));
  34. public Brush HighLightColor { get { return highLightColor; } set { SetProperty(ref highLightColor, value); } }
  35. //
  36. private double highLightOpacity = 1;
  37. public double HighLightOpacity {get { return highLightOpacity; } set { SetProperty(ref highLightOpacity, value); } }
  38. //
  39. private Brush underLine = new SolidColorBrush(Color.FromRgb(0xFF, 0xBB, 0x00));
  40. public Brush UnderLineColor {get { return underLine; } set { SetProperty(ref underLine, value); }}
  41. //
  42. private double underLineOpacity = 1;
  43. public double UnderLineOpacity { get { return underLineOpacity; } set { SetProperty(ref underLineOpacity, value); }}
  44. //
  45. private Brush squigglyColor = new SolidColorBrush(Color.FromRgb(0xFF, 0xBB, 0x00));
  46. public Brush SquigglyColor{ get { return squigglyColor; } set { SetProperty(ref squigglyColor, value); } }
  47. //
  48. private double squigglyOpacity = 1;
  49. public double SquigglyOpacity {get { return squigglyOpacity; } set { SetProperty(ref squigglyOpacity, value); } }
  50. //
  51. private Brush strikeoutColor = new SolidColorBrush(Color.FromRgb(0xFF, 0xBB, 0x00));
  52. public Brush StrikeoutColor{ get { return strikeoutColor; } set { SetProperty(ref strikeoutColor, value); }}
  53. //
  54. private double strikeoutOpacity = 1;
  55. public double StrikeoutOpacity {get { return strikeoutOpacity; } set { SetProperty(ref strikeoutOpacity, value); } }
  56. #endregion
  57. #endregion
  58. private CPDFViewer PDFViewer;
  59. private ViewContentViewModel viewContentViewModel;
  60. public DelegateCommand<CustomIconToggleBtn> MyToolsCommand { get; set; }
  61. AnnotPropertyPanel propertyPanel = new AnnotPropertyPanel();
  62. }
  63. }