MuchinfoPagerPresenter.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /**
  2. *
  3. * @date 2014-10-20
  4. *
  5. * @author 邓尹平
  6. *
  7. * @par 成员列表类 说明
  8. * 主要负责管理成员 提供搜索\排序和操作的方法
  9. *
  10. * @par 版权声明
  11. * 深圳市多元世纪信息技术有限公司 版权所有
  12. *
  13. * @see 使用此类时参照一些其他类可以写在这里
  14. *
  15. * @todo 该类有待完成的任务 一条条列出 完成一条删除一条
  16. *
  17. * @bug 该类已知的Bug一条条列出 完成一条删除一条
  18. *
  19. */
  20. using System.Windows;
  21. using System.Windows.Controls;
  22. namespace Muchinfo.DataPager.Base
  23. {
  24. public class MuchinfoPagerPresenter : Control
  25. {
  26. public static readonly DependencyProperty NumericButtonCountProperty;
  27. public static readonly DependencyProperty NumericButtonStyleProperty;
  28. public static readonly DependencyProperty PageIndexProperty;
  29. public static readonly DependencyProperty PageCountProperty;
  30. public static readonly DependencyProperty PageSizeProperty;
  31. public static readonly DependencyProperty ItemCountProperty;
  32. public int NumericButtonCount
  33. {
  34. get
  35. {
  36. return (int)base.GetValue(MuchinfoPagerPresenter.NumericButtonCountProperty);
  37. }
  38. set
  39. {
  40. base.SetValue(MuchinfoPagerPresenter.NumericButtonCountProperty, value);
  41. }
  42. }
  43. public Style NumericButtonStyle
  44. {
  45. get
  46. {
  47. return (Style)base.GetValue(MuchinfoPagerPresenter.NumericButtonStyleProperty);
  48. }
  49. set
  50. {
  51. base.SetValue(MuchinfoPagerPresenter.NumericButtonStyleProperty, value);
  52. }
  53. }
  54. public int PageIndex
  55. {
  56. get
  57. {
  58. return (int)base.GetValue(MuchinfoPagerPresenter.PageIndexProperty);
  59. }
  60. set
  61. {
  62. base.SetValue(MuchinfoPagerPresenter.PageIndexProperty, value);
  63. }
  64. }
  65. public int PageCount
  66. {
  67. get
  68. {
  69. return (int)base.GetValue(MuchinfoPagerPresenter.PageCountProperty);
  70. }
  71. set
  72. {
  73. base.SetValue(MuchinfoPagerPresenter.PageCountProperty, value);
  74. }
  75. }
  76. public int PageSize
  77. {
  78. get
  79. {
  80. return (int)base.GetValue(MuchinfoPagerPresenter.PageSizeProperty);
  81. }
  82. set
  83. {
  84. base.SetValue(MuchinfoPagerPresenter.PageSizeProperty, value);
  85. }
  86. }
  87. public int ItemCount
  88. {
  89. get
  90. {
  91. return (int)base.GetValue(MuchinfoPagerPresenter.ItemCountProperty);
  92. }
  93. set
  94. {
  95. base.SetValue(MuchinfoPagerPresenter.ItemCountProperty, value);
  96. }
  97. }
  98. static MuchinfoPagerPresenter()
  99. {
  100. MuchinfoPagerPresenter.NumericButtonCountProperty = DependencyProperty.Register("NumericButtonCount", typeof(int), typeof(MuchinfoPagerPresenter), new PropertyMetadata(null));
  101. MuchinfoPagerPresenter.NumericButtonStyleProperty = DependencyProperty.Register("NumericButtonStyle", typeof(Style), typeof(MuchinfoPagerPresenter), new PropertyMetadata(null));
  102. MuchinfoPagerPresenter.PageIndexProperty = DependencyProperty.Register("PageIndex", typeof(int), typeof(MuchinfoPagerPresenter), new PropertyMetadata(null));
  103. MuchinfoPagerPresenter.PageCountProperty = DependencyProperty.Register("PageCount", typeof(int), typeof(MuchinfoPagerPresenter), new PropertyMetadata(null));
  104. MuchinfoPagerPresenter.PageSizeProperty = DependencyProperty.Register("PageSize", typeof(int), typeof(MuchinfoPagerPresenter), new PropertyMetadata(null));
  105. MuchinfoPagerPresenter.ItemCountProperty = DependencyProperty.Register("ItemCount", typeof(int), typeof(MuchinfoPagerPresenter), new PropertyMetadata(null));
  106. FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata(typeof(MuchinfoPagerPresenter), new FrameworkPropertyMetadata(typeof(MuchinfoPagerPresenter)));
  107. }
  108. }
  109. }