Save when exit

1. fix image cache
2. fix save when exit since destructor won't be called
3. fix #583 #582 (partially)  #581 (partially)  #580
This commit is contained in:
bao-qian
2016-05-02 22:37:01 +01:00
parent a7a34ac6b2
commit c6aff8424c
12 changed files with 65 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ using Stopwatch = Wox.Infrastructure.Stopwatch;
namespace Wox.Plugin.Program
{
public class Programs : ISettingProvider, IPlugin, IPluginI18n, IContextMenu
public class Programs : ISettingProvider, IPlugin, IPluginI18n, IContextMenu, ISavable
{
private static object lockObject = new object();
private static List<Program> _programs = new List<Program>();
@@ -42,7 +42,7 @@ namespace Wox.Plugin.Program
_cache = _cacheStorage.Load();
}
~Programs()
public void Save()
{
_settingsStorage.Save();
_cacheStorage.Save();