123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace XHWK.Model
- {
- public class AppModel : EntityBase
- {
- public AppModel()
- {
- _Current = this;
- }
-
- #region 属性 Current
-
- private static AppModel _Current = null;
-
- public static AppModel Current => _Current;
-
- #endregion 属性 Current
-
- #region 属性 MaskLeftWidth
-
- private double _MaskLeftWidth = ScreenshotWindow.ScreenWidth;
-
- public double MaskLeftWidth
- {
- get => _MaskLeftWidth;
- set
- {
- _MaskLeftWidth = value;
- ShowSizeLeft = value;
- RaisePropertyChanged(() => MaskLeftWidth);
- }
- }
-
- #endregion 属性 MaskLeftWidth
-
- #region 属性 MaskRightWidth
-
- private double _MaskRightWidth = 0;
-
- public double MaskRightWidth
- {
- get => _MaskRightWidth;
- set
- {
- _MaskRightWidth = value;
- RaisePropertyChanged(() => MaskRightWidth);
- }
- }
-
- #endregion 属性 MaskRightWidth
-
- #region 属性 MaskTopWidth
-
- private double _MaskTopWidth = 0;
-
- public double MaskTopWidth
- {
- get => _MaskTopWidth;
- set
- {
- _MaskTopWidth = value;
- RaisePropertyChanged(() => MaskTopWidth);
- }
- }
-
- #endregion 属性 MaskTopWidth
-
- #region 属性 MaskTopHeight
-
- private double _MaskTopHeight = 0;
-
- public double MaskTopHeight
- {
- get => _MaskTopHeight;
- set
- {
- _MaskTopHeight = value;
- ShowSizeTop = MaskTopHeight < 40 ? MaskTopHeight : MaskTopHeight - 40;
- RaisePropertyChanged(() => MaskTopHeight);
- }
- }
-
- #endregion 属性 MaskTopHeight
-
- #region 属性 MaskBottomHeight
-
- private double _MaskBottomHeight = 0;
-
- public double MaskBottomHeight
- {
- get => _MaskBottomHeight;
- set
- {
- _MaskBottomHeight = value;
- RaisePropertyChanged(() => MaskBottomHeight);
- }
- }
-
- #endregion 属性 MaskBottomHeight
-
- #region 属性 ShowSize
-
- private string _ShowSize = "0 × 0";
-
- public string ShowSize
- {
- get => _ShowSize;
- set
- {
- _ShowSize = value;
- RaisePropertyChanged(() => ShowSize);
- }
- }
-
- private static StringBuilder sb = new StringBuilder();
-
- public void ChangeShowSize()
- {
- sb = new StringBuilder();
- sb.Append((int)(ScreenshotWindow.Current.MainImage.Width * ScreenshotWindow.ScreenScale));
- sb.Append(" × ");
- sb.Append((int)(ScreenshotWindow.Current.MainImage.Height * ScreenshotWindow.ScreenScale));
- ShowSize = sb.ToString();
- }
-
- #endregion 属性 ShowSize
-
- #region 属性 ShowSizeLeft
-
- private double _ShowSizeLeft = 0;
-
- public double ShowSizeLeft
- {
- get => _ShowSizeLeft;
- set
- {
- _ShowSizeLeft = value;
- RaisePropertyChanged(() => ShowSizeLeft);
- }
- }
-
- #endregion 属性 ShowSizeLeft
-
- #region 属性 ShowSizeTop
-
- private double _ShowSizeTop = 0;
-
- public double ShowSizeTop
- {
- get => _ShowSizeTop;
- set
- {
- _ShowSizeTop = value;
- RaisePropertyChanged(() => ShowSizeTop);
- }
- }
-
- #endregion 属性 ShowSizeTop
-
- #region 属性 ShowRGB
-
- private string _ShowRGB = string.Empty;
-
- public string ShowRGB
- {
- get => _ShowRGB;
- set
- {
- _ShowRGB = value;
- RaisePropertyChanged(() => ShowRGB);
- }
- }
-
- #endregion 属性 ShowRGB
- }
- }
|