public static void SaveData() { var _D = new RegistryData(); _D.SetData(); var _S = JsonConvert.SerializeObject(_D); SetRegistryData("ConfigTools", "Data", Encoding.UTF8.GetBytes(_S)); }
public static void InitData() { var R = GetRegistryData("ConfigTools", "Data"); if (R == null) { var _D = new RegistryData(); _D.GetData(); var _S = JsonConvert.SerializeObject(_D); SetRegistryData("ConfigTools", "Data", Encoding.UTF8.GetBytes(_S)); } else { var _D = JsonConvert.DeserializeObject <RegistryData>(Encoding.UTF8.GetString(R)); _D.GetData(); } }