From a3b62bc4d89080de990f22857b91dbd564976bf1 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Sat, 6 Nov 2021 13:58:28 -0500 Subject: [PATCH] Fix rename issue --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 22 +++++++++---------- .../Views/ProgramSetting.xaml.cs | 10 --------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 32c345e95..9c9b9b912 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -63,7 +63,7 @@ namespace Flow.Launcher.Plugin.Program .AsParallel() .WithCancellation(token) .Where(p => p.Enabled) - .Select(p => p.Result(query.Search, _context.API)) + .Select(p => p.Result(query.Search, Context.API)) .Where(r => r?.Score > 0) .ToList()); @@ -80,7 +80,7 @@ namespace Flow.Launcher.Plugin.Program public async Task InitAsync(PluginInitContext context) { - _context = context; + Context = context; _settings = context.API.LoadSettingJsonStorage(); @@ -155,17 +155,17 @@ namespace Flow.Launcher.Plugin.Program public Control CreateSettingPanel() { - return new ProgramSetting(_context, _settings, _win32s, _uwps); + return new ProgramSetting(Context, _settings, _win32s, _uwps); } public string GetTranslatedPluginTitle() { - return _context.API.GetTranslation("flowlauncher_plugin_program_plugin_name"); + return Context.API.GetTranslation("flowlauncher_plugin_program_plugin_name"); } public string GetTranslatedPluginDescription() { - return _context.API.GetTranslation("flowlauncher_plugin_program_plugin_description"); + return Context.API.GetTranslation("flowlauncher_plugin_program_plugin_description"); } public List LoadContextMenus(Result selectedResult) @@ -174,19 +174,19 @@ namespace Flow.Launcher.Plugin.Program var program = selectedResult.ContextData as IProgram; if (program != null) { - menuOptions = program.ContextMenus(_context.API); + menuOptions = program.ContextMenus(Context.API); } menuOptions.Add( new Result { - Title = _context.API.GetTranslation("flowlauncher_plugin_program_disable_program"), + Title = Context.API.GetTranslation("flowlauncher_plugin_program_disable_program"), Action = c => { DisableProgram(program); - _context.API.ShowMsg( - _context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"), - _context.API.GetTranslation( + Context.API.ShowMsg( + Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"), + Context.API.GetTranslation( "flowlauncher_plugin_program_disable_dlgtitle_success_message")); return false; }, @@ -235,7 +235,7 @@ namespace Flow.Launcher.Plugin.Program { var name = "Plugin: Program"; var message = $"Unable to start: {info.FileName}"; - _context.API.ShowMsg(name, message, string.Empty); + Context.API.ShowMsg(name, message, string.Empty); } } diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs index 4c1934e2c..02cf6492c 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs @@ -347,15 +347,5 @@ namespace Flow.Launcher.Plugin.Program.Views btnProgramSourceStatus.Content = "Enable"; } } - - private void CustomizeExplorer(object sender, TextChangedEventArgs e) - { - _settings.CustomizedExplorer = CustomizeExplorerBox.Text; - } - - private void CustomizeExplorerArgs(object sender, TextChangedEventArgs e) - { - _settings.CustomizedArgs = CustomizeArgsBox.Text; - } } } \ No newline at end of file