private void export_Click(object sender, EventArgs e) { List <Game> items = new List <Game>(); foreach (Emulator emu in DB.Instance.GetEmulators()) { foreach (Game game in DB.Instance.GetGames(emu)) { items.Add(game); } } if (DBSync.export(items.ToArray(), exportText.Text)) { MessageBox.Show("Done!", "Exporting meta data", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Could not export. Please check that the path \nspecified is correct and that you have write permissions.", "Exporting meta data", MessageBoxButtons.OK, MessageBoxIcon.Error); } }