Ejemplo n.º 1
0
 static void clearFolder(string clearpath)
 {
     if (Directory.Exists(clearpath))
     {
         foreach (string line in Directory.EnumerateFiles(clearpath))
         {
             string fileName = line.Remove(0, FormMain.pathGameFolder.Length);
             if (!IgnoreFilesList.Contains(fileName, StringComparer.OrdinalIgnoreCase) && !CustomIgnoreList.Contains(fileName, StringComparer.OrdinalIgnoreCase))
             {
                 FuncFiles.deleteAny(line);
             }
         }
         foreach (string line in Directory.EnumerateDirectories(clearpath))
         {
             string dirName = line.Remove(0, FormMain.pathGameFolder.Length);
             if (!IgnoreFoldersList.Contains(dirName, StringComparer.OrdinalIgnoreCase) && !CustomIgnoreList.Contains(dirName, StringComparer.OrdinalIgnoreCase))
             {
                 FuncFiles.deleteAny(line);
             }
             else if (!IngoredSearchFoldersList.Contains(dirName, StringComparer.OrdinalIgnoreCase) && !CustomIgnoreList.Contains(dirName, StringComparer.OrdinalIgnoreCase))
             {
                 if (Directory.GetFiles(line).Length == 0 && Directory.GetDirectories(line).Length == 0)
                 {
                     FuncFiles.deleteAny(line);
                 }
                 else
                 {
                     clearFolder(line);
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 public static void removeENB()
 {
     foreach (string line in new string[] { @"data\enb vision.bsa", @"data\enb vision.esp", "eed_verasansmono.bmp", "elep additional shaders", "enbinjector.exe", "enbpalettes", "enhancedenbdiagnostics.fxh", "fxaa_tool.exe", "fixforbrightobjects.txt", "smaa.fx", "smaa.h", "smaa_dx11.fx", "shader functions", "sweetfx", "sweetfx_d3d9.dll", "sweetfx_preset.txt", "sweetfx_settings.txt", "_locationweather.ini", "_mist_anchors.xml", "_sample_enbraindrops", "_weatherlist.ini", "common.fxh", "d3d9.dll", "d3d9.fx", "d3d9sffiles.dll", "d3d9_fxaa.dll", "d3d9_sffiles.dll", "d3d9_sfx.dll", "d3d9_sfx_fxaa.dll", "d3d9_sfx_smaa.dll", "d3d9_sharpen.dll", "d3d9_sweetffiles.dll", "d3d9_smaa.dll", "d3d9injffiles.dll", "d3d9orig.dll", "d3d9swe.dll", "defaultlut.png", "dxgi.dll", "dxgi.fx", "effect.txt", "effect.txt.ini", "enbbloom.fx", "enbbloom.fx.ini", "enbbloom.fx.rar", "enbdefs.fx", "enbdirt.bmp", "enbdirt.tga", "enbeffect.ffiles.ini", "enbeffect.fx", "enbeffect.fx.ini", "enbeffectprepass.fx", "enbeffectprepass.fx.ini", "enbeffectxx.fx.ini", "enbfontunicode.png", "enbfrost.bmp", "enbhelper.dll", "enbhost.exe", "enbinjector.ini", "enblens.fx", "enblens.fx.ini", "enblens1.fx", "enblensmask.bmp", "enblensmask.png", "enblensmask.tga", "enblocal.ini", "enblocalization.xml", "enbpalette.bmp", "enbpalette.png", "enbraindrops.tga", "enbseries", "enbseries.ini", "enbspectrum.bmp", "enbsunsprite.fx", "enbsunsprite.fx.ini", "enbsunsprite.tga", "enbweather.bmp", "injfx_settings.h", "injfx_shaders", "injector.ini", "shader.fx", "shift.dll", "sweetfx_d3d9.dll", "technique.fxh", "volumetric_mist_anchors.xml" })
     {
         FuncFiles.deleteAny(FormMain.pathGameFolder + line);
     }
 }
Ejemplo n.º 3
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void button_unpackENB_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         FuncClear.removeENB();
         enbUnpack(listBox1.SelectedItem.ToString());
         FuncParser.iniWrite(FormMain.pathLauncherINI, "ENB", "LastPreset", listBox1.SelectedItem.ToString());
         if (listBox1.SelectedItem.ToString().ToLower().Contains("boost"))
         {
             FuncMisc.refreshButton(button_DOF, "", "", "", null, false);
             FuncMisc.refreshButton(button_EAA, "", "", "", null, false);
             FuncMisc.refreshButton(button_SAA, "", "", "", null, false);
             FuncMisc.refreshButton(button_TAA, "", "", "", null, false);
             FuncMisc.unpackRAR(FormMain.pathLauncherFolder + @"CPFiles\System\GameText9.rar");
         }
         else
         {
             FuncFiles.deleteAny(FormMain.pathGameFolder + @"Data\GameText9.bsa");
         }
     }
     else
     {
         MessageBox.Show(noFileSelect);
     }
 }
Ejemplo n.º 4
0
 private bool checkUpdateFile(bool fromDL)
 {
     if (File.Exists(pathUpdateFolder + "file" + numberSelectFile + textUpdateExt) && File.Exists(pathUpdateFolder + nameUpdateInfo) && File.Exists(FormMain.pathLauncherFolder + "7z.exe"))
     {
         if (new FileInfo(pathUpdateFolder + "file" + numberSelectFile + textUpdateExt).Length == FuncParser.intRead(pathUpdateFolder + nameUpdateInfo, "Update_" + numberSelectFile, "update_file_filesize"))
         {
             return(true);
         }
         else
         {
             if (fromDL)
             {
                 MessageBox.Show(textNoSyncWithUI);
             }
             FuncFiles.deleteAny(pathUpdateFolder + "file" + numberSelectFile + textUpdateExt);
         }
     }
     else
     {
         if (fromDL)
         {
             MessageBox.Show(textNoTools);
         }
     }
     return(false);
 }
Ejemplo n.º 5
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void button_Uninstall_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         if (FuncMisc.dialogResult(textDeleteMod))
         {
             if (File.Exists(FormMain.pathModsFolder + listBox1.SelectedItem.ToString().Replace(".rar", ".txt")))
             {
                 foreach (string line in File.ReadLines(FormMain.pathModsFolder + listBox1.SelectedItem.ToString().Replace(".rar", ".txt")))
                 {
                     FuncFiles.deleteAny(FormMain.pathGameFolder + line);
                 }
                 if (listBox1.SelectedItem.ToString().ToUpper().Contains("OSA") && File.Exists(FormMain.pathFNISRAR))
                 {
                     FuncMisc.unpackRAR(FormMain.pathFNISRAR);
                 }
             }
             else
             {
                 MessageBox.Show(textNoUninstalFile);
             }
         }
     }
     else
     {
         MessageBox.Show(textNoFileSelect);
     }
 }
Ejemplo n.º 6
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 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") && File.Exists(FormMain.pathFNISRAR))
                 {
                     FuncMisc.unpackRAR(FormMain.pathFNISRAR);
                 }
             }
             else
             {
                 MessageBox.Show(noUninstalFile);
             }
         }
     }
     else
     {
         MessageBox.Show(noFileSelect);
     }
 }
