Demo adds language switching
This commit is contained in:
1 parent
8477771161
commit
ca0c8ce7a0
55 files changed
+313
-123
No files matched your search
@@ -0,0 +1,29 @@
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
internal class GlobalData
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
if (File.Exists(AppConfig.SavePath))
|
||||
{
|
||||
var json = File.ReadAllText(AppConfig.SavePath);
|
||||
Config = JsonConvert.DeserializeObject<AppConfig>(json);
|
||||
}
|
||||
else
|
||||
{
|
||||
Config = new AppConfig();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Save()
|
||||
{
|
||||
var json = JsonConvert.SerializeObject(Config);
|
||||
File.WriteAllText(AppConfig.SavePath, json);
|
||||
}
|
||||
|
||||
public static AppConfig Config { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user