Files
RedHotRoast-ios/Assets/Scripts/ModuleUI/NewTask/NewTaskModel.cs
T

108 lines
2.8 KiB
C#

namespace LoveLegend
{
public class NewTaskModel : BaseModel
{
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
// protected override void OnReset()
// {
// }
// #endregion
// #region 读取数据
// protected override void OnReadData()
// {
// }
// #endregion
// #region 本地存储
// protected override void WriteLocalStorage()
// {
// }
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
// private static string jsonFilePath = Path.Combine(Application.persistentDataPath, "taskrecord1.json");
// public static void saveRecord(List<int> list)
// {
// string save = JsonConvert.SerializeObject(list);
// Debug.Log(save);
// if (File.Exists(jsonFilePath)) File.Delete(jsonFilePath);
// File.WriteAllText(jsonFilePath, save);
// }
// public static List<int> getTaskRecord()
// {
// if (File.Exists(jsonFilePath))
// {
// string jsonstr = File.ReadAllText(jsonFilePath);
// Debug.Log("-------------------------");
// Debug.Log(jsonstr);
// return JsonConvert.DeserializeObject<List<int>>(jsonstr);
// //return JsonUtility.FromJson<MyData>(json);
// }
// else
// {
// Debug.Log("Data file not found!");
// return new List<int>();
// }
// }
// private static string jsonFilePath_time = Path.Combine(Application.persistentDataPath, "timerecord2.json");
// public static void saveTimeRecord(List<int> list)
// {
// string save = JsonConvert.SerializeObject(list);
// Debug.Log(save);
// if (File.Exists(jsonFilePath_time)) File.Delete(jsonFilePath_time);
// File.WriteAllText(jsonFilePath_time, save);
// }
// public static List<int> getTimeRecord()
// {
// if (File.Exists(jsonFilePath_time))
// {
// string jsonstr = File.ReadAllText(jsonFilePath_time);
// Debug.Log("-------------------------");
// Debug.Log(jsonstr);
// return JsonConvert.DeserializeObject<List<int>>(jsonstr);
// //return JsonUtility.FromJson<MyData>(json);
// }
// else
// {
// Debug.Log("Data file not found!");
// return new List<int>();
// }
// }
}
}