Exemple #1
0
        private void CreatePresetAndAddModTo(Mod mod)
        {
            if (mod.IsInOriginalInstallation())
            {
                MessageBox.Show("This mod cannot be added to a preset, as it is part of the core of Cortex Command.", "Notice", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                return;
            }
            AddPresetWindow window = new AddPresetWindow();

            if ((bool)window.ShowDialog())
            {
                string presetName = window.PresetName;
                Preset preset     = new Preset(presetName, mod.IsEnabled);
                preset.Add(mod);
                //PresetManager.SavePreset(preset);
            }
            HardRefreshModsList();
        }
 private void CreatePresetAndAddModTo(Mod mod)
 {
     if (mod.IsInOriginalInstallation())
     {
         MessageBox.Show("This mod cannot be added to a preset, as it is part of the core of Cortex Command.", "Notice", MessageBoxButton.OK, MessageBoxImage.Exclamation);
         return;
     }
     AddPresetWindow window = new AddPresetWindow();
     if ((bool)window.ShowDialog())
     {
         string presetName = window.PresetName;
         Preset preset = new Preset(presetName, mod.IsEnabled);
         preset.Add(mod);
         //PresetManager.SavePreset(preset);
     }
     HardRefreshModsList();
 }