Exemple #1
0
        public void AddNote(Models.Note note)
        {
            List <Models.Note> Notes = GetNote();

            Notes.Add(note);

            using var writer = File.CreateText(ConfigGetter.GetNotePath());
            writer.Write(JsonConvert.SerializeObject(Notes, Formatting.Indented));
        }
Exemple #2
0
 public static List <Models.Note> GetNote()
 {
     using var reader = File.OpenText(ConfigGetter.GetNotePath());
     return(JsonConvert.DeserializeObject <List <Models.Note> >(reader.ReadToEnd()));
 }