private void addRomPackInDirectoryStructureToolStripMenuItem_Click(object sender, EventArgs e) { try { FolderBrowserDialog open = new FolderBrowserDialog(); open.SelectedPath = Environment.CurrentDirectory; if (open.ShowDialog() == DialogResult.Cancel) { return; } if (open.SelectedPath.Length == 0) { return; } Platform selected = null; if (FormChoose.ChoosePlatform(out selected)) { RomFunctions.AddRomPacksFromDirectory(selected, open.SelectedPath); FilterRoms(); } } catch (Exception ex) { FormCustomMessage.ShowError(ex.Message); } }
private void toolStripButtonAddRom_Click(object sender, EventArgs e) { try { OpenFileDialog open = new OpenFileDialog(); open.InitialDirectory = Environment.CurrentDirectory; open.Filter = "Roms | *.zip;*.smc;*.fig;*.gba;*.gbc;*.gb;*.pce;*.n64;*.smd;*.sms;*.ccd;*.cue;*.bin;*.iso;*.gdi;*.cdi|" + "Zip | *.zip|" + "CD | *.cue|" + "CD | *.ccd|" + "CD ISO | *.iso|" + "CD Image | *.bin|" + "Dreamcast Image | *.cdi;*.gdi|" + "Snes | *.smc|" + "Snes | *.fig|" + "GBA | *.gba|" + "GBC | *.gbc|" + "GB | *.gb|" + "PC Engine | *.pce|" + "N64 | *.n64|" + "Mega Drive | *.smd|" + "Master System | *.sms|" + "All | *.*"; open.Multiselect = true; if (open.ShowDialog() == DialogResult.Cancel) { return; } if (open.FileNames.Length == 0) { return; } Platform platform = null; FormChoose.ChoosePlatform(out platform); RomFunctions.AddRomsFiles(platform, open.FileNames); FilterRoms(); } catch (Exception ex) { FormCustomMessage.ShowError(ex.Message); } }