123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- using ComeCapture.Models;
-
- using System.Text;
-
- namespace ComeCapture
- {
- public class AppModel : EntityBase
- {
- public AppModel()
- {
- _current = this;
- }
-
- #region 属性 Current
-
- private static AppModel _current;
-
- public static AppModel Current => _current;
-
- #endregion 属性 Current
-
- #region 属性 MaskLeftWidth
-
- private double _maskLeftWidth = JieTuWindow.ScreenWidth;
-
- public double MaskLeftWidth
- {
- get => _maskLeftWidth;
- set
- {
- _maskLeftWidth = value;
- ShowSizeLeft = value;
- RaisePropertyChanged(() => MaskLeftWidth);
- }
- }
-
- #endregion 属性 MaskLeftWidth
-
- #region 属性 MaskRightWidth
-
- private double _maskRightWidth;
-
- public double MaskRightWidth
- {
- get => _maskRightWidth;
- set
- {
- _maskRightWidth = value;
- RaisePropertyChanged(() => MaskRightWidth);
- }
- }
-
- #endregion 属性 MaskRightWidth
-
- #region 属性 MaskTopWidth
-
- private double _maskTopWidth;
-
- public double MaskTopWidth
- {
- get => _maskTopWidth;
- set
- {
- _maskTopWidth = value;
- RaisePropertyChanged(() => MaskTopWidth);
- }
- }
-
- #endregion 属性 MaskTopWidth
-
- #region 属性 MaskTopHeight
-
- private double _maskTopHeight;
-
- public double MaskTopHeight
- {
- get => _maskTopHeight;
- set
- {
- _maskTopHeight = value;
- ShowSizeTop = MaskTopHeight < 40 ? MaskTopHeight : MaskTopHeight - 40;
- RaisePropertyChanged(() => MaskTopHeight);
- }
- }
-
- #endregion 属性 MaskTopHeight
-
- #region 属性 MaskBottomHeight
-
- private double _maskBottomHeight;
-
- 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)(JieTuWindow.Current.MainImage.Width * JieTuWindow.ScreenScale));
- _sb.Append(" × ");
- _sb.Append((int)(JieTuWindow.Current.MainImage.Height * JieTuWindow.ScreenScale));
- ShowSize = _sb.ToString();
- }
-
- #endregion 属性 ShowSize
-
- #region 属性 ShowSizeLeft
-
- private double _showSizeLeft;
-
- public double ShowSizeLeft
- {
- get => _showSizeLeft;
- set
- {
- _showSizeLeft = value;
- RaisePropertyChanged(() => ShowSizeLeft);
- }
- }
-
- #endregion 属性 ShowSizeLeft
-
- #region 属性 ShowSizeTop
-
- private double _showSizeTop;
-
- 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
- }
- }
|