// ------------------------------------------------ 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(); }
private void restoreAllValue() { FuncSettings.physicsFPS(); FuncSettings.restoreENBAdapter(); FuncSettings.restoreENBBorderless(); FuncSettings.restoreENBVSync(); }
private void enbUnpack(string filename) { FuncMisc.toggleButtons(this, false); listBox1.Enabled = false; FuncMisc.unpackRAR(pathENBfolder + filename); FuncMisc.toggleButtons(this, true); listBox1.Enabled = true; if (filename.ToUpper().Contains("ENB")) { FuncSettings.restoreENBLimit(); FuncSettings.restoreENBAdapter(); FuncSettings.restoreENBBorderless(); FuncSettings.restoreENBVSync(); FuncSettings.restoreENBVideoMemory(); } refreshAllValue(); }
public void resetSettings() { try { RegistryKey key; key = Registry.LocalMachine.CreateSubKey(registryPath); key.SetValue(registryKey, pathGameFolder); key.Close(); } catch { MessageBox.Show(failWriteToRegistry + registryPath + " " + registryKey + "=" + pathGameFolder); } FuncFiles.deleteAny(pathMyDoc + "Logs"); FuncFiles.deleteAny(pathMyDoc + "SKSE"); FuncFiles.deleteAny(pathMyDoc + "SkyProc"); FuncFiles.deleteAny(pathMyDoc + "BethINI Cache"); FuncFiles.deleteAny(pathMyDoc + "BashSettings.dat"); FuncFiles.deleteAny(pathMyDoc + "BashSettings.dat.bak"); FuncFiles.deleteAny(pathMyDoc + "RendererInfo.txt"); FuncFiles.deleteAny(pathMyDoc + @"Saves\Bash"); FuncFiles.deleteAny(pathSkyrimINI); FuncFiles.deleteAny(pathSkyrimPrefsINI); FuncFiles.creatDirectory(pathMyDoc); if (File.Exists(pathLauncherFolder + "Skyrim.ini")) { FuncFiles.copyAny(pathLauncherFolder + "Skyrim.ini", pathSkyrimINI); } else { FuncMisc.writeToFile(pathSkyrimINI, FuncSettings.skyrimINI()); } if (File.Exists(pathLauncherFolder + "SkyrimPrefs.ini")) { FuncFiles.copyAny(pathLauncherFolder + "SkyrimPrefs.ini", pathSkyrimPrefsINI); } else { FuncMisc.writeToFile(pathSkyrimPrefsINI, FuncSettings.skyrimPrefsINI()); } if (File.Exists(pathLauncherFolder + @"MasterList\BashSettings.dat")) { 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); if (File.Exists(pathLauncherFolder + @"MasterList\Plugins.txt")) { FuncFiles.copyAny(pathLauncherFolder + @"MasterList\Plugins.txt", pathAppData + @"Plugins.txt"); FuncFiles.copyAny(pathLauncherFolder + @"MasterList\Plugins.txt", pathAppData + @"LoadOrder.txt"); } else { FuncMisc.writeToFile(pathAppData + @"Plugins.txt", FuncSettings.pluginsTXT()); FuncMisc.writeToFile(pathAppData + @"LoadOrder.txt", FuncSettings.pluginsTXT()); } if (File.Exists(pathLauncherFolder + @"MasterList\Plugins.tes5viewsettings")) { 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(); FuncSettings.restoreENBAdapter(); FuncSettings.restoreENBBorderless(); FuncSettings.restoreENBVSync(); MessageBox.Show(typeSettings[settingsPreset] + setSettings); }
//////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ////////////////////////////////////////////////////////////// private void button_Vsync_Click(object sender, EventArgs e) { FuncParser.iniWrite(FormMain.pathSkyrimINI, "Display", "iPresentInterval", Convert.ToInt32(!vsync).ToString()); FuncSettings.restoreENBVSync(); refreshVsync(); }