PageEditItem.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. using Prism.Commands;
  2. using Prism.Mvvm;
  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.Media.Imaging;
  10. namespace PDF_Office.Model.PageEdit
  11. {
  12. public class PageEditItem:BindableBase
  13. {
  14. private int pageNumber;
  15. /// <summary>
  16. /// 页码
  17. /// </summary>
  18. public int PageNumber
  19. {
  20. get { return pageNumber; }
  21. set
  22. {
  23. SetProperty(ref pageNumber, value);
  24. }
  25. }
  26. private string pageSize = "";
  27. /// <summary>
  28. /// 用于显示的页面尺寸
  29. /// </summary>
  30. public string PageSize
  31. {
  32. get { return pageSize; }
  33. set
  34. {
  35. SetProperty(ref pageSize, value);
  36. }
  37. }
  38. /// <summary>
  39. /// Size类型的页面尺寸 用于插入功能
  40. /// </summary>
  41. public Size Size { get; set; }
  42. private BitmapSource image;
  43. /// <summary>
  44. /// 页面缩略图
  45. /// </summary>
  46. public BitmapSource Image
  47. {
  48. get { return image; }
  49. set
  50. {
  51. SetProperty(ref image, value);
  52. }
  53. }
  54. private bool showPageSize = false;
  55. /// <summary>
  56. /// 是否显示页码尺寸
  57. /// </summary>
  58. public bool ShowPageSize
  59. {
  60. get { return showPageSize; }
  61. set
  62. {
  63. SetProperty(ref showPageSize, value);
  64. }
  65. }
  66. private bool haveBookMark = false;
  67. /// <summary>
  68. /// 该页是否有书签标记
  69. /// </summary>
  70. public bool HaveBookMark
  71. {
  72. get { return haveBookMark; }
  73. set
  74. {
  75. SetProperty(ref haveBookMark, value);
  76. }
  77. }
  78. private Visibility visible = Visibility.Visible;
  79. /// <summary>
  80. /// 是否显示
  81. /// </summary>
  82. public Visibility Visible
  83. {
  84. get { return visible; }
  85. set
  86. {
  87. SetProperty(ref visible, value);
  88. }
  89. }
  90. private bool selected = false;
  91. /// <summary>
  92. /// 是否选中
  93. /// </summary>
  94. public bool Selected
  95. {
  96. get { return selected; }
  97. set
  98. {
  99. SetProperty(ref selected, value);
  100. }
  101. }
  102. private Size itemSize = new Size(208, 294);
  103. /// <summary>
  104. /// 控件大小
  105. /// 直接修改Listbox 容器的项大小,会导致间距有问题,所有采用动态绑定大小的方式来实现Item大小更新
  106. /// </summary>
  107. public Size ItemSize
  108. {
  109. get { return itemSize; }
  110. set
  111. {
  112. SetProperty(ref itemSize, value);
  113. }
  114. }
  115. /// <summary>
  116. /// 此次打开中是否已经获取图片,避免重复拿图
  117. /// </summary>
  118. public bool IsGetImage = false;
  119. /// <summary>
  120. /// 是否是竖直的图
  121. /// </summary>
  122. public bool isVertical = true;
  123. }
  124. }