private async void Settings_Loaded(object sender, System.Windows.RoutedEventArgs e) { try { dynamic dyn = JsonConvert.DeserializeObject(System.IO.File.ReadAllText("settings.json")); comboBox.Text = dyn.SE; textBox.Text = dyn.Start; EnterCheck.IsChecked = Convert.ToBoolean(Convert.ToString(dyn.Entertainment)); BusCheck.IsChecked = Convert.ToBoolean(Convert.ToString(dyn.Business)); MotoCheck.IsChecked = Convert.ToBoolean(Convert.ToString(dyn.Moto)); InfoCheck.IsChecked = Convert.ToBoolean(Convert.ToString(dyn.Information)); SportCheck.IsChecked = Convert.ToBoolean(Convert.ToString(dyn.Sport)); textBox2.Text = dyn.City; } catch (Exception ex) { Console.WriteLine("Load settings error: " + ex.Message + " " + ex.Data); } if (Directory.Exists("News")) { foreach (string file in System.IO.Directory.GetFiles("News", "*.news")) { await Sources.AddSource(file); } } }