From f589bdc78dd38e14c963290f4a12f6d9384ee3ce Mon Sep 17 00:00:00 2001 From: bao-qian Date: Wed, 6 Jan 2016 06:45:08 +0000 Subject: [PATCH] Optimize using --- Plugins/Wox.Plugin.Everything/ContextMenuStorage.cs | 2 +- Plugins/Wox.Plugin.PluginManagement/Main.cs | 1 - Plugins/Wox.Plugin.Program/FileChangeWatcher.cs | 2 +- Plugins/Wox.Plugin.Program/Programs.cs | 2 +- Plugins/Wox.Plugin.Sys/Sys.cs | 6 ++++-- Plugins/Wox.Plugin.WebSearch/WebSearchPlugin.cs | 1 - SolutionAssemblyInfo.cs | 1 - Wox.Core/Plugin/PluginInstaller.cs | 3 +-- Wox.Core/i18n/AvailableLanguages.cs | 2 +- Wox.Infrastructure/Exception/WoxPluginException.cs | 4 +--- Wox.Infrastructure/Logger/Log.cs | 4 +--- Wox.Infrastructure/Stopwatch.cs | 1 - Wox.Infrastructure/Storage/JsonStorage.cs | 3 +-- Wox.Plugin/Feature.cs | 4 ++-- Wox.Plugin/Features/IContextMenu.cs | 1 + Wox.Plugin/PluginMetadata.cs | 2 +- Wox/ActionKeywords.xaml.cs | 5 +---- Wox/ImageLoader/ImageLoader.cs | 2 -- Wox/Msg.xaml.cs | 1 - Wox/ResultPanel.xaml.cs | 7 ++----- 20 files changed, 19 insertions(+), 35 deletions(-) diff --git a/Plugins/Wox.Plugin.Everything/ContextMenuStorage.cs b/Plugins/Wox.Plugin.Everything/ContextMenuStorage.cs index 1971cf95ae..ac5c1bab1e 100644 --- a/Plugins/Wox.Plugin.Everything/ContextMenuStorage.cs +++ b/Plugins/Wox.Plugin.Everything/ContextMenuStorage.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.IO; using System.Reflection; -using JsonProperty = Newtonsoft.Json.JsonPropertyAttribute; using Wox.Infrastructure.Storage; +using JsonProperty = Newtonsoft.Json.JsonPropertyAttribute; namespace Wox.Plugin.Everything { diff --git a/Plugins/Wox.Plugin.PluginManagement/Main.cs b/Plugins/Wox.Plugin.PluginManagement/Main.cs index 785d280173..45585db05e 100644 --- a/Plugins/Wox.Plugin.PluginManagement/Main.cs +++ b/Plugins/Wox.Plugin.PluginManagement/Main.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; using System.Net; diff --git a/Plugins/Wox.Plugin.Program/FileChangeWatcher.cs b/Plugins/Wox.Plugin.Program/FileChangeWatcher.cs index cb3b315aa6..6119abdb15 100644 --- a/Plugins/Wox.Plugin.Program/FileChangeWatcher.cs +++ b/Plugins/Wox.Plugin.Program/FileChangeWatcher.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Threading; using Wox.Infrastructure.Logger; + namespace Wox.Plugin.Program { internal class FileChangeWatcher diff --git a/Plugins/Wox.Plugin.Program/Programs.cs b/Plugins/Wox.Plugin.Program/Programs.cs index b73173a226..80323029db 100644 --- a/Plugins/Wox.Plugin.Program/Programs.cs +++ b/Plugins/Wox.Plugin.Program/Programs.cs @@ -6,8 +6,8 @@ using System.Linq; using System.Reflection; using System.Windows; using Wox.Infrastructure; -using Wox.Plugin.Program.ProgramSources; using Wox.Infrastructure.Logger; +using Wox.Plugin.Program.ProgramSources; using Stopwatch = Wox.Infrastructure.Stopwatch; namespace Wox.Plugin.Program diff --git a/Plugins/Wox.Plugin.Sys/Sys.cs b/Plugins/Wox.Plugin.Sys/Sys.cs index 9b2f838e67..2f68e3c995 100644 --- a/Plugins/Wox.Plugin.Sys/Sys.cs +++ b/Plugins/Wox.Plugin.Sys/Sys.cs @@ -5,11 +5,13 @@ using System.IO; using System.Reflection; using System.Runtime.InteropServices; using System.Windows; +using System.Windows.Forms; using System.Windows.Interop; using Wox.Infrastructure; -using FormsApplication = System.Windows.Forms.Application; -using PowerState = System.Windows.Forms.PowerState; +using Application = System.Windows.Application; using Control = System.Windows.Controls.Control; +using FormsApplication = System.Windows.Forms.Application; +using MessageBox = System.Windows.MessageBox; namespace Wox.Plugin.Sys { diff --git a/Plugins/Wox.Plugin.WebSearch/WebSearchPlugin.cs b/Plugins/Wox.Plugin.WebSearch/WebSearchPlugin.cs index 73f3c4151a..0e225df03c 100644 --- a/Plugins/Wox.Plugin.WebSearch/WebSearchPlugin.cs +++ b/Plugins/Wox.Plugin.WebSearch/WebSearchPlugin.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; diff --git a/SolutionAssemblyInfo.cs b/SolutionAssemblyInfo.cs index 58182e660b..e900203594 100644 --- a/SolutionAssemblyInfo.cs +++ b/SolutionAssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; #if DEBUG diff --git a/Wox.Core/Plugin/PluginInstaller.cs b/Wox.Core/Plugin/PluginInstaller.cs index f20f2fd079..ec022a582a 100644 --- a/Wox.Core/Plugin/PluginInstaller.cs +++ b/Wox.Core/Plugin/PluginInstaller.cs @@ -1,10 +1,9 @@ using System; -using System.Diagnostics; using System.IO; +using System.Windows; using ICSharpCode.SharpZipLib.Zip; using Newtonsoft.Json; using Wox.Plugin; -using System.Windows; namespace Wox.Core.Plugin { diff --git a/Wox.Core/i18n/AvailableLanguages.cs b/Wox.Core/i18n/AvailableLanguages.cs index 6523829430..30a0dc69d1 100644 --- a/Wox.Core/i18n/AvailableLanguages.cs +++ b/Wox.Core/i18n/AvailableLanguages.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Wox.Core.i18n { diff --git a/Wox.Infrastructure/Exception/WoxPluginException.cs b/Wox.Infrastructure/Exception/WoxPluginException.cs index 0987ca69d5..b68af28ab0 100644 --- a/Wox.Infrastructure/Exception/WoxPluginException.cs +++ b/Wox.Infrastructure/Exception/WoxPluginException.cs @@ -1,6 +1,4 @@ -using Wox.Plugin; - -namespace Wox.Infrastructure.Exception +namespace Wox.Infrastructure.Exception { public class WoxPluginException : WoxException { diff --git a/Wox.Infrastructure/Logger/Log.cs b/Wox.Infrastructure/Logger/Log.cs index d911e5bcb2..77b99fa48b 100644 --- a/Wox.Infrastructure/Logger/Log.cs +++ b/Wox.Infrastructure/Logger/Log.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; -using NLog; -using Wox.Infrastructure.Exception; +using NLog; namespace Wox.Infrastructure.Logger { diff --git a/Wox.Infrastructure/Stopwatch.cs b/Wox.Infrastructure/Stopwatch.cs index 7387734d5b..c58d2088c6 100644 --- a/Wox.Infrastructure/Stopwatch.cs +++ b/Wox.Infrastructure/Stopwatch.cs @@ -1,5 +1,4 @@ using System; -using System.Diagnostics; using Wox.Infrastructure.Logger; namespace Wox.Infrastructure diff --git a/Wox.Infrastructure/Storage/JsonStorage.cs b/Wox.Infrastructure/Storage/JsonStorage.cs index ceace60009..07f6329ef4 100644 --- a/Wox.Infrastructure/Storage/JsonStorage.cs +++ b/Wox.Infrastructure/Storage/JsonStorage.cs @@ -1,5 +1,4 @@ -using System; -using System.IO; +using System.IO; using System.Threading; using Newtonsoft.Json; diff --git a/Wox.Plugin/Feature.cs b/Wox.Plugin/Feature.cs index 6df0da438e..c69e30c4e1 100644 --- a/Wox.Plugin/Feature.cs +++ b/Wox.Plugin/Feature.cs @@ -1,5 +1,5 @@ -using System.Collections.Generic; -using System; +using System; +using System.Collections.Generic; namespace Wox.Plugin { diff --git a/Wox.Plugin/Features/IContextMenu.cs b/Wox.Plugin/Features/IContextMenu.cs index e6bfc927d2..f30b66abf0 100644 --- a/Wox.Plugin/Features/IContextMenu.cs +++ b/Wox.Plugin/Features/IContextMenu.cs @@ -1,4 +1,5 @@ using System; + namespace Wox.Plugin.Features { [Obsolete("Delete Wox.Plugin.Features using directive, " + diff --git a/Wox.Plugin/PluginMetadata.cs b/Wox.Plugin/PluginMetadata.cs index 0aa27f6ea1..ded0941651 100644 --- a/Wox.Plugin/PluginMetadata.cs +++ b/Wox.Plugin/PluginMetadata.cs @@ -1,6 +1,6 @@ using System; -using System.IO; using System.Collections.Generic; +using System.IO; namespace Wox.Plugin { diff --git a/Wox/ActionKeywords.xaml.cs b/Wox/ActionKeywords.xaml.cs index 67d17aa7b0..3c2662e1fb 100644 --- a/Wox/ActionKeywords.xaml.cs +++ b/Wox/ActionKeywords.xaml.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows; +using System.Windows; using Wox.Core.i18n; using Wox.Core.Plugin; using Wox.Core.UserSettings; diff --git a/Wox/ImageLoader/ImageLoader.cs b/Wox/ImageLoader/ImageLoader.cs index 63b30514e2..9bf59006d5 100644 --- a/Wox/ImageLoader/ImageLoader.cs +++ b/Wox/ImageLoader/ImageLoader.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.Drawing; using System.IO; using System.Runtime.InteropServices; @@ -8,7 +7,6 @@ using System.Windows; using System.Windows.Media; using System.Windows.Media.Imaging; using Wox.Infrastructure; -using Stopwatch = Wox.Infrastructure.Stopwatch; namespace Wox.ImageLoader { diff --git a/Wox/Msg.xaml.cs b/Wox/Msg.xaml.cs index e687397036..734d8c098d 100644 --- a/Wox/Msg.xaml.cs +++ b/Wox/Msg.xaml.cs @@ -1,6 +1,5 @@ using System; using System.IO; -using System.Threading.Tasks; using System.Windows; using System.Windows.Forms; using System.Windows.Input; diff --git a/Wox/ResultPanel.xaml.cs b/Wox/ResultPanel.xaml.cs index 16b5286f16..4a622815de 100644 --- a/Wox/ResultPanel.xaml.cs +++ b/Wox/ResultPanel.xaml.cs @@ -1,14 +1,11 @@ using System; -using System.Collections; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; +using System.Linq; +using System.Runtime.Remoting.Contexts; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; -using System.Linq; -using System.Runtime.Remoting.Contexts; using Wox.Core.UserSettings; using Wox.Helper; using Wox.Plugin;