void loadJSONdata() { if (File.Exists(filePath)) { string contents = File.ReadAllText(filePath); string[] splitContents = contents.Split('\n'); foreach (string content in splitContents) { if (content.Trim() != "") { Notelist temp = JsonUtility.FromJson <Notelist>(content.Trim()); CreateCheckNoteItem(temp.NoteName, temp.type, temp.index1); } Debug.Log("g"); } } else { Debug.Log("no fileeeeeeee"); } }
private void Delete(Object paramater) { Guid id = (Guid)paramater; Note note = App.DataModel.QueryNoteByID(id); App.DataModel.DeleteNote(note); Notelist.Remove(note); }
void SaveJSONdata() { string content = ""; for (int i = 0; i < checkNotes.Count; i++) { Notelist temp = new Notelist(checkNotes[i].NoteName, checkNotes[i].type, checkNotes[i].index1); content += JsonUtility.ToJson(temp) + "\n"; Debug.Log("si"); } File.WriteAllText(filePath, content); }