mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 03:37:10 +08:00
add pinyin cache for control panel plugin #858
This commit is contained in:
parent
5eadaa08aa
commit
767aaa80a0
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Wox.Infrastructure;
|
||||
|
||||
namespace Wox.Plugin.ControlPanel
|
||||
@ -34,6 +35,17 @@ namespace Wox.Plugin.ControlPanel
|
||||
item.Icon.ToBitmap().Save(iconFolder + item.GUID + fileType);
|
||||
}
|
||||
}
|
||||
|
||||
var characters = controlPanelItems.Select(i => i.LocalizedString)
|
||||
.Concat(controlPanelItems.Select(i => i.InfoTip));
|
||||
|
||||
Parallel.ForEach(characters, c =>
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(c) && Alphabet.ContainsChinese(c))
|
||||
{
|
||||
Alphabet.PinyinComination(c);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
|
Loading…
Reference in New Issue
Block a user