支持筛选录像
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using NPinyin;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -49,9 +50,21 @@ namespace AnotherReplayReader
|
||||
|
||||
private void Display(string filter = "", string nameFilter = "")
|
||||
{
|
||||
var pinyin = nameFilter.ToPinyin();
|
||||
var newList = _identity
|
||||
.AsSortedList()
|
||||
.Where(x => x.IPString.StartsWith(filter) && x.ID.StartsWith(nameFilter, StringComparison.CurrentCultureIgnoreCase))
|
||||
.Where(x =>
|
||||
{
|
||||
if (!x.IPString.StartsWith(filter))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (x.PinyinID?.ContainsIgnoreCase(pinyin) is true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return x.ID.ContainsIgnoreCase(nameFilter);
|
||||
})
|
||||
.ToArray();
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user