| 1 | using System; |
| 2 | using System.Collections.Generic; |
| 3 | using System.Collections.ObjectModel; |
| 4 | using System.Linq; |
| 5 | using System.Text; |
| 6 | using System.Threading.Tasks; |
| 7 | using System.Windows.Controls; |
| 8 | using UI.Controls.Charts.Model; |
| 9 | using UI.Controls.Select; |
| 10 | |
| 11 | namespace UI.Models |
| 12 | { |
| 13 | public class ChartPageModel : ModelBase |
| 14 | { |
| 15 | private List<ChartsDataModel> Data_; |
| 16 | |
| 17 | public List<ChartsDataModel> Data |
| 18 | { |
| 19 | get |
| 20 | { |
| 21 | return Data_; |
| 22 | } |
| 23 | set |
| 24 | { |
| 25 | Data_ = value; |
| 26 | OnPropertyChanged(); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | private ObservableCollection<string> TabbarData_; |
| 31 | ///<summary> |
| 32 | /// |
| 33 | ///</summary> |
| 34 | public ObservableCollection<string> TabbarData |
| 35 | { |
| 36 | get { return TabbarData_; } |
| 37 | set { TabbarData_ = value; OnPropertyChanged(); } |
| 38 | } |
| 39 | |
| 40 | private int TabbarSelectedIndex_; |
| 41 | ///<summary> |
| 42 | /// |
| 43 | ///</summary> |
| 44 | public int TabbarSelectedIndex |
| 45 | { |
| 46 | get { return TabbarSelectedIndex_; } |
| 47 | set |
| 48 | { |
| 49 | TabbarSelectedIndex_ = value; |
| 50 | OnPropertyChanged(); |
| 51 | } |
| 52 | } |
| 53 | private string WeekDateStr_; |
| 54 | public string WeekDateStr { get { return WeekDateStr_; } set { WeekDateStr_ = value; OnPropertyChanged(); } } |
| 55 | private DateTime Date_; |
| 56 | public DateTime Date { get { return Date_; } set { Date_ = value; OnPropertyChanged(); } } |
| 57 | |
| 58 | private List<SelectItemModel> WeekOptions_; |
| 59 | |
| 60 | public List<SelectItemModel> WeekOptions { get { return WeekOptions_; } set { WeekOptions_ = value; OnPropertyChanged(); } } |
| 61 | |
| 62 | private SelectItemModel SelectedWeek_; |
| 63 | |
| 64 | public SelectItemModel SelectedWeek { get { return SelectedWeek_; } set { SelectedWeek_ = value; OnPropertyChanged(); } } |
| 65 | |
| 66 | private DateTime MonthDate_; |
| 67 | public DateTime MonthDate { get { return MonthDate_; } set { MonthDate_ = value; OnPropertyChanged(); } } |
| 68 | |
| 69 | private DateTime YearDate_; |
| 70 | public DateTime YearDate { get { return YearDate_; } set { YearDate_ = value; OnPropertyChanged(); } } |
| 71 | |
| 72 | private int NameIndexStart_ = 0; |
| 73 | public int NameIndexStart { get { return NameIndexStart_; } set { NameIndexStart_ = value; OnPropertyChanged(); } } |
| 74 | |
| 75 | private List<ChartsDataModel> TopData_; |
| 76 | public List<ChartsDataModel> TopData |
| 77 | { |
| 78 | get { return TopData_; } |
| 79 | set { TopData_ = value; OnPropertyChanged(); } |
| 80 | } |
| 81 | |
| 82 | private double DataMaximum_ = 0; |
| 83 | public double DataMaximum { get { return DataMaximum_; } set { DataMaximum_ = value; OnPropertyChanged(); } } |
| 84 | |
| 85 | private ContextMenu AppContextMenu_; |
| 86 | public ContextMenu AppContextMenu { get { return AppContextMenu_; } set { AppContextMenu_ = value; OnPropertyChanged(); } } |
| 87 | |
| 88 | private string TotalHours_; |
| 89 | public string TotalHours { get { return TotalHours_; } set { TotalHours_ = value; OnPropertyChanged(); } } |
| 90 | |
| 91 | private string TopHours_; |
| 92 | public string TopHours { get { return TopHours_; } set { TopHours_ = value; OnPropertyChanged(); } } |
| 93 | private string AppCount_; |
| 94 | public string AppCount { get { return AppCount_; } set { AppCount_ = value; OnPropertyChanged(); } } |
| 95 | |
| 96 | private int ColumnSelectedIndex_ = -1; |
| 97 | ///<summary> |
| 98 | /// |
| 99 | ///</summary> |
| 100 | public int ColumnSelectedIndex { get { return ColumnSelectedIndex_; } set { ColumnSelectedIndex_ = value; OnPropertyChanged(); } } |
| 101 | private List<ChartsDataModel> DayHoursData_; |
| 102 | ///<summary> |
| 103 | /// |
| 104 | ///</summary> |
| 105 | public List<ChartsDataModel> DayHoursData |
| 106 | { |
| 107 | get { return DayHoursData_; } |
| 108 | set { DayHoursData_ = value; OnPropertyChanged(); } |
| 109 | } |
| 110 | private string DayHoursSelectedTime_; |
| 111 | ///<summary> |
| 112 | /// |
| 113 | ///</summary> |
| 114 | public string DayHoursSelectedTime { get { return DayHoursSelectedTime_; } set { DayHoursSelectedTime_ = value; OnPropertyChanged(); } } |
| 115 | private bool IsCanColumnSelect_ = true; |
| 116 | ///<summary> |
| 117 | /// |
| 118 | ///</summary> |
| 119 | public bool IsCanColumnSelect { get { return IsCanColumnSelect_; } set { IsCanColumnSelect_ = value; OnPropertyChanged(); } } |
| 120 | |
| 121 | private SelectItemModel ChartDataMode_; |
| 122 | ///<summary> |
| 123 | /// |
| 124 | ///</summary> |
| 125 | public SelectItemModel ChartDataMode { get { return ChartDataMode_; } set { ChartDataMode_ = value; OnPropertyChanged(); } } |
| 126 | |
| 127 | private List<ChartsDataModel> RadarData_; |
| 128 | ///<summary> |
| 129 | /// |
| 130 | ///</summary> |
| 131 | public List<ChartsDataModel> RadarData { get { return RadarData_; } set { RadarData_ = value; OnPropertyChanged(); } } |
| 132 | private bool IsChartStack_ = true; |
| 133 | ///<summary> |
| 134 | /// |
| 135 | ///</summary> |
| 136 | public bool IsChartStack { get { return IsChartStack_; } set { IsChartStack_ = value; OnPropertyChanged(); } } |
| 137 | |
| 138 | private Core.Models.AppModel Top1App_; |
| 139 | ///<summary> |
| 140 | /// |
| 141 | ///</summary> |
| 142 | public Core.Models.AppModel Top1App { get { return Top1App_; } set { Top1App_ = value; OnPropertyChanged(); } } |
| 143 | |
| 144 | private string DiffTotalTimeType_; |
| 145 | ///<summary> |
| 146 | /// |
| 147 | ///</summary> |
| 148 | public string DiffTotalTimeType { get { return DiffTotalTimeType_; } set { DiffTotalTimeType_ = value; OnPropertyChanged(); } } |
| 149 | private string DiffAppCountType_; |
| 150 | ///<summary> |
| 151 | /// |
| 152 | ///</summary> |
| 153 | public string DiffAppCountType { get { return DiffAppCountType_; } set { DiffAppCountType_ = value; OnPropertyChanged(); } } |
| 154 | private string DiffTotalTimeValue_; |
| 155 | ///<summary> |
| 156 | /// |
| 157 | ///</summary> |
| 158 | public string DiffTotalTimeValue { get { return DiffTotalTimeValue_; } set { DiffTotalTimeValue_ = value; OnPropertyChanged(); } } |
| 159 | private string DiffAppCountValue_; |
| 160 | ///<summary> |
| 161 | /// |
| 162 | ///</summary> |
| 163 | public string DiffAppCountValue { get { return DiffAppCountValue_; } set { DiffAppCountValue_ = value; OnPropertyChanged(); } } |
| 164 | |
| 165 | |
| 166 | ///<summary> |
| 167 | /// |
| 168 | ///</summary> |
| 169 | |
| 170 | |
| 171 | private List<ChartsDataModel> WebCategoriesPieData_; |
| 172 | ///<summary> |
| 173 | /// |
| 174 | ///</summary> |
| 175 | public List<ChartsDataModel> WebCategoriesPieData { get { return WebCategoriesPieData_; } set { WebCategoriesPieData_ = value; OnPropertyChanged(); } } |
| 176 | |
| 177 | private List<ChartsDataModel> WebBrowseStatisticsData_; |
| 178 | ///<summary> |
| 179 | /// |
| 180 | ///</summary> |
| 181 | public List<ChartsDataModel> WebBrowseStatisticsData { get { return WebBrowseStatisticsData_; } set { WebBrowseStatisticsData_ = value; OnPropertyChanged(); } } |
| 182 | |
| 183 | #region 网页数据 |
| 184 | private string WebTotalTimeText_; |
| 185 | ///<summary> |
| 186 | /// |
| 187 | ///</summary> |
| 188 | public string WebTotalTimeText { get { return WebTotalTimeText_; } set { WebTotalTimeText_ = value; OnPropertyChanged(); } } |
| 189 | private double WebTotalTime_; |
| 190 | ///<summary> |
| 191 | /// |
| 192 | ///</summary> |
| 193 | public double WebTotalTime { get { return WebTotalTime_; } set { WebTotalTime_ = value; OnPropertyChanged(); } } |
| 194 | private double WebSiteCount_; |
| 195 | ///<summary> |
| 196 | /// |
| 197 | ///</summary> |
| 198 | public double WebSiteCount { get { return WebSiteCount_; } set { WebSiteCount_ = value; OnPropertyChanged(); } } |
| 199 | private double WebPageCount_; |
| 200 | ///<summary> |
| 201 | /// |
| 202 | ///</summary> |
| 203 | public double WebPageCount { get { return WebPageCount_; } set { WebPageCount_ = value; OnPropertyChanged(); } } |
| 204 | |
| 205 | private double LastWebTotalTime_; |
| 206 | ///<summary> |
| 207 | /// |
| 208 | ///</summary> |
| 209 | public double LastWebTotalTime { get { return LastWebTotalTime_; } set { LastWebTotalTime_ = value; OnPropertyChanged(); } } |
| 210 | private double LastWebSiteCount_; |
| 211 | ///<summary> |
| 212 | /// |
| 213 | ///</summary> |
| 214 | public double LastWebSiteCount { get { return LastWebSiteCount_; } set { LastWebSiteCount_ = value; OnPropertyChanged(); } } |
| 215 | private double LastWebPageCount_; |
| 216 | ///<summary> |
| 217 | /// |
| 218 | ///</summary> |
| 219 | public double LastWebPageCount { get { return LastWebPageCount_; } set { LastWebPageCount_ = value; OnPropertyChanged(); } } |
| 220 | |
| 221 | private List<ChartsDataModel> WebSitesTopData_; |
| 222 | ///<summary> |
| 223 | /// |
| 224 | ///</summary> |
| 225 | public List<ChartsDataModel> WebSitesTopData { get { return WebSitesTopData_; } set { WebSitesTopData_ = value; OnPropertyChanged(); } } |
| 226 | private int WebColSelectedIndex_ = -1; |
| 227 | ///<summary> |
| 228 | /// |
| 229 | ///</summary> |
| 230 | public int WebColSelectedIndex { get { return WebColSelectedIndex_; } set { WebColSelectedIndex_ = value; OnPropertyChanged(); } } |
| 231 | |
| 232 | private List<ChartsDataModel> WebSitesColSelectedData_; |
| 233 | ///<summary> |
| 234 | /// |
| 235 | ///</summary> |
| 236 | public List<ChartsDataModel> WebSitesColSelectedData { get { return WebSitesColSelectedData_; } set { WebSitesColSelectedData_ = value; OnPropertyChanged(); } } |
| 237 | |
| 238 | private string WebSitesColSelectedTimeText_; |
| 239 | ///<summary> |
| 240 | /// |
| 241 | ///</summary> |
| 242 | public string WebSitesColSelectedTimeText { get { return WebSitesColSelectedTimeText_; } set { WebSitesColSelectedTimeText_ = value; OnPropertyChanged(); } } |
| 243 | private ContextMenu WebSiteContextMenu_; |
| 244 | ///<summary> |
| 245 | /// |
| 246 | ///</summary> |
| 247 | public ContextMenu WebSiteContextMenu { get { return WebSiteContextMenu_; } set { WebSiteContextMenu_ = value; OnPropertyChanged(); } } |
| 248 | #endregion |
| 249 | } |
| 250 | } |