private void TryLoadConfig() { try { JsonSerializer serializer = new JsonSerializer(); using (StreamReader sr = new StreamReader(ConfigPath)) using (JsonReader reader = new JsonTextReader(sr)) { Config.Instance = serializer.Deserialize <Config>(reader); RandomHandler.SetSeed(Config.Instance.Seed); UpdateInterface(); } } catch (Exception) { } }
private void TryLoadConfig() { try { JsonSerializer serializer = new JsonSerializer(); using (StreamReader streamReader = new StreamReader(configPath)) using (JsonReader reader = new JsonTextReader(streamReader)) { Config.SetInstance(serializer.Deserialize <Config>(reader)); RandomHandler.SetSeed(Config.Instance().Seed); } LoadPreset(Config.Instance().EnabledEffects); UpdateInterface(); } catch (Exception) { } }
private void TextBoxSeed_TextChanged(object sender, EventArgs e) { Config.Instance.Seed = textBoxSeed.Text; RandomHandler.SetSeed(Config.Instance.Seed); }