PageEditItem.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. private BitmapSource image;
  39. /// <summary>
  40. /// 页面缩略图
  41. /// </summary>
  42. public BitmapSource Image
  43. {
  44. get { return image; }
  45. set
  46. {
  47. SetProperty(ref image, value);
  48. }
  49. }
  50. private bool showPageSize = false;
  51. /// <summary>
  52. /// 是否显示页码尺寸
  53. /// </summary>
  54. public bool ShowPageSize
  55. {
  56. get { return showPageSize; }
  57. set
  58. {
  59. SetProperty(ref showPageSize, value);
  60. }
  61. }
  62. private bool haveBookMark = false;
  63. /// <summary>
  64. /// 该页是否有书签标记
  65. /// </summary>
  66. public bool HaveBookMark
  67. {
  68. get { return haveBookMark; }
  69. set
  70. {
  71. SetProperty(ref haveBookMark, value);
  72. }
  73. }
  74. private Visibility visible = Visibility.Visible;
  75. /// <summary>
  76. /// 是否显示
  77. /// </summary>
  78. public Visibility Visible
  79. {
  80. get { return visible; }
  81. set
  82. {
  83. SetProperty(ref visible, value);
  84. }
  85. }
  86. private bool selected = false;
  87. /// <summary>
  88. /// 是否选中
  89. /// </summary>
  90. public bool Selected
  91. {
  92. get { return selected; }
  93. set
  94. {
  95. SetProperty(ref selected, value);
  96. }
  97. }
  98. private Size itemSize = new Size(208, 294);
  99. /// <summary>
  100. /// 控件大小
  101. /// 直接修改Listbox 容器的项大小,会导致间距有问题,所有采用动态绑定大小的方式来实现Item大小更新
  102. /// </summary>
  103. public Size ItemSize
  104. {
  105. get { return itemSize; }
  106. set
  107. {
  108. SetProperty(ref itemSize, value);
  109. }
  110. }
  111. /// <summary>
  112. /// 此次打开中是否已经获取图片,避免重复拿图
  113. /// </summary>
  114. public bool IsGetImage = false;
  115. /// <summary>
  116. /// 是否是竖直的图
  117. /// </summary>
  118. public bool isVertical = true;
  119. }
  120. }