Ejemplo n.º 1
0
 public UserData GetUserData(string name = "user")
 {
     if (UserDataExist(name))
     {
         string value = RijndaelUtil.RijndaelDecrypt(key, FileUtil.GetAsset($"{PathUtil.GetPath(PathType.PersistentDataPath, "Res")}/{name}.lcc")).GetString();
         return(JsonUtil.ToObject <UserData>(value));
     }
     return(new UserData());
 }
Ejemplo n.º 2
0
 public UserSetData GetUserSetData()
 {
     if (UserSetDataExist())
     {
         string value = RijndaelUtil.RijndaelDecrypt(key, FileUtil.GetAsset($"{PathUtil.GetPath(PathType.PersistentDataPath, "Res")}/UserSet.lcc")).GetString();
         return(JsonUtil.ToObject <UserSetData>(value));
     }
     return(new UserSetData(20, 100, CVType.Chinese, LccModel.LanguageType.Chinese, DisplayModeType.FullScreen, ResolutionType.Resolution1920x1080));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 计算文件MD5
 /// </summary>
 /// <param name="path"></param>
 /// <param name="name"></param>
 /// <returns></returns>
 public static string ComputeFileMD5(string path, string name)
 {
     byte[] bytes = FileUtil.GetAsset($"{path}/{name}");
     return(ComputeMD5(bytes));
 }