Esempio n. 1
0
        private void InitializeShaderPresetSelect()
        {
            shaderPresetsSelect.Items.Clear();
            var list = new List <string>()
            {
                ""
            };

            var serializer = new XmlSerializer(typeof(ShaderPresetsConfig));
            var stream     = new FileStream("../../ShaderGenerator/Config/ShaderPresets.config", FileMode.Open);

            _presetsConfig = (ShaderPresetsConfig)serializer.Deserialize(stream);

            foreach (var preset in _presetsConfig.Presets)
            {
                list.Add(preset.PresetName);
            }

            shaderPresetsSelect.DataSource = new BindingSource(list, null);
        }
Esempio n. 2
0
        private void InitializeShaderPresetSelect()
        {
            shaderPresetsSelect.Items.Clear();
            var list = new List<string>() {""};

            var serializer = new XmlSerializer(typeof(ShaderPresetsConfig));
            var stream = new FileStream("../../ShaderGenerator/Config/ShaderPresets.config", FileMode.Open);
            _presetsConfig = (ShaderPresetsConfig)serializer.Deserialize(stream);

            foreach (var preset in _presetsConfig.Presets)
            {
                list.Add(preset.PresetName);
            }

            shaderPresetsSelect.DataSource = new BindingSource(list, null);
        }