private void dgvMods_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { using (var dialog = new EditModForm(mConfiguration, mModVms[e.RowIndex].ModInfo)) { if (dialog.ShowDialog() != DialogResult.OK) { return; } } }
private void btnAdd_Click(object sender, EventArgs e) { using (var dialog = new EditModForm(mConfiguration, null)) { if (dialog.ShowDialog() != DialogResult.OK) { return; } var modInfo = dialog.ModInfo; Directory.CreateDirectory(modInfo.RootDir); Directory.CreateDirectory(modInfo.FilesDir); modInfo.Save(Path.Combine(modInfo.RootDir, ModInfo.FILENAME)); Initialize(); Process.Start(modInfo.FilesDir); } }