Ejemplo n.º 7
0
        //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
        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);
            }
        }
Ejemplo n.º 8
0
 static void clearFolder(string path)
 {
     if (Directory.Exists(path))
     {
         foreach (string line in Directory.EnumerateFiles(path))
         {
             if (!ignoreList.Exists(s => s.Equals(line.Remove(0, FormMain.gameDirLength), StringComparison.OrdinalIgnoreCase)))
             {
                 FuncFiles.deleteAny(line);
             }
         }
         foreach (string line in Directory.EnumerateDirectories(path))
         {
             string dirName = line.Remove(0, FormMain.gameDirLength);
             if (!ignoreList.Exists(s => s.Equals(dirName, StringComparison.OrdinalIgnoreCase)))
             {
                 FuncFiles.deleteAny(line);
             }
             else if (!ingoredFoldersList.Exists(s => s.Equals(dirName, StringComparison.OrdinalIgnoreCase)))
             {
                 if (Directory.GetFiles(line).Length == 0 && Directory.GetDirectories(line).Length == 0)
                 {
                     FuncFiles.deleteAny(line);
                 }
                 else
                 {
                     clearFolder(line);
                 }
             }
         }
     }
 }
Ejemplo n.º 9
0
 public static void CAM()
 {
     FuncFiles.Delete(FormMain.gameFolder + @"Data\CameraScripts");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\SKSE\Plugins\CameraScripter.dll");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\CameraScripter.esp");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\CameraScripter.bsa");
 }
