Beispiel #1
0
        //used for the LastEditDate property

        private string MakeJson() //Create json file. Returns json string.
        {
            CoreJson cj = new CoreJson()
            {
                Size         = size,
                LastEditDate = dateTime.ToString("dd/MM/yy"),
                Entries      = Entries
            };

            return(JsonConvert.SerializeObject(cj, Formatting.Indented));
        }
Beispiel #2
0
 //Takes CoreJson object and adds it to the Entries List.
 private void LoadEntries()
 {
     try
     {
         CoreJson cj = LoadJson();
         size = cj.Size;
         foreach (Entry e in cj.Entries)
         {
             Entries.Add(e);
         }
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
     }
 }