RedactionSettings.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.Media;
  8. namespace PDFSettings
  9. {
  10. public class RedactionSettings
  11. {
  12. private string content = "";
  13. public string Content { get { return content; } set { content = value; } }
  14. private Color linecolor = Colors.Red;
  15. public Color LineColor { get { return linecolor; } set { linecolor = value; } }
  16. private Color bgcolor = Colors.Black;
  17. public Color BgColor { get { return bgcolor; } set { bgcolor = value; } }
  18. private Color fontcolor = Colors.Red;
  19. public Color FontColor { get { return fontcolor; } set { fontcolor = value; } }
  20. private int fontsize = 14;
  21. public int FontSize { get { return fontsize; } set { fontsize = value; } }
  22. private FontWeight fontWeight = FontWeights.Regular;
  23. public FontWeight FontWeight
  24. {
  25. get { return fontWeight; }
  26. set { fontWeight = value; }
  27. }
  28. /// <summary>
  29. /// 跟WPF UI一致的字体
  30. /// </summary>
  31. private string fontFamily = "Helvetica";
  32. public string FontFamily
  33. {
  34. get { return fontFamily; }
  35. set { fontFamily = value; }
  36. }
  37. private bool isusetext = false;
  38. public bool isUseText { get { return isusetext; } set { isusetext = value; } }
  39. private TextAlignment align = TextAlignment.Left;
  40. public TextAlignment Align { get { return align; } set { align = value; } }
  41. public void SetDefualtValue(string content,Color lineColor,Color bgColor,Color fontColor,int FontSize,bool isUserText,TextAlignment align,string fontFamily,FontWeight fontWeight)
  42. {
  43. this.Content = content;
  44. this.LineColor = lineColor;
  45. this.BgColor = bgColor;
  46. this.FontColor = fontColor;
  47. this.FontSize = FontSize;
  48. this.isUseText = isUserText;
  49. this.Align = align;
  50. this.FontFamily = fontFamily;
  51. this.FontWeight = fontWeight;
  52. }
  53. }
  54. }