星火微课系统客户端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. using ComeCapture.Models;
  2. using System.Text;
  3. namespace ComeCapture
  4. {
  5. public class AppModel : EntityBase
  6. {
  7. public AppModel()
  8. {
  9. _Current = this;
  10. }
  11. #region 属性 Current
  12. private static AppModel _Current = null;
  13. public static AppModel Current => _Current;
  14. #endregion 属性 Current
  15. #region 属性 MaskLeftWidth
  16. private double _MaskLeftWidth = JieTuWindow.ScreenWidth;
  17. public double MaskLeftWidth
  18. {
  19. get => _MaskLeftWidth;
  20. set
  21. {
  22. _MaskLeftWidth = value;
  23. ShowSizeLeft = value;
  24. RaisePropertyChanged(() => MaskLeftWidth);
  25. }
  26. }
  27. #endregion 属性 MaskLeftWidth
  28. #region 属性 MaskRightWidth
  29. private double _MaskRightWidth = 0;
  30. public double MaskRightWidth
  31. {
  32. get => _MaskRightWidth;
  33. set
  34. {
  35. _MaskRightWidth = value;
  36. RaisePropertyChanged(() => MaskRightWidth);
  37. }
  38. }
  39. #endregion 属性 MaskRightWidth
  40. #region 属性 MaskTopWidth
  41. private double _MaskTopWidth = 0;
  42. public double MaskTopWidth
  43. {
  44. get => _MaskTopWidth;
  45. set
  46. {
  47. _MaskTopWidth = value;
  48. RaisePropertyChanged(() => MaskTopWidth);
  49. }
  50. }
  51. #endregion 属性 MaskTopWidth
  52. #region 属性 MaskTopHeight
  53. private double _MaskTopHeight = 0;
  54. public double MaskTopHeight
  55. {
  56. get => _MaskTopHeight;
  57. set
  58. {
  59. _MaskTopHeight = value;
  60. ShowSizeTop = MaskTopHeight < 40 ? MaskTopHeight : MaskTopHeight - 40;
  61. RaisePropertyChanged(() => MaskTopHeight);
  62. }
  63. }
  64. #endregion 属性 MaskTopHeight
  65. #region 属性 MaskBottomHeight
  66. private double _MaskBottomHeight = 0;
  67. public double MaskBottomHeight
  68. {
  69. get => _MaskBottomHeight;
  70. set
  71. {
  72. _MaskBottomHeight = value;
  73. RaisePropertyChanged(() => MaskBottomHeight);
  74. }
  75. }
  76. #endregion 属性 MaskBottomHeight
  77. #region 属性 ShowSize
  78. private string _ShowSize = "0 × 0";
  79. public string ShowSize
  80. {
  81. get => _ShowSize;
  82. set
  83. {
  84. _ShowSize = value;
  85. RaisePropertyChanged(() => ShowSize);
  86. }
  87. }
  88. private static StringBuilder sb = new StringBuilder();
  89. public void ChangeShowSize()
  90. {
  91. sb = new StringBuilder();
  92. sb.Append((int)(JieTuWindow.Current.MainImage.Width * JieTuWindow.ScreenScale));
  93. sb.Append(" × ");
  94. sb.Append((int)(JieTuWindow.Current.MainImage.Height * JieTuWindow.ScreenScale));
  95. ShowSize = sb.ToString();
  96. }
  97. #endregion 属性 ShowSize
  98. #region 属性 ShowSizeLeft
  99. private double _ShowSizeLeft = 0;
  100. public double ShowSizeLeft
  101. {
  102. get => _ShowSizeLeft;
  103. set
  104. {
  105. _ShowSizeLeft = value;
  106. RaisePropertyChanged(() => ShowSizeLeft);
  107. }
  108. }
  109. #endregion 属性 ShowSizeLeft
  110. #region 属性 ShowSizeTop
  111. private double _ShowSizeTop = 0;
  112. public double ShowSizeTop
  113. {
  114. get => _ShowSizeTop;
  115. set
  116. {
  117. _ShowSizeTop = value;
  118. RaisePropertyChanged(() => ShowSizeTop);
  119. }
  120. }
  121. #endregion 属性 ShowSizeTop
  122. #region 属性 ShowRGB
  123. private string _ShowRGB = string.Empty;
  124. public string ShowRGB
  125. {
  126. get => _ShowRGB;
  127. set
  128. {
  129. _ShowRGB = value;
  130. RaisePropertyChanged(() => ShowRGB);
  131. }
  132. }
  133. #endregion 属性 ShowRGB
  134. }
  135. }