提交记录修改Core/Librarys/Time.cs+7 −1看文件
删除UI/Librays/Timer.cs+0 −37
修改UI/UI.csproj+0 −1看文件
修改UI/ViewModels/ChartPageVM.cs+1 −2看文件
修改UI/ViewModels/DataPageVM.cs+1 −2看文件
修改UI/ViewModels/DetailPageVM.cs+6 −7看文件
修改UI/ViewModels/IndexPageVM.cs+1 −2看文件
| @@ -16,9 +16,15 @@ namespace Core.Librarys | ||
| 16 | 16 | } |
| 17 | 17 | else |
| 18 | 18 | { |
| 19 | 删除: double minutes = seconds / 60; | |
| 19 | 新增: double minutes = (double)seconds / 60; | |
| 20 | 20 | if (minutes < 60) |
| 21 | 21 | { |
| 22 | 新增: if (minutes != (int)minutes) | |
| 23 | 新增: { | |
| 24 | 新增: double pointNumber = minutes - (int)minutes; | |
| 25 | 新增: return (int)minutes + "分" + (int)(pointNumber * 60) + "秒"; | |
| 26 | 新增: } | |
| 27 | 新增: | |
| 22 | 28 | return minutes + "分钟"; |
| 23 | 29 | } |
| 24 | 30 | else |
| @@ -1,37 +0,0 @@ | ||
| 1 | 删除:using System; | |
| 2 | 删除:using System.Collections.Generic; | |
| 3 | 删除:using System.Linq; | |
| 4 | 删除:using System.Text; | |
| 5 | 删除:using System.Threading.Tasks; | |
| 6 | 删除: | |
| 7 | 删除:namespace UI.Librays | |
| 8 | 删除:{ | |
| 9 | 删除: public class Timer | |
| 10 | 删除: { | |
| 11 | 删除: public static string Fromat(int seconds) | |
| 12 | 删除: { | |
| 13 | 删除: if (seconds < 60) | |
| 14 | 删除: { | |
| 15 | 删除: return seconds + "秒"; | |
| 16 | 删除: } | |
| 17 | 删除: else | |
| 18 | 删除: { | |
| 19 | 删除: double minutes = seconds / 60; | |
| 20 | 删除: if (minutes < 60) | |
| 21 | 删除: { | |
| 22 | 删除: return minutes + "分钟"; | |
| 23 | 删除: } | |
| 24 | 删除: else | |
| 25 | 删除: { | |
| 26 | 删除: double hours = (double)minutes / 60; | |
| 27 | 删除: if (hours != (int)hours) | |
| 28 | 删除: { | |
| 29 | 删除: double pointNumber = hours - (int)hours; | |
| 30 | 删除: return (int)hours + "小时" + (int)(pointNumber * 60) + "分"; | |
| 31 | 删除: } | |
| 32 | 删除: return hours + "小时"; | |
| 33 | 删除: } | |
| 34 | 删除: } | |
| 35 | 删除: } | |
| 36 | 删除: } | |
| 37 | 删除:} | |
| @@ -164,7 +164,6 @@ | ||
| 164 | 164 | <Compile Include="Controls\Window\ToastType.cs" /> |
| 165 | 165 | <Compile Include="Extensions\ListExtensions.cs" /> |
| 166 | 166 | <Compile Include="Librays\Image\Imager.cs" /> |
| 167 | 删除: <Compile Include="Librays\Timer.cs" /> | |
| 168 | 167 | <Compile Include="Models\CategoryAppListPageModel.cs" /> |
| 169 | 168 | <Compile Include="Models\CategoryAppList\ChooseAppModel.cs" /> |
| 170 | 169 | <Compile Include="Models\CategoryPageModel.cs" /> |
| @@ -9,7 +9,6 @@ using System.Threading.Tasks; | ||
| 9 | 9 | using UI.Controls; |
| 10 | 10 | using UI.Controls.Charts.Model; |
| 11 | 11 | using UI.Controls.Select; |
| 12 | 删除:using UI.Librays; | |
| 13 | 12 | using UI.Models; |
| 14 | 13 | using UI.Views; |
| 15 | 14 | |
| @@ -385,7 +384,7 @@ namespace UI.ViewModels | ||
| 385 | 384 | bindModel.Data = item; |
| 386 | 385 | bindModel.Name = string.IsNullOrEmpty(item.AppModel?.Description) ? item.AppModel.Name : item.AppModel.Description; |
| 387 | 386 | bindModel.Value = item.Time; |
| 388 | 删除: bindModel.Tag = Timer.Fromat(item.Time); | |
| 387 | 新增: bindModel.Tag =Time.ToString(item.Time); | |
| 389 | 388 | bindModel.PopupText = item.AppModel?.File; |
| 390 | 389 | bindModel.Icon = item.AppModel?.IconFile; |
| 391 | 390 | resData.Add(bindModel); |
| @@ -12,7 +12,6 @@ using System.Threading.Tasks; | ||
| 12 | 12 | using System.Windows.Media.Imaging; |
| 13 | 13 | using UI.Controls; |
| 14 | 14 | using UI.Controls.Charts.Model; |
| 15 | 删除:using UI.Librays; | |
| 16 | 15 | using UI.Models; |
| 17 | 16 | using UI.Views; |
| 18 | 17 | |
| @@ -183,7 +182,7 @@ namespace UI.ViewModels | ||
| 183 | 182 | bindModel.Data = item; |
| 184 | 183 | bindModel.Name = string.IsNullOrEmpty(item.AppModel?.Description) ? item.AppModel.Name : item.AppModel.Description; |
| 185 | 184 | bindModel.Value = item.Time; |
| 186 | 删除: bindModel.Tag = Timer.Fromat(item.Time); | |
| 185 | 新增: bindModel.Tag = Time.ToString(item.Time); | |
| 187 | 186 | bindModel.PopupText = item.AppModel?.File; |
| 188 | 187 | bindModel.Icon = item.AppModel?.IconFile; |
| 189 | 188 | resData.Add(bindModel); |
| @@ -12,7 +12,6 @@ using System.Windows; | ||
| 12 | 12 | using UI.Controls; |
| 13 | 13 | using UI.Controls.Charts.Model; |
| 14 | 14 | using UI.Controls.Select; |
| 15 | 删除:using UI.Librays; | |
| 16 | 15 | using UI.Models; |
| 17 | 16 | |
| 18 | 17 | namespace UI.ViewModels |
| @@ -269,7 +268,7 @@ namespace UI.ViewModels | ||
| 269 | 268 | |
| 270 | 269 | //if (today != null) |
| 271 | 270 | //{ |
| 272 | 删除: // TodayTime = Timer.Fromat(today.Time); | |
| 271 | 新增: // TodayTime = Time.ToString(today.Time); | |
| 273 | 272 | //} |
| 274 | 273 | //else |
| 275 | 274 | //{ |
| @@ -291,12 +290,12 @@ namespace UI.ViewModels | ||
| 291 | 290 | // else if (diffseconds > 0) |
| 292 | 291 | // { |
| 293 | 292 | // // 增加 |
| 294 | 删除: // diffText = "增加了" + Timer.Fromat(diffseconds); | |
| 293 | 新增: // diffText = "增加了" + Time.ToString(diffseconds); | |
| 295 | 294 | // } |
| 296 | 295 | // else |
| 297 | 296 | // { |
| 298 | 297 | // // 减少 |
| 299 | 删除: // diffText = "减少了" + Timer.Fromat(Math.Abs(diffseconds)); | |
| 298 | 新增: // diffText = "减少了" + Time.ToString(Math.Abs(diffseconds)); | |
| 300 | 299 | // } |
| 301 | 300 | // } |
| 302 | 301 | // Yesterday = diffseconds == yesterday.Time ? "减少100%" : diffText; |
| @@ -319,7 +318,7 @@ namespace UI.ViewModels | ||
| 319 | 318 | |
| 320 | 319 | var monthData = data.GetProcessMonthLogList(App.ID, Date); |
| 321 | 320 | int monthTotal = monthData.Sum(m => m.Time); |
| 322 | 删除: Total = Timer.Fromat(monthTotal); | |
| 321 | 新增: Total = Time.ToString(monthTotal); | |
| 323 | 322 | |
| 324 | 323 | DateTime start = new DateTime(Date.Year, Date.Month, 1); |
| 325 | 324 | DateTime end = new DateTime(Date.Year, Date.Month, DateTime.DaysInMonth(Date.Year, Date.Month)); |
| @@ -329,7 +328,7 @@ namespace UI.ViewModels | ||
| 329 | 328 | if (monthData.Count > 0) |
| 330 | 329 | { |
| 331 | 330 | var longDayData = monthData.OrderByDescending(m => m.Time).FirstOrDefault(); |
| 332 | 删除: LongDay = longDayData.Date.ToString("最长一天是在 dd 号,使用了 " + Timer.Fromat(longDayData.Time)); | |
| 331 | 新增: LongDay = longDayData.Date.ToString("最长一天是在 dd 号,使用了 " + Time.ToString(longDayData.Time)); | |
| 333 | 332 | |
| 334 | 333 | } |
| 335 | 334 | |
| @@ -383,7 +382,7 @@ namespace UI.ViewModels | ||
| 383 | 382 | bindModel.Data = item; |
| 384 | 383 | bindModel.Name = string.IsNullOrEmpty(item.AppModel?.Description) ? item.AppModel.Name : item.AppModel.Description; |
| 385 | 384 | bindModel.Value = item.Time; |
| 386 | 删除: bindModel.Tag = Timer.Fromat(item.Time); | |
| 385 | 新增: bindModel.Tag = Time.ToString(item.Time); | |
| 387 | 386 | bindModel.PopupText = item.AppModel.File; |
| 388 | 387 | bindModel.Icon = item.AppModel.IconFile; |
| 389 | 388 | bindModel.DateTime = item.Date; |
| @@ -13,7 +13,6 @@ using System.Windows; | ||
| 13 | 13 | using System.Windows.Media.Imaging; |
| 14 | 14 | using UI.Controls; |
| 15 | 15 | using UI.Controls.Charts.Model; |
| 16 | 删除:using UI.Librays; | |
| 17 | 16 | using UI.Models; |
| 18 | 17 | using UI.Views; |
| 19 | 18 | |
| @@ -158,7 +157,7 @@ namespace UI.ViewModels | ||
| 158 | 157 | bindModel.Data = item; |
| 159 | 158 | bindModel.Name = string.IsNullOrEmpty(item.AppModel?.Description) ? item.AppModel.Name : item.AppModel.Description; |
| 160 | 159 | bindModel.Value = item.Time; |
| 161 | 删除: bindModel.Tag = Timer.Fromat(item.Time); | |
| 160 | 新增: bindModel.Tag = Time.ToString(item.Time); | |
| 162 | 161 | bindModel.PopupText = item.AppModel?.File; |
| 163 | 162 | bindModel.Icon = item.AppModel?.IconFile; |
| 164 | 163 | bindModel.DateTime = item.Date; |

