跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

浏览文件

DetailPageModel.cs

176 行 · 6.3 KB历史下载
1using Core.Models;
2using System;
3using System.Collections.Generic;
4using System.Collections.ObjectModel;
5using System.Linq;
6using System.Text;
7using System.Threading.Tasks;
8using System.Windows;
9using System.Windows.Controls;
10using UI.Controls.Charts.Model;
11using UI.Controls.Select;
12
13namespace UI.Models
14{
15 public class DetailPageModel : UINotifyPropertyChanged
16 {
17
18 private List<ChartsDataModel> Data_;
19 /// <summary>
20 /// data
21 /// </summary>
22 public List<ChartsDataModel> Data
23 {
24 get { return Data_; }
25 set { Data_ = value; OnPropertyChanged(); }
26 }
27 private AppModel App_;
28 public AppModel App { get { return App_; } set { App_ = value; OnPropertyChanged(); } }
29 private bool IsLoading_;
30 public bool IsLoading { get { return IsLoading_; } set { IsLoading_ = value; OnPropertyChanged(); } }
31
32 private string Total_;
33 public string Total { get { return Total_; } set { Total_ = value; OnPropertyChanged(); } }
34
35 private string Ratio_;
36 public string Ratio { get { return Ratio_; } set { Ratio_ = value; OnPropertyChanged(); } }
37
38 private DateTime Date_;
39 public DateTime Date { get { return Date_; } set { Date_ = value; OnPropertyChanged(); } }
40
41 private string LongDay_;
42 public string LongDay { get { return LongDay_; } set { LongDay_ = value; OnPropertyChanged(); } }
43
44
45 private bool IsIgnore_;
46 public bool IsIgnore
47 {
48 get { return IsIgnore_; }
49 set
50 {
51 IsIgnore_ = value;
52 if (IsIgnore)
53 {
54 BlockBtnVisibility = Visibility.Collapsed;
55 CancelBlockBtnVisibility = Visibility.Visible;
56 }
57 else
58 {
59 BlockBtnVisibility = Visibility.Visible;
60 CancelBlockBtnVisibility = Visibility.Collapsed;
61 }
62 OnPropertyChanged();
63 }
64 }
65
66 private Visibility BlockBtnVisibility_ = Visibility.Collapsed;
67 public Visibility BlockBtnVisibility { get { return BlockBtnVisibility_; } set { BlockBtnVisibility_ = value; OnPropertyChanged(); } }
68
69 private Visibility CancelBlockBtnVisibility_ = Visibility.Collapsed;
70 public Visibility CancelBlockBtnVisibility { get { return CancelBlockBtnVisibility_; } set { CancelBlockBtnVisibility_ = value; OnPropertyChanged(); } }
71
72 private string TodayTime_;
73 /// <summary>
74 /// 今日使用时长
75 /// </summary>
76 public string TodayTime { get { return TodayTime_; } set { TodayTime_ = value; OnPropertyChanged(); } }
77
78 private string Yesterday_;
79 /// <summary>
80 /// 相比昨日
81 /// </summary>
82 public string Yesterday { get { return Yesterday_; } set { Yesterday_ = value; OnPropertyChanged(); } }
83
84 private List<SelectItemModel> Categorys_;
85 /// <summary>
86 /// 分类数据
87 /// </summary>
88 public List<SelectItemModel> Categorys { get { return Categorys_; } set { Categorys_ = value; OnPropertyChanged(); } }
89
90 private SelectItemModel Category_;
91 /// <summary>
92 /// 当前分类
93 /// </summary>
94 public SelectItemModel Category { get { return Category_; } set { Category_ = value; OnPropertyChanged(); } }
95
96
97 // 图表数据
98 private List<ChartsDataModel> ChartData_;
99
100 public List<ChartsDataModel> ChartData
101 {
102 get
103 {
104 return ChartData_;
105 }
106 set
107 {
108 ChartData_ = value;
109 OnPropertyChanged();
110 }
111 }
112
113 private ObservableCollection<string> TabbarData_;
114 /// <summary>
115 /// tabbar data
116 /// </summary>
117 public ObservableCollection<string> TabbarData
118 {
119 get { return TabbarData_; }
120 set { TabbarData_ = value; OnPropertyChanged(); }
121 }
122
123 private int TabbarSelectedIndex_;
124 /// <summary>
125 /// tabbar selected item index
126 /// </summary>
127 public int TabbarSelectedIndex
128 {
129 get { return TabbarSelectedIndex_; }
130 set
131 {
132 TabbarSelectedIndex_ = value;
133 OnPropertyChanged();
134 }
135 }
136 private string WeekDateStr_;
137 public string WeekDateStr { get { return WeekDateStr_; } set { WeekDateStr_ = value; OnPropertyChanged(); } }
138 private DateTime ChartDate_;
139 public DateTime ChartDate { get { return ChartDate_; } set { ChartDate_ = value; OnPropertyChanged(); } }
140
141 private List<SelectItemModel> WeekOptions_;
142
143 public List<SelectItemModel> WeekOptions { get { return WeekOptions_; } set { WeekOptions_ = value; OnPropertyChanged(); } }
144
145 private SelectItemModel SelectedWeek_;
146
147 public SelectItemModel SelectedWeek { get { return SelectedWeek_; } set { SelectedWeek_ = value; OnPropertyChanged(); } }
148
149 private DateTime MonthDate_;
150 public DateTime MonthDate { get { return MonthDate_; } set { MonthDate_ = value; OnPropertyChanged(); } }
151
152 private DateTime YearDate_;
153 public DateTime YearDate { get { return YearDate_; } set { YearDate_ = value; OnPropertyChanged(); } }
154
155 private int NameIndexStart_ = 0;
156 public int NameIndexStart { get { return NameIndexStart_; } set { NameIndexStart_ = value; OnPropertyChanged(); } }
157 private double DataMaximum_ = 0;
158 public double DataMaximum { get { return DataMaximum_; } set { DataMaximum_ = value; OnPropertyChanged(); } }
159
160 private List<AppModel> LinkApps_;
161 /// <summary>
162 /// 关联的应用
163 /// </summary>
164 public List<AppModel> LinkApps { get { return LinkApps_; } set { LinkApps_ = value; OnPropertyChanged(); } }
165 private bool IsRegexIgnore_;
166 /// <summary>
167 /// 是否已被正则忽略
168 /// </summary>
169 public bool IsRegexIgnore { get { return IsRegexIgnore_; } set { IsRegexIgnore_ = value; OnPropertyChanged(); } }
170 private ContextMenu AppContextMenu_;
171 /// <summary>
172 /// 应用右键菜单
173 /// </summary>
174 public ContextMenu AppContextMenu { get { return AppContextMenu_; } set { AppContextMenu_ = value; OnPropertyChanged(); } }
175 }
176}