提交记录修改UI/Controls/Charts/Charts.cs+19 −2看文件
| @@ -1,4 +1,5 @@ | ||
| 1 | 1 | using Core.Librarys; |
| 2 | 新增:using Core.Models; | |
| 2 | 3 | using System; |
| 3 | 4 | using System.Collections.Generic; |
| 4 | 5 | using System.Diagnostics; |
| @@ -754,10 +755,26 @@ namespace UI.Controls.Charts | ||
| 754 | 755 | { |
| 755 | 756 | var data = control.Data; |
| 756 | 757 | |
| 758 | 新增: var log = data.Data as DailyLogModel; | |
| 759 | 新增: var app = log != null ? log.AppModel : null; | |
| 760 | 新增: | |
| 761 | 新增: if (log == null) | |
| 762 | 新增: { | |
| 763 | 新增: app = (data.Data as HoursLogModel).AppModel; | |
| 764 | 新增: } | |
| 765 | 新增: | |
| 757 | 766 | bool show = false; |
| 758 | 删除: if (data.Name.ToLower().IndexOf(searchKey) != -1 || data.PopupText.ToLower().IndexOf(searchKey) != -1 || string.IsNullOrEmpty(searchKey)) | |
| 767 | 新增: if (app != null) | |
| 768 | 新增: { | |
| 769 | 新增: show = string.IsNullOrEmpty(searchKey) || app.Name.ToLower().Contains(searchKey) || app.File.ToLower().Contains(searchKey) || app.Description.ToLower().Contains(searchKey); | |
| 770 | 新增: } | |
| 771 | 新增: if (!show && app.Category != null) | |
| 772 | 新增: { | |
| 773 | 新增: show = app.Category.Name.Contains(searchKey); | |
| 774 | 新增: } | |
| 775 | 新增: if (!show && searchKey == "忽略") | |
| 759 | 776 | { |
| 760 | 删除: show = true; | |
| 777 | 新增: show = data.BadgeList.Where(m => m.Type == ChartBadgeType.Ignore).Any(); | |
| 761 | 778 | } |
| 762 | 779 | control.Visibility = show ? Visibility.Visible : Visibility.Collapsed; |
| 763 | 780 | } |

