Exemplo n.º 1
0
 private void exportButton_Click(object sender, EventArgs e)
 {
     saveFileDialog1.FileName = "SweetFX_Settings_" + game.shortName + "_" + activePreset.name;
     if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         sweetConfig clone = game.Config.clone();
         clone.loadPreset(this.activePreset);
         clone.writeToFile(saveFileDialog1.FileName);
     }
 }
Exemplo n.º 2
0
        private void refreshUI()
        {
            presetList.DataSource = null;
            presetList.DataSource = game.presets;

            if (presetList.SelectedIndex != -1)
            {
                configPreset preset = game.presets.ElementAt(presetList.SelectedIndex);
                sweetConfig  clone  = game.Config.clone();
                clone.loadPreset(preset);
                textBox2.Lines = showDiff.formatChanges(clone.diffConfig(game.Config), true);
                activePreset   = preset;
            }
            else
            {
                activePreset = null;
            }
            button5.Visible = true;
        }
Exemplo n.º 3
0
 public void loadPreset(configPreset preset)
 {
     Config.loadPreset(preset);
 }