Adjust project structure

This commit is contained in:
NaBian committed 2019-04-05 22:23:19 +08:00
1 parent d38912f5da
commit e3c436f939
2111 files changed
+14028 -47199

No files matched your search

@@ -0,0 +1,38 @@
using System.IO;
using Newtonsoft.Json;
namespace HandyControlDemo.Data
{
internal class GlobalData
{
public static void Init()
{
if (File.Exists(AppConfig.SavePath))
{
try
{
var json = File.ReadAllText(AppConfig.SavePath);
Config = JsonConvert.DeserializeObject<AppConfig>(json);
}
catch
{
Config = new AppConfig();
}
}
else
{
Config = new AppConfig();
}
}
public static void Save()
{
var json = JsonConvert.SerializeObject(Config);
File.WriteAllText(AppConfig.SavePath, json);
}
public static AppConfig Config { get; set; }
public static bool NotifyIconIsShow { get; set; }
}
}