2014-01-03 15:52:36 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
2014-01-29 10:33:24 +00:00
|
|
|
|
namespace Wox.Plugin
|
2014-01-03 15:52:36 +00:00
|
|
|
|
{
|
|
|
|
|
|
public class PluginInitContext
|
|
|
|
|
|
{
|
2014-03-01 07:42:33 +00:00
|
|
|
|
public PluginMetadata CurrentPluginMetadata { get; set; }
|
|
|
|
|
|
|
2014-07-05 15:10:34 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Public APIs for plugin invocation
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public IPublicAPI API { get; set; }
|
2014-01-05 09:56:02 +00:00
|
|
|
|
|
2014-07-18 12:00:55 +00:00
|
|
|
|
public IHttpProxy Proxy { get; set; }
|
2014-07-10 10:39:04 +00:00
|
|
|
|
|
2014-07-05 15:10:34 +00:00
|
|
|
|
#region Legacy APIs
|
2014-02-28 15:21:01 +00:00
|
|
|
|
|
2014-07-05 15:10:34 +00:00
|
|
|
|
[Obsolete("This method has been obsoleted, use API.ShellRun instead")]
|
|
|
|
|
|
public bool ShellRun(string cmd)
|
|
|
|
|
|
{
|
|
|
|
|
|
return API.ShellRun(cmd);
|
|
|
|
|
|
}
|
2014-03-11 15:54:37 +00:00
|
|
|
|
|
2014-07-05 15:10:34 +00:00
|
|
|
|
[Obsolete("This method has been obsoleted, use API.OpenSettingDialog instead")]
|
|
|
|
|
|
public void ChangeQuery(string query, bool requery = false)
|
|
|
|
|
|
{
|
|
|
|
|
|
API.ChangeQuery(query, requery);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Obsolete("This method has been obsoleted, use API.CloseApp instead")]
|
|
|
|
|
|
public void CloseApp()
|
|
|
|
|
|
{
|
|
|
|
|
|
API.CloseApp();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Obsolete("This method has been obsoleted, use API.HideApp instead")]
|
|
|
|
|
|
public void HideApp()
|
|
|
|
|
|
{
|
|
|
|
|
|
API.HideApp();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Obsolete("This method has been obsoleted, use API.ShowApp instead")]
|
|
|
|
|
|
public void ShowApp()
|
|
|
|
|
|
{
|
|
|
|
|
|
API.ShowApp();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Obsolete("This method has been obsoleted, use API.OpenSettingDialog instead")]
|
|
|
|
|
|
public void ShowMsg(string title, string subTitle, string iconPath)
|
|
|
|
|
|
{
|
|
|
|
|
|
API.ShowMsg(title, subTitle, iconPath);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Obsolete("This method has been obsoleted, use API.OpenSettingDialog instead")]
|
|
|
|
|
|
public void OpenSettingDialog()
|
|
|
|
|
|
{
|
|
|
|
|
|
API.OpenSettingDialog();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Obsolete("This method has been obsoleted, use API.StartLoadingBar instead")]
|
|
|
|
|
|
public void StartLoadingBar()
|
|
|
|
|
|
{
|
|
|
|
|
|
API.StartLoadingBar();
|
|
|
|
|
|
}
|
2014-03-11 15:54:37 +00:00
|
|
|
|
|
2014-07-05 15:10:34 +00:00
|
|
|
|
[Obsolete("This method has been obsoleted, use API.StopLoadingBar instead")]
|
|
|
|
|
|
public void StopLoadingBar()
|
|
|
|
|
|
{
|
|
|
|
|
|
API.StopLoadingBar();
|
|
|
|
|
|
}
|
2014-03-13 14:31:44 +00:00
|
|
|
|
|
2014-07-05 15:10:34 +00:00
|
|
|
|
[Obsolete("This method has been obsoleted, use API.InstallPlugin instead")]
|
|
|
|
|
|
public void InstallPlugin(string path)
|
|
|
|
|
|
{
|
|
|
|
|
|
API.InstallPlugin(path);
|
|
|
|
|
|
}
|
2014-03-20 19:53:18 +00:00
|
|
|
|
|
2014-07-05 15:10:34 +00:00
|
|
|
|
[Obsolete("This method has been obsoleted, use API.ReloadPlugins instead")]
|
|
|
|
|
|
public void ReloadPlugins()
|
|
|
|
|
|
{
|
|
|
|
|
|
API.ReloadPlugins();
|
|
|
|
|
|
}
|
2014-03-27 06:50:42 +00:00
|
|
|
|
|
2014-07-05 15:10:34 +00:00
|
|
|
|
#endregion
|
2014-01-03 15:52:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|