Esempio n. 1
0
        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) { }
        }
Esempio n. 2
0
        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) { }
        }
Esempio n. 3
0
 private void TextBoxSeed_TextChanged(object sender, EventArgs e)
 {
     Config.Instance.Seed = textBoxSeed.Text;
     RandomHandler.SetSeed(Config.Instance.Seed);
 }