Remove useless codes.

This commit is contained in:
qianlifeng 2014-03-18 23:41:34 +08:00
parent 4f7c96326d
commit b402bd6c0e
4 changed files with 8 additions and 8 deletions

View file

@ -8,7 +8,7 @@ namespace Wox.Commands
{ {
public abstract class BaseCommand public abstract class BaseCommand
{ {
public abstract void Dispatch(Query query, bool updateView = true); public abstract void Dispatch(Query query);
protected void UpdateResultView(List<Result> results) protected void UpdateResultView(List<Result> results)
{ {

View file

@ -12,7 +12,7 @@ namespace Wox.Commands
private static PluginCommand pluginCmd; private static PluginCommand pluginCmd;
private static SystemCommand systemCmd; private static SystemCommand systemCmd;
public static void DispatchCommand(Query query, bool updateView = true) public static void DispatchCommand(Query query)
{ {
//lazy init command instance. //lazy init command instance.
if (pluginCmd == null) if (pluginCmd == null)
@ -24,8 +24,8 @@ namespace Wox.Commands
systemCmd = new SystemCommand(); systemCmd = new SystemCommand();
} }
systemCmd.Dispatch(query,updateView); systemCmd.Dispatch(query);
pluginCmd.Dispatch(query,updateView); pluginCmd.Dispatch(query);
} }
} }
} }

View file

@ -14,7 +14,7 @@ namespace Wox.Commands
private string currentPythonModulePath = string.Empty; private string currentPythonModulePath = string.Empty;
private IntPtr GIL; private IntPtr GIL;
public override void Dispatch(Query q,bool updateView = true) public override void Dispatch(Query q)
{ {
PluginPair thirdPlugin = Plugins.AllPlugins.FirstOrDefault(o => o.Metadata.ActionKeyword == q.ActionName); PluginPair thirdPlugin = Plugins.AllPlugins.FirstOrDefault(o => o.Metadata.ActionKeyword == q.ActionName);
if (thirdPlugin != null && !string.IsNullOrEmpty(thirdPlugin.Metadata.ActionKeyword)) if (thirdPlugin != null && !string.IsNullOrEmpty(thirdPlugin.Metadata.ActionKeyword))
@ -33,7 +33,7 @@ namespace Wox.Commands
o.PluginDirectory = thirdPlugin.Metadata.PluginDirecotry; o.PluginDirectory = thirdPlugin.Metadata.PluginDirecotry;
o.OriginQuery = q; o.OriginQuery = q;
}); });
if(updateView) UpdateResultView(r); UpdateResultView(r);
} }
catch (Exception queryException) catch (Exception queryException)
{ {

View file

@ -17,7 +17,7 @@ namespace Wox.Commands
systemPlugins = Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System).ToList(); systemPlugins = Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System).ToList();
} }
public override void Dispatch(Query query,bool updateView = true) public override void Dispatch(Query query)
{ {
foreach (PluginPair pair in systemPlugins) foreach (PluginPair pair in systemPlugins)
{ {
@ -31,7 +31,7 @@ namespace Wox.Commands
result.OriginQuery = query; result.OriginQuery = query;
result.AutoAjustScore = true; result.AutoAjustScore = true;
} }
if(results.Count > 0 && updateView) UpdateResultView(results); if(results.Count > 0) UpdateResultView(results);
}); });
} }
} }