Ejemplo n.º 10
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 public static void removeENB()
 {
     foreach (string line in new string[] { "enbseries", "d3d9.dll", "enbhost.exe", "enblocal.ini", "enbseries.ini", "enbinjector.exe", "enbinjector.ini", @"data\enb vision.esp" })
     {
         FuncFiles.deleteAny(FormMain.pathGameFolder + line);
     }
 }
Ejemplo n.º 11
0
 private bool checkUpdateFile(bool fromDL)
 {
     if (File.Exists(updateFolder + "file" + numberSelectFile + ".rar") && File.Exists(updateFolder + nameUpdateInfo) && File.Exists(FormMain.launcherFolder + "UnRAR.exe"))
     {
         if (new FileInfo(updateFolder + "file" + numberSelectFile + ".rar").Length == FuncParser.doubleRead(updateFolder + nameUpdateInfo, "Update_" + numberSelectFile, "update_file_filesize"))
         {
             return(true);
         }
         else
         {
             if (fromDL)
             {
                 MessageBox.Show(notSyncWithUI);
             }
             FuncFiles.Delete(updateFolder + "file" + numberSelectFile + ".rar");
         }
     }
     else
     {
         if (fromDL)
         {
             MessageBox.Show(noTools);
         }
     }
     return(false);
 }
Ejemplo n.º 12
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 public static void OSA()
 {
     FuncFiles.Delete(FormMain.gameFolder + @"Data\OSA.esm");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\OSA.bsa");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Naked.esp");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Naked.bsa");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\SKSE\Plugins\CPConvert.dll");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\SKSE\Plugins\CPConvert.ini");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\SKSE\Plugins\OSA.dll");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\0SA");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\0SP");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Armor\Naked");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Animations\_ESG_0ER_F");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Animations\_ESG_0ER_M");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Animations\0Sex_0MF_D");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Animations\0Sex_0MF_K");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Animations\0Sex_0MF_M");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Animations\0Sex_0MF_S");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Animations\0Sex_0MF_U");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Animations\0Sex_EMF_A");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Behaviors\FNIS__ESG_0ER_F_Behavior.hkx");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Behaviors\FNIS__ESG_0ER_M_Behavior.hkx");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Behaviors\FNIS_0Sex_0MF_D_Behavior.hkx");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Behaviors\FNIS_0Sex_0MF_K_Behavior.hkx");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Behaviors\FNIS_0Sex_0MF_M_Behavior.hkx");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Behaviors\FNIS_0Sex_0MF_S_Behavior.hkx");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Behaviors\FNIS_0Sex_0MF_U_Behavior.hkx");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Actors\Character\Behaviors\FNIS_0Sex_EMF_A_Behavior.hkx");
 }
Ejemplo n.º 13
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void refreshAllValue()
 {
     setupENB = FuncSettings.checkENB();
     FuncSettings.physicsFPS();
     FuncSettings.restoreENBAdapter();
     FuncSettings.restoreENBBorderless();
     FuncSettings.restoreENBVSync();
     if (!setupENB || FuncSettings.checkENBoost())
     {
         FuncMisc.refreshButton(button_AO, "", "", "", null, false);
         FuncMisc.refreshButton(button_DOF, "", "", "", null, false);
         FuncMisc.refreshButton(button_EAA, "", "", "", null, false);
         FuncMisc.refreshButton(button_SAA, "", "", "", null, false);
         FuncMisc.refreshButton(button_TAA, "", "", "", null, false);
         if (!File.Exists(FormMain.pathDataFolder + "GameText9.bsa"))
         {
             FuncMisc.unpackArhive(FormMain.pathSystemFolder + "GameText9", true);
         }
     }
     else
     {
         refreshAO();
         refreshDOF();
         refreshEAA();
         refreshSAA();
         refreshTAA();
         FuncFiles.deleteAny(FormMain.pathDataFolder + "GameText9.bsa");
     }
     refreshAF();
     refreshAutoDetect();
     refreshCompressMemory();
     refreshFPS();
     refreshMemory();
     refreshExpandMemory();
 }
Ejemplo n.º 14
0
 public static void TUN()
 {
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Meshes\Armor\Tails");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Tunic.esp");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Tunic.bsa");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\NIOVHH.esp");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\NIOVHH.bsa");
 }
