add AutoAjustScore option for results

This commit is contained in:
qianlifeng
2014-01-15 22:45:02 +08:00
parent 93d8f66afc
commit 56118a7142
15 changed files with 106 additions and 147 deletions

View File

@@ -31,7 +31,7 @@ namespace WinAlfred.Plugin.Fanyi
private string translateURL = "http://openapi.baidu.com/public/2.0/bmt/translate";
private string baiduKey = "SnPcDY3iH5jDbklRewkG2D2v";
static public string AssemblyDirectory
private static string AssemblyDirectory
{
get
{
@@ -89,23 +89,6 @@ namespace WinAlfred.Plugin.Fanyi
return results;
}
public static string GetHtmlStr(string url)
{
try
{
WebRequest rGet = WebRequest.Create(url);
WebResponse rSet = rGet.GetResponse();
Stream s = rSet.GetResponseStream();
StreamReader reader = new StreamReader(s, Encoding.UTF8);
return reader.ReadToEnd();
}
catch (WebException)
{
//连接失败
return null;
}
}
public void Init(PluginInitContext context)
{
this.context = context;