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

@@ -3,8 +3,8 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows.Controls;
using Wox.Infrastructure;
using Wox.Plugin.WebSearch.Annotations;
using Wox.Plugin.WebSearch.SuggestionSources;
@@ -92,7 +92,7 @@ namespace Wox.Plugin.WebSearch
public string GetLanguagesFolder()
{
return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Languages");
return Path.Combine(WoxDirectroy.Executable, "Languages");
}
public string GetTranslatedPluginTitle()

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

View File

@@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using Newtonsoft.Json;
using Wox.Infrastructure.Storage;