Refactoring directory path for plugins

This commit is contained in:
bao-qian
2016-01-08 02:18:19 +00:00
parent 6071319acd
commit a0f556b2a9
23 changed files with 41 additions and 38 deletions

View File

@@ -1,10 +1,10 @@
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows;
using System.Windows.Media.Imaging;
using Microsoft.Win32;
using Wox.Infrastructure;
using Wox.Infrastructure.Exception;
namespace Wox.Plugin.WebSearch
@@ -12,7 +12,7 @@ namespace Wox.Plugin.WebSearch
public partial class WebSearchSetting : Window
{
private const string _imageDirectoryName = "Images";
private string _pluginDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
private string _pluginDirectory = WoxDirectroy.Executable;
private readonly WebSearchesSetting _settingWindow;
private bool _isUpdate;
private WebSearch _updateWebSearch;
@@ -130,7 +130,7 @@ namespace Wox.Plugin.WebSearch
if (!Directory.Exists(_pluginDirectory))
{
_pluginDirectory =
Path.GetDirectoryName(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
Path.GetDirectoryName(WoxDirectroy.Executable);
}
var dlg = new OpenFileDialog