From 9e033d1673086d91416d9e73e55c8df0ec76631a Mon Sep 17 00:00:00 2001 From: bao-qian Date: Fri, 19 Aug 2016 23:24:21 +0100 Subject: [PATCH] rename --- .../AddProgramSource.xaml.cs | 11 ++- .../Wox.Plugin.Program/FileChangeWatcher.cs | 2 +- Plugins/Wox.Plugin.Program/Main.cs | 3 +- Plugins/Wox.Plugin.Program/Program.cs | 4 - .../Wox.Plugin.Program/ProgramIndexCache.cs | 1 - .../Wox.Plugin.Program/ProgramSetting.xaml | 75 +++++++++++++++++-- .../Wox.Plugin.Program/ProgramSetting.xaml.cs | 8 +- .../ProgramSources/AppPathsProgramSource.cs | 2 +- .../ProgramSources/FileSystemProgramSource.cs | 5 +- .../ProgramSources/ProgramSource.cs | 2 - .../ProgramSources/StartMenu.cs | 4 - .../Wox.Plugin.Program/ProgramSources/UWP.cs | 13 ++-- .../ProgramSources/Win32.cs | 2 - .../Wox.Plugin.Program/ProgramSuffixes.xaml | 13 +++- .../ProgramSuffixes.xaml.cs | 2 - Plugins/Wox.Plugin.Program/Settings.cs | 5 +- 16 files changed, 99 insertions(+), 53 deletions(-) diff --git a/Plugins/Wox.Plugin.Program/AddProgramSource.xaml.cs b/Plugins/Wox.Plugin.Program/AddProgramSource.xaml.cs index 91bbcbc6d4..3e09d62b84 100644 --- a/Plugins/Wox.Plugin.Program/AddProgramSource.xaml.cs +++ b/Plugins/Wox.Plugin.Program/AddProgramSource.xaml.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using System.Windows; +using System.Windows; using System.Windows.Forms; using Wox.Plugin.Program.ProgramSources; @@ -10,7 +9,7 @@ namespace Wox.Plugin.Program /// public partial class AddProgramSource { - private FileSystemProgramSource _editing; + private UnregisteredPrograms _editing; private Settings _settings; public AddProgramSource(Settings settings) @@ -20,7 +19,7 @@ namespace Wox.Plugin.Program Directory.Focus(); } - public AddProgramSource(FileSystemProgramSource edit, Settings settings) + public AddProgramSource(UnregisteredPrograms edit, Settings settings) { _editing = edit; _settings = settings; @@ -50,10 +49,10 @@ namespace Wox.Plugin.Program if(_editing == null) { - var source = new FileSystemProgramSource + var source = new UnregisteredPrograms { Location = Directory.Text, - MaxDepth = max, + MaxDepth = max }; _settings.ProgramSources.Add(source); } diff --git a/Plugins/Wox.Plugin.Program/FileChangeWatcher.cs b/Plugins/Wox.Plugin.Program/FileChangeWatcher.cs index b8aab05b25..025ed47c97 100644 --- a/Plugins/Wox.Plugin.Program/FileChangeWatcher.cs +++ b/Plugins/Wox.Plugin.Program/FileChangeWatcher.cs @@ -10,7 +10,7 @@ namespace Wox.Plugin.Program { private static readonly List WatchedPath = new List(); // todo remove previous watcher events - public static void AddAll(List sources, string[] suffixes) + public static void AddAll(List sources, string[] suffixes) { foreach (var s in sources) { diff --git a/Plugins/Wox.Plugin.Program/Main.cs b/Plugins/Wox.Plugin.Program/Main.cs index 3807ee4130..d5d249e1cf 100644 --- a/Plugins/Wox.Plugin.Program/Main.cs +++ b/Plugins/Wox.Plugin.Program/Main.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; -using System.IO; using System.Linq; using System.Windows.Controls; using Wox.Infrastructure; @@ -162,7 +161,7 @@ namespace Wox.Plugin.Program } if (_settings.EnableRegistrySource) { - var source3 = new AppPathsProgramSource(); + var source3 = new AppPathsPrograms(); sources.Add(source3); } diff --git a/Plugins/Wox.Plugin.Program/Program.cs b/Plugins/Wox.Plugin.Program/Program.cs index eea6c55f17..721e2ec717 100644 --- a/Plugins/Wox.Plugin.Program/Program.cs +++ b/Plugins/Wox.Plugin.Program/Program.cs @@ -1,8 +1,4 @@ using System; -using System.Text.RegularExpressions; -using System.Threading; -using Wox.Infrastructure; -using Wox.Plugin.Program.ProgramSources; namespace Wox.Plugin.Program { diff --git a/Plugins/Wox.Plugin.Program/ProgramIndexCache.cs b/Plugins/Wox.Plugin.Program/ProgramIndexCache.cs index d3b075a783..11c0c41163 100644 --- a/Plugins/Wox.Plugin.Program/ProgramIndexCache.cs +++ b/Plugins/Wox.Plugin.Program/ProgramIndexCache.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using Wox.Infrastructure.Storage; namespace Wox.Plugin.Program { diff --git a/Plugins/Wox.Plugin.Program/ProgramSetting.xaml b/Plugins/Wox.Plugin.Program/ProgramSetting.xaml index 760bd0779f..a1d1405939 100644 --- a/Plugins/Wox.Plugin.Program/ProgramSetting.xaml +++ b/Plugins/Wox.Plugin.Program/ProgramSetting.xaml @@ -14,11 +14,11 @@ - - + + - - + +