Ejemplo n.º 15
0
 private void refreshValueLabelPapyrus()
 {
     papyrus = FuncMisc.refreshButton(button_Papyrus, FormMain.pathSkyrimINI, "Papyrus", "bEnableLogging", null, false);
     if (papyrus)
     {
         FuncFiles.creatDirectory(FormMain.pathMyDoc + "Logs");
     }
 }
Ejemplo n.º 16
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void button_Restore_Click(object sender, EventArgs e)
 {
     FuncFiles.deleteAny(FormMain.pathAppData + @"Plugins.txt");
     FuncFiles.deleteAny(FormMain.pathAppData + @"LoadOrder.txt");
     FuncFiles.copyAny(FormMain.pathLauncherFolder + @"MasterList\Plugins.txt", FormMain.pathAppData + @"Plugins.txt");
     FuncFiles.copyAny(FormMain.pathLauncherFolder + @"MasterList\Plugins.txt", FormMain.pathAppData + @"LoadOrder.txt");
     refreshModsList();
 }
Ejemplo n.º 17
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void buttonClose_Click(object sender, EventArgs e)
 {
     client.DownloadProgressChanged -= new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
     client.DownloadFileCompleted   -= new AsyncCompletedEventHandler(client_DownloadFileCompleted);
     client.CancelAsync();
     FuncFiles.Delete(updateFolder + nameControlPanel);
     FuncFiles.Delete(updateFolder + nameUpdateInfo);
     Dispose();
 }
Ejemplo n.º 18
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void buttonUpdateCP_Click(object sender, EventArgs e)
 {
     stopDownload = true;
     EnableDisableButtons();
     FuncFiles.Delete(updateFolder + nameControlPanel);
     downloadFileName = nameControlPanel;
     downloadFileType = "UpdateCP";
     client_DownloadProgressStart();
 }
Ejemplo n.º 19
0
 public static void FFC()
 {
     FuncFiles.Delete(FormMain.gameFolder + @"Data\SKSE\Plugins\CampfireData");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\SKSE\Plugins\FrostfallData");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Campfire.esm");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Campfire.bsa");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Frostfall.esp");
     FuncFiles.Delete(FormMain.gameFolder + @"Data\Frostfall.bsa");
 }
Ejemplo n.º 20
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void buttonClearDirectory_Click(object sender, EventArgs e)
 {
     label1.Focus();
     DialogResult dialogResult = MessageBox.Show(clearDirectory, confirmTitle, MessageBoxButtons.YesNo);
     if (dialogResult == DialogResult.Yes)
     {
         FuncFiles.Delete(gameFolder + @"..\Skyrim Mods");
         FuncClear.Clear();
         FuncClear.EmptyFolder(gameFolder);
     }
 }
Ejemplo n.º 21
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 public static void writeToFile(string path, List <string> list)
 {
     try
     {
         FuncFiles.deleteAny(path);
         File.WriteAllLines(path, list, new UTF8Encoding(false));
     }
     catch
     {
         MessageBox.Show(FormMain.couldWriteFile + path);
     }
 }
Ejemplo n.º 22
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void button_ClearDirectory_Click(object sender, EventArgs e)
 {
     label1.Focus();
     if (FuncMisc.dialogResult(textClearDirectory))
     {
         FuncFiles.deleteAny(pathMyDoc + "SKSE");
         FuncFiles.deleteAllInFolder(pathMyDoc + "Logs", "*");
         FuncFiles.deleteAllInFolder(pathMyDoc + "Saves", "*.bak");
         FuncFiles.deleteAny(Path.GetFullPath(pathGameFolder + @"..\Skyrim Mods"));
         FuncClear.clearGameFolder();
     }
 }
Ejemplo n.º 23
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void client_DownloadProgressStart()
 {
     if (FuncMisc.Ping(nameHostName + nameDLFolderHost + downloadFileName))
     {
         FuncFiles.CreatDirectory(updateFolder);
         client.DownloadFileAsync(new Uri(nameHostName + nameDLFolderHost + downloadFileName), updateFolder + downloadFileName);
     }
     else
     {
         stopDownload = false;
         EnableDisableButtons();
         MessageBox.Show(wrongPing + nameHostName + nameDLFolderHost + downloadFileName);
     }
 }
