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"); } }
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"); } }