//////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ////////////////////////////////////////////////////////////// private void button_ClearDirectory_Click(object sender, EventArgs e) { label1.Focus(); DialogResult dialogResult = MessageBox.Show(clearDirectory, confirmTitle, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { FuncFiles.deleteAny(pathMyDoc + "Logs"); FuncFiles.deleteAny(pathMyDoc + "SKSE"); if (FuncParser.stringRead(pathSkyrimINI, "Papyrus", "bEnableLogging") == "1") { FuncFiles.creatDirectory(pathMyDoc + "Logs"); } if (Directory.Exists(pathMyDoc + "Saves")) { foreach (string line in Directory.GetFiles(pathMyDoc + "Saves", "*.bak")) { FuncFiles.deleteAny(line); } } FuncFiles.deleteAny(pathGameFolder + @"..\Skyrim Mods"); FuncClear.clearGameFolder(); FuncClear.emptyFolder(pathGameFolder); } }
//////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ////////////////////////////////////////////////////////////// private void button_ModUnInstall_Click(object sender, EventArgs e) { if (listBox1.SelectedIndex != -1) { DialogResult dialogResult = MessageBox.Show(confirmDelete, confirmTitle, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { if (File.Exists(pathCPFiles + listBox1.SelectedItem.ToString().Replace(".rar", ".txt"))) { foreach (string line in File.ReadLines(pathCPFiles + listBox1.SelectedItem.ToString().Replace(".rar", ".txt"))) { FuncFiles.deleteAny(FormMain.pathGameFolder + line); } if (listBox1.SelectedItem.ToString().ToUpper().Contains("OSA")) { FuncMisc.unpackRAR(FormMain.pathFNISRAR); } FuncClear.emptyFolder(FormMain.pathGameFolder); } else { MessageBox.Show(noUninstalFile); } } } else { MessageBox.Show(noFileSelect); } }