Ejemplo n.º 24
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void client_DownloadProgressStart()
 {
     try
     {
         FuncFiles.creatDirectory(pathUpdateFolder);
         client.DownloadFileAsync(new Uri(nameHostName + downloadFileName), pathUpdateFolder + downloadFileName);
     }
     catch
     {
         stopDownload = false;
         enableDisableButtons();
         MessageBox.Show(textWrongPing + nameHostName + downloadFileName);
     }
 }
Ejemplo n.º 25
0
        //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
        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 + "SKSE");
                FuncFiles.deleteAllInFolder(pathMyDoc + "Logs", "*");
                FuncFiles.deleteAllInFolder(pathMyDoc + "Saves", "*.bak");
                FuncFiles.deleteAny(pathGameFolder + @"..\Skyrim Mods");
                FuncClear.clearGameFolder();
            }
        }
Ejemplo n.º 26
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 public static void emptyFolder(string path)
 {
     if (Directory.Exists(path))
     {
         foreach (string line in Directory.GetDirectories(path))
         {
             emptyFolder(line);
             if (Directory.GetFiles(line).Length == 0 && Directory.GetDirectories(line).Length == 0)
             {
                 FuncFiles.deleteAny(line);
             }
         }
     }
 }
Ejemplo n.º 27
0
 public void resetSettings()
 {
     if (File.Exists(pathLauncherFolder + "Skyrim.ini") && File.Exists(pathLauncherFolder + "SkyrimPrefs.ini") && File.Exists(pathLauncherFolder + @"MasterList\Plugins.txt"))
     {
         try
         {
             RegistryKey key;
             key = Registry.LocalMachine.CreateSubKey(registryPath);
             key.SetValue(registryKey, pathGameFolder);
             key.Close();
         }
         catch
         {
             MessageBox.Show(failWriteToRegistry + registryPath + " " + registryKey + "=" + pathGameFolder);
         }
         FuncFiles.deleteAny(pathSkyrimINI);
         FuncFiles.deleteAny(pathSkyrimPrefsINI);
         FuncFiles.deleteAny(pathMyDoc + "Logs");
         FuncFiles.deleteAny(pathMyDoc + "SKSE");
         FuncFiles.deleteAny(pathMyDoc + "SkyProc");
         FuncFiles.deleteAny(pathMyDoc + "BashSettings.dat");
         FuncFiles.deleteAny(pathMyDoc + "BashSettings.dat.bak");
         FuncFiles.deleteAny(pathMyDoc + "RendererInfo.txt");
         FuncFiles.deleteAny(pathMyDoc + @"Saves\Bash");
         FuncFiles.creatDirectory(pathMyDoc);
         FuncFiles.copyAny(pathLauncherFolder + "Skyrim.ini", pathSkyrimINI);
         FuncFiles.copyAny(pathLauncherFolder + "SkyrimPrefs.ini", pathSkyrimPrefsINI);
         FuncFiles.copyAny(pathLauncherFolder + @"MasterList\BashSettings.dat", pathMyDoc + "BashSettings.dat");
         FuncFiles.deleteAny(pathAppData + @"Plugins.txt");
         FuncFiles.deleteAny(pathAppData + @"LoadOrder.txt");
         FuncFiles.deleteAny(pathAppData + @"Plugins.tes5viewsettings");
         FuncFiles.creatDirectory(pathAppData);
         FuncFiles.copyAny(pathLauncherFolder + @"MasterList\Plugins.txt", pathAppData + @"Plugins.txt");
         FuncFiles.copyAny(pathLauncherFolder + @"MasterList\Plugins.txt", pathAppData + @"LoadOrder.txt");
         FuncFiles.copyAny(pathLauncherFolder + @"MasterList\Plugins.tes5viewsettings", pathAppData + @"Plugins.tes5viewsettings");
         FuncSettings.setSettingsPreset(settingsPreset);
         FuncParser.iniWrite(pathSkyrimPrefsINI, "Display", "iSize W", Screen.PrimaryScreen.Bounds.Width.ToString());
         FuncParser.iniWrite(pathSkyrimPrefsINI, "Display", "iSize H", Screen.PrimaryScreen.Bounds.Height.ToString());
         FuncSettings.physicsFPS();
         MessageBox.Show(typeSettings[settingsPreset] + setSettings);
     }
     else
     {
         MessageBox.Show(notFoundTemplates);
     }
 }
