From c9790d7bb8888c35ff0ff46975aef91a82e14a8b Mon Sep 17 00:00:00 2001 From: Yeechan Lu Date: Sat, 29 Mar 2014 16:13:36 +0800 Subject: [PATCH] Move WebSearch into featureBox --- Wox.Plugin.SystemPlugins/WebSearchPlugin.cs | 11 ++- .../WebSearchSetting.xaml | 3 +- .../WebSearchSetting.xaml.cs | 7 +- .../WebSearchesSetting.xaml | 39 +++++++++ .../WebSearchesSetting.xaml.cs | 79 +++++++++++++++++++ .../Wox.Plugin.SystemPlugins.csproj | 14 ++++ Wox/SettingWindow.xaml | 34 -------- Wox/SettingWindow.xaml.cs | 46 ----------- Wox/Wox.csproj | 7 -- 9 files changed, 146 insertions(+), 94 deletions(-) rename {Wox => Wox.Plugin.SystemPlugins}/WebSearchSetting.xaml (97%) rename {Wox => Wox.Plugin.SystemPlugins}/WebSearchSetting.xaml.cs (96%) create mode 100644 Wox.Plugin.SystemPlugins/WebSearchesSetting.xaml create mode 100644 Wox.Plugin.SystemPlugins/WebSearchesSetting.xaml.cs diff --git a/Wox.Plugin.SystemPlugins/WebSearchPlugin.cs b/Wox.Plugin.SystemPlugins/WebSearchPlugin.cs index 926ac2eca6..b4c7830ef7 100644 --- a/Wox.Plugin.SystemPlugins/WebSearchPlugin.cs +++ b/Wox.Plugin.SystemPlugins/WebSearchPlugin.cs @@ -11,7 +11,7 @@ using Wox.Plugin.SystemPlugins.SuggestionSources; namespace Wox.Plugin.SystemPlugins { - public class WebSearchPlugin : BaseSystemPlugin + public class WebSearchPlugin : BaseSystemPlugin, ISettingProvider { private PluginInitContext context; @@ -96,5 +96,14 @@ namespace Wox.Plugin.SystemPlugins { get { return base.Description; } } + + #region ISettingProvider Members + + public System.Windows.Controls.Control CreateSettingPanel() + { + return new WebSearchesSetting(); + } + + #endregion } } diff --git a/Wox/WebSearchSetting.xaml b/Wox.Plugin.SystemPlugins/WebSearchSetting.xaml similarity index 97% rename from Wox/WebSearchSetting.xaml rename to Wox.Plugin.SystemPlugins/WebSearchSetting.xaml index be0eccb6b8..31635038a0 100644 --- a/Wox/WebSearchSetting.xaml +++ b/Wox.Plugin.SystemPlugins/WebSearchSetting.xaml @@ -1,7 +1,6 @@ - diff --git a/Wox/WebSearchSetting.xaml.cs b/Wox.Plugin.SystemPlugins/WebSearchSetting.xaml.cs similarity index 96% rename from Wox/WebSearchSetting.xaml.cs rename to Wox.Plugin.SystemPlugins/WebSearchSetting.xaml.cs index fd5bf997db..ddf73bffb2 100644 --- a/Wox/WebSearchSetting.xaml.cs +++ b/Wox.Plugin.SystemPlugins/WebSearchSetting.xaml.cs @@ -11,21 +11,20 @@ using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; -using Wox.Helper; using Wox.Infrastructure; using Wox.Infrastructure.Storage; using Wox.Infrastructure.Storage.UserSettings; using MessageBox = System.Windows.MessageBox; -namespace Wox +namespace Wox.Plugin.SystemPlugins { public partial class WebSearchSetting : Window { - private SettingWindow settingWindow; + private WebSearchesSetting settingWindow; private bool update; private WebSearch updateWebSearch; - public WebSearchSetting(SettingWindow settingWidow) + public WebSearchSetting(WebSearchesSetting settingWidow) { this.settingWindow = settingWidow; InitializeComponent(); diff --git a/Wox.Plugin.SystemPlugins/WebSearchesSetting.xaml b/Wox.Plugin.SystemPlugins/WebSearchesSetting.xaml new file mode 100644 index 0000000000..419d350076 --- /dev/null +++ b/Wox.Plugin.SystemPlugins/WebSearchesSetting.xaml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +