AnnotToolContentViewModel.Properties.cs 3.1 KB

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