private void tsmiExporText_Click(object sender, EventArgs e) { var dlg = new SaveFileDialog { InitialDirectory = OptionsController.DownloadPath, FileName = "ModList.txt" }; if (dlg.ShowDialog() == DialogResult.OK) { var sw = new StreamWriter(dlg.OpenFile()); sw.Write(ModSelectionController.GetModListAsText()); sw.Close(); } }