예제 #1
0
 private void InitializeFontInfos()
 {
     try
     {
         fontInfos = Newtonsoft.Json.JsonConvert.DeserializeObject <FontInfos>(System.IO.File.ReadAllText("data.json"));
         fontInfos.Init();
         DataContext = fontInfos;
     }
     catch (Exception ex)
     {
         fontInfos = new FontInfos();
         MessageBox.Show(ex.Message, "Error loading data.json");
     }
 }
예제 #2
0
 private void InitializeFontInfos()
 {
     try
     {
         fontInfos = Newtonsoft.Json.JsonConvert.DeserializeObject<FontInfos>(System.IO.File.ReadAllText("data.json"));
         fontInfos.Init();
         DataContext = fontInfos;
     }
     catch (Exception ex)
     {
         fontInfos = new FontInfos();
         MessageBox.Show(ex.Message, "Error loading data.json");
     }
 }