[PTRun]Add Pinyin Support (#21465)

* Add Pinyin Support for Powertoys Run

using hyjiacan.pinyin4net

Revert microsoft/PowerToys#7455

closed microsoft/PowerToys#3587
closed microsoft/PowerToys#20370

Signed-off-by: 舰队的偶像-岛风酱! <frg2089@outlook.com>

* Remove JetBrains annotations

Signed-off-by: 舰队的偶像-岛风酱! <frg2089@outlook.com>
This commit is contained in:
舰队的偶像-岛风酱!
2022-11-17 00:25:57 +08:00
committed by GitHub
parent 2f36366902
commit 28366fe5c4
8 changed files with 267 additions and 4 deletions

View File

@@ -6,12 +6,19 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using Common.UI;
using ManagedCommon;
using Microsoft.Toolkit.Uwp.Notifications;
using PowerLauncher.Plugin;
using PowerLauncher.ViewModel;
using Windows.UI.Notifications;
using Wox.Infrastructure;
using Wox.Infrastructure.Image;
using Wox.Plugin;
@@ -21,15 +28,17 @@ namespace Wox
{
private readonly SettingWindowViewModel _settingsVM;
private readonly MainViewModel _mainVM;
private readonly Alphabet _alphabet;
private readonly ThemeManager _themeManager;
private bool _disposed;
public event ThemeChangedHandler ThemeChanged;
public PublicAPIInstance(SettingWindowViewModel settingsVM, MainViewModel mainVM, ThemeManager themeManager)
public PublicAPIInstance(SettingWindowViewModel settingsVM, MainViewModel mainVM, Alphabet alphabet, ThemeManager themeManager)
{
_settingsVM = settingsVM ?? throw new ArgumentNullException(nameof(settingsVM));
_mainVM = mainVM ?? throw new ArgumentNullException(nameof(mainVM));
_alphabet = alphabet ?? throw new ArgumentNullException(nameof(alphabet));
_themeManager = themeManager ?? throw new ArgumentNullException(nameof(themeManager));
_themeManager.ThemeChanged += OnThemeChanged;
@@ -60,6 +69,7 @@ namespace Wox
_settingsVM.Save();
PluginManager.Save();
ImageLoader.Save();
_alphabet.Save();
}
public void ReloadAllPluginData()