Add web search feature & some UI changes.

This commit is contained in:
qianlifeng
2014-01-29 22:44:57 +08:00
parent 9f22a6d26d
commit fa3ae62254
31 changed files with 340 additions and 86 deletions

View File

@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using Wox.Plugin;
namespace Wox.Infrastructure.UserSettings
{
[Serializable]
public class UserSelectedRecords
{
private static int hasAddedCount = 0;
public Dictionary<string,int> Records = new Dictionary<string, int>();
public void Add(Result result)
{
if (Records.ContainsKey(result.ToString()))
{
Records[result.ToString()] += 1;
}
else
{
Records.Add(result.ToString(), 1);
}
//hasAddedCount++;
//if (hasAddedCount == 10)
//{
// hasAddedCount = 0;
//}
CommonStorage.Instance.Save();
}
public int GetSelectedCount(Result result)
{
if (Records.ContainsKey(result.ToString()))
{
return Records[result.ToString()];
}
return 0;
}
}
}