示例#1
0
        public Preset_Create(PresetsPage presetsPage, MinecraftVersion version)
        {
            ReferencePresets = presetsPage;
            Version          = version;
            //ModsToAdd = new List<Mod>();
            ModsToAdd = new List <string>();

            InitializeComponent();
        }
        public Preset_Edit(PresetsPage presetsPage, MinecraftVersion version, Preset preset)
        {
            ReferencePresets = presetsPage;
            Version          = version;
            PresetToEdit     = preset;
            //ModsToEdit = new List<Mod>();
            ModsToEdit = new List <string>();

            InitializeComponent();
        }
        public ModMissing(PresetsPage reference, List <string> modFiles, int index)
        {
            ReferencePresetsPage = reference;
            ModFiles             = modFiles;
            Index = index;

            MessageBox.Show($"{ModFiles[Index]} does not exist!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

            InitializeComponent();

            this.ControlBox = false;
        }
        /// <summary>
        /// Opens the Version into the PresetsPage window.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OpenVersionButton_Click(object sender, EventArgs e)
        {
            if (VersionsDataGridView.Rows.Count > 0)
            {
                int versionSelectedIndex = VersionsDataGridView.CurrentCell.RowIndex;
                var versionToOpen        = Versions[versionSelectedIndex];

                var openVersion = new PresetsPage(this, versionToOpen);

                openVersion.Show();
                Hide();
            }
        }