Ejemplo n.º 28
0
 public void resetSettings()
 {
     if (File.Exists(launcherFolder + "Skyrim.ini") && File.Exists(launcherFolder + "SkyrimPrefs.ini") && File.Exists(launcherFolder + @"MasterList\DLCList.txt") && File.Exists(launcherFolder + @"MasterList\plugins.txt"))
     {
         try
         {
             RegistryKey key;
             key = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Bethesda Softworks\Skyrim");
             key.SetValue("Installed Path", gameFolder);
             key.Close();
         }
         catch
         {
             MessageBox.Show(failWriteToRegistry);
         }
         FuncFiles.Delete(myDocPath + "Skyrim.ini");
         FuncFiles.Delete(myDocPath + "SkyrimPrefs.ini");
         FuncFiles.Delete(myDocPath + "Logs");
         FuncFiles.Delete(myDocPath + "SKSE");
         FuncFiles.Delete(myDocPath + "SkyProc");
         FuncFiles.Delete(myDocPath + "BashSettings.dat");
         FuncFiles.Delete(myDocPath + "BashSettings.dat.bak");
         FuncFiles.Delete(myDocPath + "RendererInfo.txt");
         FuncFiles.Delete(myDocPath + @"Saves\Bash");
         FuncFiles.CreatDirectory(myDocPath);
         FuncFiles.CopyAnyFiles(launcherFolder + "Skyrim.ini", myDocPath + "Skyrim.ini");
         FuncFiles.CopyAnyFiles(launcherFolder + "SkyrimPrefs.ini", myDocPath + "SkyrimPrefs.ini");
         FuncFiles.CopyAnyFiles(launcherFolder + @"MasterList\BashSettings.dat", myDocPath + "BashSettings.dat");
         FuncFiles.Delete(appDataPath + @"DLCList.txt");
         FuncFiles.Delete(appDataPath + @"plugins.txt");
         FuncFiles.Delete(appDataPath + @"loadorder.txt");
         FuncFiles.CreatDirectory(appDataPath);
         FuncFiles.CopyAnyFiles(launcherFolder + @"MasterList\DLCList.txt", appDataPath + @"DLCList.txt");
         FuncFiles.CopyAnyFiles(launcherFolder + @"MasterList\plugins.txt", appDataPath + @"plugins.txt");
         FuncFiles.CopyAnyFiles(launcherFolder + @"MasterList\Plugins.tes5viewsettings", appDataPath + @"Plugins.tes5viewsettings");
         var form = new FormOptions();
         form.resetSettings();
         form.Dispose();
         form = null;
     }
     else
     {
         MessageBox.Show(notFoundTemplates);
     }
 }
Ejemplo n.º 29
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void buttonCheckU_Click(object sender, EventArgs e)
 {
     if (stopDownload)
     {
         client.CancelAsync();
         stopDownload = false;
         EnableDisableButtons();
     }
     else
     {
         stopDownload = true;
         EnableDisableButtons();
         if (updatesFound)
         {
             string line = FuncParser.stringRead(updateFolder + nameUpdateInfo, "Update_" + numberSelectFile, "update_file_warning");
             if (line != null)
             {
                 MessageBox.Show(line);
                 line = null;
             }
             if (checkUpdateFile(false))
             {
                 unpackUpdates();
             }
             else
             {
                 FuncFiles.Delete(updateFolder + "file" + numberSelectFile + ".rar");
                 downloadFileName = "file" + numberSelectFile + ".rar";
                 downloadFileType = "UpdateG";
                 client_DownloadProgressStart();
             }
         }
         else
         {
             FuncFiles.Delete(updateFolder + nameUpdateInfo);
             downloadFileName = nameUpdateInfo;
             downloadFileType = "CheckU";
             realIndexI.Clear();
             realIndex.Clear();
             installPreLoad.Clear();
             client_DownloadProgressStart();
         }
     }
 }
Ejemplo n.º 30
0
 private void button_unpackENB_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         if (listBox1.SelectedItem.ToString().ToUpper().Contains("ENB"))
         {
             FuncClear.removeENB();
         }
         else if (listBox1.SelectedItem.ToString().ToUpper().Contains("DOF"))
         {
             FuncFiles.deleteAny(FormMain.pathGameFolder + @"ENBSeries\enbdepthoffield.fx.ini");
         }
         enbUnpack(listBox1.SelectedItem.ToString());
     }
     else
     {
         MessageBox.Show(noFileSelect);
     }
 }