Exemplo n.º 1
0
    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");
        }
    }
Exemplo n.º 2
0
        private void Delete(Object paramater)
        {
            Guid id   = (Guid)paramater;
            Note note = App.DataModel.QueryNoteByID(id);

            App.DataModel.DeleteNote(note);
            Notelist.Remove(note);
        }
Exemplo n.º 3
0
    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);
    }