mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-04 03:49:07 +08:00
Fix issues with AppDomain.CurrentDomain.BaseDirectory
This commit is contained in:
parent
3dbef1400c
commit
19ec14e4c2
@ -37,7 +37,7 @@ namespace Wox.Helper
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string pluginFolerPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Plugins");
|
string pluginFolerPath = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), "Plugins");
|
||||||
if (!Directory.Exists(pluginFolerPath))
|
if (!Directory.Exists(pluginFolerPath))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(pluginFolerPath);
|
Directory.CreateDirectory(pluginFolerPath);
|
||||||
@ -81,7 +81,7 @@ namespace Wox.Helper
|
|||||||
{
|
{
|
||||||
ProcessStartInfo Info = new ProcessStartInfo();
|
ProcessStartInfo Info = new ProcessStartInfo();
|
||||||
Info.Arguments = "/C ping 127.0.0.1 -n 1 && \"" +
|
Info.Arguments = "/C ping 127.0.0.1 -n 1 && \"" +
|
||||||
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wox.exe") + "\"";
|
System.Windows.Forms.Application.ExecutablePath + "\"";
|
||||||
Info.WindowStyle = ProcessWindowStyle.Hidden;
|
Info.WindowStyle = ProcessWindowStyle.Hidden;
|
||||||
Info.CreateNoWindow = true;
|
Info.CreateNoWindow = true;
|
||||||
Info.FileName = "cmd.exe";
|
Info.FileName = "cmd.exe";
|
||||||
|
@ -41,7 +41,7 @@ namespace Wox
|
|||||||
Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(TopProperty));
|
Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(TopProperty));
|
||||||
fadeOutStoryboard.Children.Add(fadeOutAnimation);
|
fadeOutStoryboard.Children.Add(fadeOutAnimation);
|
||||||
|
|
||||||
imgClose.Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "\\Images\\close.png"));
|
imgClose.Source = new BitmapImage(new Uri(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Images\\close.png"));
|
||||||
imgClose.MouseUp += imgClose_MouseUp;
|
imgClose.MouseUp += imgClose_MouseUp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ namespace Wox
|
|||||||
tbSubTitle.Text = subTitle;
|
tbSubTitle.Text = subTitle;
|
||||||
if (!File.Exists(icopath))
|
if (!File.Exists(icopath))
|
||||||
{
|
{
|
||||||
icopath = AppDomain.CurrentDomain.BaseDirectory + "Images\\app.png";
|
icopath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "Images\\app.png";
|
||||||
}
|
}
|
||||||
imgIco.Source = new BitmapImage(new Uri(icopath));
|
imgIco.Source = new BitmapImage(new Uri(icopath));
|
||||||
Show();
|
Show();
|
||||||
|
@ -42,7 +42,7 @@ namespace Wox.PluginLoader
|
|||||||
metadata.PluginType = PluginType.System;
|
metadata.PluginType = PluginType.System;
|
||||||
metadata.ActionKeyword = "*";
|
metadata.ActionKeyword = "*";
|
||||||
metadata.ExecuteFileName = "Wox.Plugin.System.dll";
|
metadata.ExecuteFileName = "Wox.Plugin.System.dll";
|
||||||
metadata.PluginDirecotry = AppDomain.CurrentDomain.BaseDirectory;
|
metadata.PluginDirecotry = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);
|
||||||
pluginMetadatas.Add(metadata);
|
pluginMetadatas.Add(metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,34 +80,34 @@ namespace Wox
|
|||||||
Title = "Wox is an effective launcher for windows",
|
Title = "Wox is an effective launcher for windows",
|
||||||
SubTitle = "Wox provide bundles of features let you access infomations quickly.",
|
SubTitle = "Wox provide bundles of features let you access infomations quickly.",
|
||||||
IcoPath = "Images/work.png",
|
IcoPath = "Images/work.png",
|
||||||
PluginDirectory = AppDomain.CurrentDomain.BaseDirectory
|
PluginDirectory = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath)
|
||||||
},
|
},
|
||||||
new Result()
|
new Result()
|
||||||
{
|
{
|
||||||
Title = "Search applications",
|
Title = "Search applications",
|
||||||
SubTitle = "Search applications, files (via everything plugin) and chrome bookmarks",
|
SubTitle = "Search applications, files (via everything plugin) and chrome bookmarks",
|
||||||
IcoPath = "Images/work.png",
|
IcoPath = "Images/work.png",
|
||||||
PluginDirectory = AppDomain.CurrentDomain.BaseDirectory
|
PluginDirectory = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath)
|
||||||
},
|
},
|
||||||
new Result()
|
new Result()
|
||||||
{
|
{
|
||||||
Title = "Search web contents with shortcuts",
|
Title = "Search web contents with shortcuts",
|
||||||
SubTitle = "e.g. search google with g keyword or youtube keyword)",
|
SubTitle = "e.g. search google with g keyword or youtube keyword)",
|
||||||
IcoPath = "Images/work.png",
|
IcoPath = "Images/work.png",
|
||||||
PluginDirectory = AppDomain.CurrentDomain.BaseDirectory
|
PluginDirectory = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath)
|
||||||
},
|
},
|
||||||
new Result()
|
new Result()
|
||||||
{
|
{
|
||||||
Title = "clipboard history ",
|
Title = "clipboard history ",
|
||||||
IcoPath = "Images/work.png",
|
IcoPath = "Images/work.png",
|
||||||
PluginDirectory = AppDomain.CurrentDomain.BaseDirectory
|
PluginDirectory = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath)
|
||||||
},
|
},
|
||||||
new Result()
|
new Result()
|
||||||
{
|
{
|
||||||
Title = "Themes support",
|
Title = "Themes support",
|
||||||
SubTitle = "get more themes from http://www.getwox.com/theme",
|
SubTitle = "get more themes from http://www.getwox.com/theme",
|
||||||
IcoPath = "Images/work.png",
|
IcoPath = "Images/work.png",
|
||||||
PluginDirectory = AppDomain.CurrentDomain.BaseDirectory
|
PluginDirectory = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user