コード例 #1
0
        public static void SaveData()
        {
            var _D = new RegistryData();

            _D.SetData();
            var _S = JsonConvert.SerializeObject(_D);

            SetRegistryData("ConfigTools", "Data", Encoding.UTF8.GetBytes(_S));
        }
コード例 #2
0
        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();
            }
        }