Highlight how results matched

This commit is contained in:
SysC0mp
2019-12-03 15:25:19 +01:00
parent a004ef65af
commit 601d6f37af
7 changed files with 52 additions and 37 deletions

View File

@@ -8,6 +8,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using Newtonsoft.Json;
using Wox.Infrastructure;
using Wox.Infrastructure.Http;
using Wox.Infrastructure.Logger;
@@ -142,6 +143,8 @@ namespace Wox.Plugin.PluginManagement
Title = r.name,
SubTitle = r.description,
IcoPath = "Images\\plugin.png",
TitleHighlightData = StringMatcher.FuzzySearch(query.SecondSearch, r.name).MatchData,
SubTitleHighlightData = StringMatcher.FuzzySearch(query.SecondSearch, r.description).MatchData,
Action = c =>
{
MessageBoxResult result = MessageBox.Show("Are you sure you wish to install the \'" + r.name + "\' plugin",
@@ -191,6 +194,8 @@ namespace Wox.Plugin.PluginManagement
Title = plugin.Name,
SubTitle = plugin.Description,
IcoPath = plugin.IcoPath,
TitleHighlightData = StringMatcher.FuzzySearch(query.SecondSearch, plugin.Name).MatchData,
SubTitleHighlightData = StringMatcher.FuzzySearch(query.SecondSearch, plugin.Description).MatchData,
Action = e =>
{
UnInstallPlugin(plugin);