mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
Rename
This commit is contained in:
@@ -54,7 +54,7 @@ namespace Wox
|
||||
PluginManager.InitializePlugins(API);
|
||||
|
||||
Current.MainWindow = window;
|
||||
Current.MainWindow.Title = Infrastructure.Wox.Name;
|
||||
Current.MainWindow.Title = Infrastructure.Constant.Wox;
|
||||
|
||||
RegisterExitEvents();
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace Wox
|
||||
|
||||
private void InitializeNotifyIcon()
|
||||
{
|
||||
_notifyIcon = new NotifyIcon { Text = Infrastructure.Wox.Name, Icon = Properties.Resources.app, Visible = true };
|
||||
_notifyIcon = new NotifyIcon { Text = Infrastructure.Constant.Wox, Icon = Properties.Resources.app, Visible = true };
|
||||
_notifyIcon.Click += (o, e) => App.API.ShowApp();
|
||||
var open = new MenuItem(InternationalizationManager.Instance.GetTranslation("iconTrayOpen"));
|
||||
open.Click += (o, e) => App.API.ShowApp();
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Wox
|
||||
Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(TopProperty));
|
||||
fadeOutStoryboard.Children.Add(fadeOutAnimation);
|
||||
|
||||
imgClose.Source = ImageLoader.Load(Path.Combine(Infrastructure.Wox.ProgramPath, "Images\\close.png"));
|
||||
imgClose.Source = ImageLoader.Load(Path.Combine(Infrastructure.Constant.ProgramDirectory, "Images\\close.png"));
|
||||
imgClose.MouseUp += imgClose_MouseUp;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Wox
|
||||
}
|
||||
if (!File.Exists(iconPath))
|
||||
{
|
||||
imgIco.Source = ImageLoader.Load(Path.Combine(Infrastructure.Wox.ProgramPath, "Images\\app.png"));
|
||||
imgIco.Source = ImageLoader.Load(Path.Combine(Infrastructure.Constant.ProgramDirectory, "Images\\app.png"));
|
||||
}
|
||||
else {
|
||||
imgIco.Source = ImageLoader.Load(iconPath);
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace Wox
|
||||
string activateTimes = string.Format(
|
||||
InternationalizationManager.Instance.GetTranslation("about_activate_times"), _settings.ActivateTimes);
|
||||
ActivatedTimes.Text = activateTimes;
|
||||
tbVersion.Text = Infrastructure.Wox.Version;
|
||||
tbVersion.Text = Infrastructure.Constant.Version;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -242,8 +242,7 @@ namespace Wox
|
||||
{
|
||||
using (var key = Registry.CurrentUser.OpenSubKey(StartupPath, true))
|
||||
{
|
||||
var executable = Path.Combine(Infrastructure.Wox.ProgramPath, Infrastructure.Wox.Name + ".exe");
|
||||
key?.SetValue(Infrastructure.Wox.Name, executable);
|
||||
key?.SetValue(Infrastructure.Constant.Wox, Infrastructure.Constant.ExecutablePath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +250,7 @@ namespace Wox
|
||||
{
|
||||
using (var key = Registry.CurrentUser.OpenSubKey(StartupPath, true))
|
||||
{
|
||||
key?.DeleteValue(Infrastructure.Wox.Name, false);
|
||||
key?.DeleteValue(Infrastructure.Constant.Wox, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,8 +261,7 @@ namespace Wox
|
||||
var path = key?.GetValue("Wox") as string;
|
||||
if (path != null)
|
||||
{
|
||||
var executable = Path.Combine(Infrastructure.Wox.ProgramPath, Infrastructure.Wox.Name + ".exe");
|
||||
return path == executable;
|
||||
return path == Infrastructure.Constant.ExecutablePath;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -454,48 +452,48 @@ namespace Wox
|
||||
Title = "Wox is an effective launcher for windows",
|
||||
SubTitle = "Wox provide bundles of features let you access infomations quickly.",
|
||||
IcoPath = "Images/app.png",
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Wox.ProgramPath)
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Constant.ProgramDirectory)
|
||||
},
|
||||
new Result
|
||||
{
|
||||
Title = "Search applications",
|
||||
SubTitle = "Search applications, files (via everything plugin) and browser bookmarks",
|
||||
IcoPath = "Images/app.png",
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Wox.ProgramPath)
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Constant.ProgramDirectory)
|
||||
},
|
||||
new Result
|
||||
{
|
||||
Title = "Search web contents with shortcuts",
|
||||
SubTitle = "e.g. search google with g keyword or youtube keyword)",
|
||||
IcoPath = "Images/app.png",
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Wox.ProgramPath)
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Constant.ProgramDirectory)
|
||||
},
|
||||
new Result
|
||||
{
|
||||
Title = "clipboard history ",
|
||||
IcoPath = "Images/app.png",
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Wox.ProgramPath)
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Constant.ProgramDirectory)
|
||||
},
|
||||
new Result
|
||||
{
|
||||
Title = "Themes support",
|
||||
SubTitle = "get more themes from http://www.getwox.com/theme",
|
||||
IcoPath = "Images/app.png",
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Wox.ProgramPath)
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Constant.ProgramDirectory)
|
||||
},
|
||||
new Result
|
||||
{
|
||||
Title = "Plugins support",
|
||||
SubTitle = "get more plugins from http://www.getwox.com/plugin",
|
||||
IcoPath = "Images/app.png",
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Wox.ProgramPath)
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Constant.ProgramDirectory)
|
||||
},
|
||||
new Result
|
||||
{
|
||||
Title = "Wox is an open-source software",
|
||||
SubTitle = "Wox benefits from the open-source community a lot",
|
||||
IcoPath = "Images/app.png",
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Wox.ProgramPath)
|
||||
PluginDirectory = Path.GetDirectoryName(Infrastructure.Constant.ProgramDirectory)
|
||||
}
|
||||
});
|
||||
|
||||
@@ -859,7 +857,7 @@ namespace Wox
|
||||
if (!string.IsNullOrEmpty(version))
|
||||
{
|
||||
var newVersion = Updater.NumericVersion(version);
|
||||
var oldVersion = Updater.NumericVersion(Infrastructure.Wox.Version);
|
||||
var oldVersion = Updater.NumericVersion(Infrastructure.Constant.Version);
|
||||
if (newVersion > oldVersion)
|
||||
{
|
||||
NewVersionTips.Text = string.Format(NewVersionTips.Text, version);
|
||||
|
||||
@@ -495,7 +495,7 @@ namespace Wox.ViewModel
|
||||
Title = string.Format(executeQueryHistoryTitle, history.Query),
|
||||
SubTitle = string.Format(lastExecuteTime, history.ExecutedDateTime),
|
||||
IcoPath = "Images\\history.png",
|
||||
PluginDirectory = Infrastructure.Wox.ProgramPath,
|
||||
PluginDirectory = Infrastructure.Constant.ProgramDirectory,
|
||||
Action = _ =>
|
||||
{
|
||||
QueryText = history.Query;
|
||||
@@ -519,7 +519,7 @@ namespace Wox.ViewModel
|
||||
{
|
||||
Title = InternationalizationManager.Instance.GetTranslation("cancelTopMostInThisQuery"),
|
||||
IcoPath = "Images\\down.png",
|
||||
PluginDirectory = Infrastructure.Wox.ProgramPath,
|
||||
PluginDirectory = Infrastructure.Constant.ProgramDirectory,
|
||||
Action = _ =>
|
||||
{
|
||||
_topMostRecord.Remove(result);
|
||||
@@ -534,7 +534,7 @@ namespace Wox.ViewModel
|
||||
{
|
||||
Title = InternationalizationManager.Instance.GetTranslation("setAsTopMostInThisQuery"),
|
||||
IcoPath = "Images\\up.png",
|
||||
PluginDirectory = Infrastructure.Wox.ProgramPath,
|
||||
PluginDirectory = Infrastructure.Constant.ProgramDirectory,
|
||||
Action = _ =>
|
||||
{
|
||||
_topMostRecord.AddOrUpdate(result);
|
||||
|
||||
Reference in New Issue
Block a user