private void BtPatchLocation_Click(object sender, EventArgs e) { FolderBrowserDialog fbd = new FolderBrowserDialog { SelectedPath = Properties.Settings.Default.LastSavedDir }; if (fbd.ShowDialog() == DialogResult.OK) { Properties.Settings.Default.LastSavedDir = fbd.SelectedPath; Properties.Settings.Default.Save(); TbPatchLocation.Text = fbd.SelectedPath; if (Directory.Exists(fbd.SelectedPath)) { DirectoryInfo patchDir = new DirectoryInfo(fbd.SelectedPath); if (!File.Exists(Path.Combine(fbd.SelectedPath, "file_sc.txt"))) { PatchUtils.CreateFPScenarioByFiles(patchDir); } RefreshList(patchDir); } else { MessageBox.Show("Папка с патчем не найдена!", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
private void BtCreateFileSc_Click(object sender, EventArgs e) { if (Directory.Exists(TbPatchLocation.Text)) { DirectoryInfo patchDir = new DirectoryInfo(TbPatchLocation.Text); PatchUtils.CreateFPScenarioByFiles(patchDir); RefreshList(patchDir); } else { MessageBox.Show("Папка с патчем не найдена!", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } }