mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 13:35:31 +02:00
Update WPM.
This commit is contained in:
@@ -18,16 +18,17 @@ namespace Wox.Plugin.PluginManagement
|
|||||||
|
|
||||||
public class WoxPluginResult
|
public class WoxPluginResult
|
||||||
{
|
{
|
||||||
public string downloadUrl;
|
public string actionkeyword;
|
||||||
|
public string download;
|
||||||
public string author;
|
public string author;
|
||||||
public string description;
|
public string description;
|
||||||
public string id;
|
public string id;
|
||||||
public string language;
|
public int star;
|
||||||
public int like;
|
|
||||||
public string name;
|
public string name;
|
||||||
|
public string version;
|
||||||
|
public string website;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class Main : IPlugin
|
public class Main : IPlugin
|
||||||
{
|
{
|
||||||
private static string PluginPath = AppDomain.CurrentDomain.BaseDirectory + "Plugins";
|
private static string PluginPath = AppDomain.CurrentDomain.BaseDirectory + "Plugins";
|
||||||
@@ -169,6 +170,11 @@ namespace Wox.Plugin.PluginManagement
|
|||||||
SubTitle = r.description,
|
SubTitle = r.description,
|
||||||
IcoPath = "Images\\plugin.png",
|
IcoPath = "Images\\plugin.png",
|
||||||
Action = e =>
|
Action = e =>
|
||||||
|
{
|
||||||
|
DialogResult result = MessageBox.Show("Are your sure to install " + r.name + " plugin",
|
||||||
|
"Install plugin", MessageBoxButtons.YesNo);
|
||||||
|
|
||||||
|
if (result == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
string folder = Path.Combine(Path.GetTempPath(), "WoxPluginDownload");
|
string folder = Path.Combine(Path.GetTempPath(), "WoxPluginDownload");
|
||||||
if (!Directory.Exists(folder)) Directory.CreateDirectory(folder);
|
if (!Directory.Exists(folder)) Directory.CreateDirectory(folder);
|
||||||
@@ -181,7 +187,7 @@ namespace Wox.Plugin.PluginManagement
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Client.DownloadFile(r1.downloadUrl, filePath);
|
Client.DownloadFile(r1.download, filePath);
|
||||||
context.InstallPlugin(filePath);
|
context.InstallPlugin(filePath);
|
||||||
context.ReloadPlugins();
|
context.ReloadPlugins();
|
||||||
}
|
}
|
||||||
@@ -195,6 +201,7 @@ namespace Wox.Plugin.PluginManagement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user