update to v1.4.0
This commit is contained in:
1 parent
ca0c8ce7a0
commit
9bc1208484
125 files changed
+891
-483
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using HandyControl.Data.Enum;
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
@@ -7,5 +8,7 @@ namespace HandyControlDemo.Data
|
||||
public static string SavePath = $"{AppDomain.CurrentDomain.BaseDirectory}AppConfig.json";
|
||||
|
||||
public string Lang { get; set; } = "cn";
|
||||
|
||||
public SkinType Skin { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
@@ -9,8 +10,15 @@ namespace HandyControlDemo.Data
|
||||
{
|
||||
if (File.Exists(AppConfig.SavePath))
|
||||
{
|
||||
var json = File.ReadAllText(AppConfig.SavePath);
|
||||
Config = JsonConvert.DeserializeObject<AppConfig>(json);
|
||||
try
|
||||
{
|
||||
var json = File.ReadAllText(AppConfig.SavePath);
|
||||
Config = JsonConvert.DeserializeObject<AppConfig>(json);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Config = new AppConfig();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace HandyControlDemo.Data
|
||||
|
||||
public DemoType Type { get; set; }
|
||||
|
||||
public string ImgPath { get; set; }
|
||||
|
||||
public List<DemoDataModel> DataList { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user