Esempio n. 1
0
 private void refreshWaterReflect()
 {
     FuncMisc.refreshComboBox(comboBoxWaterReflectTAB, new List <double>()
     {
         512, 1024, 2048
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Water", "iWaterReflectWidth"), false, comboBoxWaterReflect_SelectedIndexChanged);
 }
Esempio n. 2
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);
            }
        }
Esempio n. 3
0
 private void refreshLODObjects()
 {
     FuncMisc.refreshComboBox(comboBoxLODObjectsTAB, new List <double>()
     {
         12500, 25000, 40000, 75000
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "TerrainManager", "fTreeLoadDistance"), false, comboBoxLODObjects_SelectedIndexChanged);
 }
Esempio n. 4
0
 private void refreshPredictFPS()
 {
     FuncMisc.refreshComboBox(comboBoxPredictFPS, new List <double>()
     {
         0.0333, 0.0166, 0.0133, 0.0111, 0.0083, 0.0069, 0.0041
     }, FuncParser.doubleRead(FormMain.pathSkyrimINI, "HAVOK", "fMaxTime"), false, comboBoxPredictFPS_SelectedIndexChanged);
 }
Esempio n. 5
0
 private void refreshTextures()
 {
     FuncMisc.refreshComboBox(comboBoxTexturesTAB, new List <double>()
     {
         0, 1, 2
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Display", "iTexMipMapSkip"), false, comboBoxTextures_SelectedIndexChanged);
 }
Esempio n. 6
0
 private void refreshDecals()
 {
     FuncMisc.refreshComboBox(comboBoxDecalsTAB, new List <double>()
     {
         0, 20, 50, 100
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Display", "iMaxDecalsPerFrame"), false, comboBoxDecals_SelectedIndexChanged);
 }
Esempio n. 7
0
 private void refreshShadow()
 {
     FuncMisc.refreshComboBox(comboBoxShadowResTAB, new List <double>()
     {
         512, 1024, 2048, 4096
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Display", "iShadowMapResolution"), false, comboBoxShadowRes_SelectedIndexChanged);
 }
Esempio n. 8
0
 private void refreshAF()
 {
     FuncMisc.refreshComboBox(comboBoxAFTAB, new List <double>()
     {
         0, 2, 4, 8, 16
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Display", "iMaxAnisotropy"), false, comboBoxAF_SelectedIndexChanged);
 }
Esempio n. 9
0
 private void refreshAA()
 {
     FuncMisc.refreshComboBox(comboBoxAATAB, new List <double>()
     {
         0, 2, 4, 8
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Display", "iMultiSample"), false, comboBoxAA_SelectedIndexChanged);
 }
Esempio n. 10
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void button_Skyrim_Click(object sender, EventArgs e)
 {
     label1.Focus();
     if (File.Exists(pathGameFolder + "SKSE.exe"))
     {
         pressButtonEvent(button_Skyrim, BMbuttonlogoPressed, buttonSkyrim_MouseEnter, buttonSkyrim_MouseLeave);
         if (argsStartsWith != null && File.Exists(argsStartsWith))
         {
             FuncMisc.runProcess(argsStartsWith, null, null, null, false);
         }
         if (argsWaitBefore != null)
         {
             int WaitTime = FuncParser.stringToInt(argsWaitBefore);
             if (WaitTime > 0)
             {
                 FuncMisc.toggleButtons(this, false);
                 Thread.Sleep(WaitTime * 1000);
                 FuncMisc.toggleButtons(this, true);
                 button_Skyrim.Enabled = false;
             }
         }
         FuncMisc.runProcess(pathGameFolder + "SKSE.exe", "-forcesteamloader", SKSEExited, this, false);
     }
     else
     {
         MessageBox.Show("SKSE.exe" + notFound);
     }
 }
Esempio n. 11
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);
     }
 }
Esempio n. 12
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 public static void refreshTrackBar(TrackBar trackbar, string file, string section, string parameter, int division, Label label)
 {
     if (FuncParser.keyExists(file, section, parameter))
     {
         trackbar.Enabled = true;
         int readINT = FuncParser.intRead(file, section, parameter);
         if (division != -1)
         {
             readINT = readINT / division;
         }
         if (readINT >= trackbar.Minimum && readINT <= trackbar.Maximum)
         {
             if (division != -1)
             {
                 label.Text = (readINT * division).ToString();
             }
             else
             {
                 label.Text = readINT.ToString();
             }
             trackbar.Value = readINT;
         }
         else
         {
             label.Text = "N/A";
         }
     }
     else
     {
         label.Text       = "N/A";
         trackbar.Enabled = false;
     }
 }
Esempio n. 13
0
 private void refrashAF()
 {
     af = FuncMisc.RefreshButton(buttonAF, enbLocal, "ENGINE", "ForceAnisotropicFiltering", null, false);
     if (af)
     {
         comboBox2.Enabled = true;
         string value = FuncParser.stringRead(enbLocal, "ENGINE", "MaxAnisotropy");
         if (value == "0")
         {
             comboBox2.SelectedIndex = 0;
         }
         else if (value == "2")
         {
             comboBox2.SelectedIndex = 1;
         }
         else if (value == "4")
         {
             comboBox2.SelectedIndex = 2;
         }
         else if (value == "8")
         {
             comboBox2.SelectedIndex = 3;
         }
         else if (value == "16")
         {
             comboBox2.SelectedIndex = 4;
         }
     }
     else
     {
         comboBox2.Enabled       = false;
         comboBox2.SelectedIndex = -1;
     }
 }
Esempio n. 14
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (setupENB)
     {
         FuncParser.iniWrite(pathENBLocalINI, "MEMORY", "ReservedMemorySizeMb", comboBox3.SelectedItem.ToString());
     }
 }
Esempio n. 15
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void OnProcessExit(object sender, EventArgs e)
 {
     if (!File.Exists(iniLauncher))
     {
         StreamWriter sw = new StreamWriter(iniLauncher);
         sw.WriteLine("[General]");
         sw.WriteLine("Version_CP=" + FileVersionInfo.GetVersionInfo(Process.GetCurrentProcess().MainModule.FileName).ProductVersion);
         sw.WriteLine("HideWebButtons=false");
         sw.WriteLine("NumberStyle=" + numberStyle);
         sw.WriteLine("Language=" + langTranslate);
         sw.WriteLine("");
         sw.WriteLine("[Position]");
         sw.WriteLine("POS_WindowTop=" + Top);
         sw.WriteLine("POS_WindowLeft=" + Left);
         sw.WriteLine("");
         sw.WriteLine("[Updates]");
         sw.Close();
     }
     else
     {
         FuncParser.iniWrite(iniLauncher, "General", "NumberStyle", numberStyle.ToString());
         FuncParser.iniWrite(iniLauncher, "General", "Language", langTranslate);
         FuncParser.iniWrite(iniLauncher, "Position", "POS_WindowTop", Top.ToString());
         FuncParser.iniWrite(iniLauncher, "Position", "POS_WindowLeft", Left.ToString());
     }
     AppDomain.CurrentDomain.ProcessExit -= new EventHandler(OnProcessExit);
 }
Esempio n. 16
0
 public static void restoreENBBorderless()
 {
     if (File.Exists(FormENB.pathENBLocalINI))
     {
         FuncParser.iniWrite(FormENB.pathENBLocalINI, "WINDOW", "ForceBorderless", (FuncParser.stringRead(FormMain.pathSkyrimPrefsINI, "Display", "bFull Screen") == "0").ToString().ToLower());
     }
 }
Esempio n. 17
0
        //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
        private void trackBar1_Scroll(object sender, EventArgs e)
        {
            var trackValueExit = trackBar1.Value * 128;

            FuncParser.iniWrite(enbLocal, "MEMORY", "ReservedMemorySizeMb", trackValueExit.ToString());
            refreshTrackBar1();
        }
Esempio n. 18
0
 public static bool refreshButton(Button button, string file, string section, string parameter, string value, bool invert)
 {
     if (FuncParser.keyExists(file, section, parameter))
     {
         button.Enabled = true;
         string readString = FuncParser.stringRead(file, section, parameter);
         bool   toggle     = false;
         toggle = readString != null && (readString == value || readString == "1" || string.Equals(readString, "true", StringComparison.OrdinalIgnoreCase));
         toggle = invert ? !toggle : toggle;
         if (toggle)
         {
             button.BackgroundImage = Properties.Resources.buttonToggleOn;
         }
         else
         {
             button.BackgroundImage = Properties.Resources.buttonToggleOff;
         }
         return(toggle);
     }
     else
     {
         button.BackgroundImage = Properties.Resources.buttonToggleDisable;
         button.Enabled         = false;
         return(false);
     }
 }
Esempio n. 19
0
 private static void setBorderless(string line)
 {
     if (File.Exists(FormMain.gameFolder + "d3d9.dll"))
     {
         FuncParser.iniWrite(FormENB.enbLocal, "WINDOW", "ForceBorderless", line);
     }
 }
Esempio n. 20
0
 private static void setVsync(string line)
 {
     if (File.Exists(FormMain.gameFolder + "d3d9.dll"))
     {
         FuncParser.iniWrite(FormENB.enbLocal, "ENGINE", "EnableVSync", line);
     }
 }
Esempio n. 21
0
 public static bool checkENB()
 {
     if (File.Exists(FormMain.pathGameFolder + @"d3d9.dll") && File.Exists(FormMain.pathGameFolder + "enblocal.ini"))
     {
         if (!checkENBoost())
         {
             FuncParser.iniWrite(FormMain.pathSkyrimPrefsINI, "Display", "iMaxAnisotropy", "0");
             FuncParser.iniWrite(FormMain.pathSkyrimPrefsINI, "Display", "iMultiSample", "0");
             FuncParser.iniWrite(FormMain.pathSkyrimPrefsINI, "Display", "bFXAAEnabled", "0");
             FuncParser.iniWrite(FormMain.pathSkyrimPrefsINI, "Display", "bFloatPointRenderTarget", "1");
         }
         else
         {
             FuncParser.iniWrite(FormMain.pathSkyrimPrefsINI, "Display", "bFloatPointRenderTarget", "0");
         }
         FuncParser.iniWrite(FormMain.pathSkyrimINI, "Display", "bAllowScreenshot", "0");
         return(true);
     }
     else
     {
         FuncParser.iniWrite(FormMain.pathSkyrimPrefsINI, "Display", "bFloatPointRenderTarget", "0");
         FuncParser.iniWrite(FormMain.pathSkyrimINI, "Display", "bAllowScreenshot", "1");
         return(false);
     }
 }
Esempio n. 22
0
 public static void ENBCheck(bool fromENBMenu)
 {
     if (File.Exists(FormMain.gameFolder + "d3d9.dll"))
     {
         FuncParser.iniWrite(FormMain.iniSkyrimPrefs, "Display", "iMaxAnisotropy", "1");
         FuncParser.iniWrite(FormMain.iniSkyrimPrefs, "Display", "iMultiSample", "1");
         FuncParser.iniWrite(FormMain.iniSkyrimPrefs, "Display", "bFXAAEnabled", "0");
         FuncParser.iniWrite(FormMain.iniSkyrimPrefs, "Display", "bFloatPointRenderTarget", "1");
         FuncParser.iniWrite(FormMain.iniSkyrim, "Display", "bAllowScreenshot", "0");
     }
     else if (fromENBMenu)
     {
         FuncParser.iniWrite(FormMain.iniSkyrimPrefs, "Display", "iMaxAnisotropy", "16");
         FuncParser.iniWrite(FormMain.iniSkyrimPrefs, "Display", "iMultiSample", "1");
         FuncParser.iniWrite(FormMain.iniSkyrimPrefs, "Display", "bFXAAEnabled", "1");
         FuncParser.iniWrite(FormMain.iniSkyrimPrefs, "Display", "bFloatPointRenderTarget", "0");
         FuncParser.iniWrite(FormMain.iniSkyrim, "Display", "bAllowScreenshot", "1");
     }
     if (FuncParser.stringRead(FormMain.iniSkyrimPrefs, "Display", "bFull Screen") == "0")
     {
         setBorderless("true");
     }
     else
     {
         setBorderless("false");
     }
     if (FuncParser.stringRead(FormMain.iniSkyrim, "Display", "iPresentInterval") == "1")
     {
         setVsync("true");
     }
     else
     {
         setVsync("false");
     }
 }
Esempio n. 23
0
 public static void restoreENBVSync()
 {
     if (File.Exists(FormENB.pathENBLocalINI))
     {
         FuncParser.iniWrite(FormENB.pathENBLocalINI, "ENGINE", "EnableVSync", (FuncParser.stringRead(FormMain.pathSkyrimINI, "Display", "iPresentInterval") == "1").ToString().ToLower());
     }
 }
Esempio n. 24
0
 public static void restoreENBVideoMemory()
 {
     if (File.Exists(FormENB.pathENBLocalINI))
     {
         FuncParser.iniWrite(FormENB.pathENBLocalINI, "MEMORY", "VideoMemorySizeMb", FuncParser.stringRead(FormMain.pathLauncherINI, "ENB", "MemorySizeMb"));
     }
 }
Esempio n. 25
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void buttonSkyrim_Click(object sender, EventArgs e)
 {
     label1.Focus();
     if (File.Exists(gameFolder + "TESV.exe"))
     {
         buttonSkyrim.Enabled = false;
         buttonSkyrim.MouseEnter -= new EventHandler(buttonSkyrim_MouseEnter);
         buttonSkyrim.MouseLeave -= new EventHandler(buttonSkyrim_MouseLeave);
         buttonSkyrim.BackgroundImage = BMbuttonlogoPressed;
         if (startWithGame != null)
         {
             if (File.Exists(startWithGame))
             {
                 Process.Start(startWithGame);
             }
         }
         if (waitBeforeStart != null)
         {
             int WaitTime = FuncParser.stringToInt(waitBeforeStart);
             if (WaitTime > 0)
             {
                 FuncMisc.ToggleButtons(this, false);
                 Thread.Sleep(WaitTime * 1000);
                 FuncMisc.ToggleButtons(this, true);
                 buttonSkyrim.Enabled = false;
             }
         }
         FuncMisc.RunProcess(gameFolder + "TESV.exe", "-forcesteamloader", SKSEExited, this);
     }
     else
     {
         MessageBox.Show("TESV.exe" + notFound);
     }
 }
Esempio n. 26
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 public static void restoreENBLimit()
 {
     if (File.Exists(FormENB.pathENBLocalINI))
     {
         FuncParser.iniWrite(FormENB.pathENBLocalINI, "LIMITER", "FPSLimit", FormMain.predictFPS.ToString() + ".0");
     }
 }
Esempio n. 27
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void comboBox_Memory_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (File.Exists(FormMain.pathENBLocalINI))
     {
         FuncParser.iniWrite(FormMain.pathENBLocalINI, "MEMORY", "ReservedMemorySizeMb", comboBox_Memory.SelectedItem.ToString());
     }
 }
Esempio n. 28
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void OnProcessExit(object sender, EventArgs e)
 {
     if (!File.Exists(pathLauncherINI))
     {
         FuncMisc.writeToFile(pathLauncherINI, new List <string>()
         {
             "[General]",
             "Version_CP=" + panelFileVersion,
             "HideWebButtons=false",
             "POS_WindowTop=100",
             "POS_WindowLeft=100",
             "SettingsPreset=2",
             "NumberStyle=1",
             "AspectRatio=-1",
             "Language=RU",
             "",
             "[Game]",
             "PredictFPS=60",
             "ZFighting=0",
             "NearDistance=18",
             "",
             "[ENB]",
             "MemorySizeMb=0",
             "LastPreset=",
             "",
             "[Font]",
             "CP_Font=",
             "",
             "Exaples:",
             "   Comic Sans MS",
             "   Courier New",
             "   Franklin Gothic Medium",
             "   Georgia",
             "   Impact",
             "   Lucida Sans Unicode",
             "   Microsoft Sans Serif",
             "   Palatino Linotype",
             "   Tahoma",
             "   Times New Roman",
             "   Trebuchet MS",
             "",
             "[Updates]",
             "UpdateHost=http://www.slmp.ru/_SLMP-GR/2.6/"
         });
     }
     else
     {
         FuncParser.iniWrite(pathLauncherINI, "General", "SettingsPreset", settingsPreset.ToString());
         FuncParser.iniWrite(pathLauncherINI, "General", "NumberStyle", numberStyle.ToString());
         FuncParser.iniWrite(pathLauncherINI, "General", "Language", langTranslate);
         FuncParser.iniWrite(pathLauncherINI, "Game", "PredictFPS", predictFPS.ToString());
         if (Top >= 0 && Left >= 0)
         {
             FuncParser.iniWrite(pathLauncherINI, "General", "POS_WindowTop", Top.ToString());
             FuncParser.iniWrite(pathLauncherINI, "General", "POS_WindowLeft", Left.ToString());
         }
     }
     AppDomain.CurrentDomain.ProcessExit -= new EventHandler(OnProcessExit);
 }
Esempio n. 29
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void EnableDisableButtons()
 {
     if (updatesFound)
     {
         if (stopDownload)
         {
             comboBox1.Enabled    = false;
             buttonAboutU.Enabled = false;
             buttonCvsU.Text      = buttonCvsU_TS;
         }
         else
         {
             comboBox1.Enabled    = true;
             buttonAboutU.Enabled = true;
             label5.Text          = label5_T + FuncParser.convertFileSize(FuncParser.doubleRead(updateFolder + nameUpdateInfo, "Update_" + numberSelectFile, "update_file_filesize"));
             if (updateInstall)
             {
                 buttonCvsU.Enabled = false;
                 buttonCvsU.Text    = buttonCvsU_TI;
             }
             else
             {
                 buttonCvsU.Enabled = true;
                 buttonCvsU.Text    = buttonCvsU_TU;
             }
         }
     }
     else
     {
         comboBox1.Enabled    = false;
         buttonAboutU.Enabled = false;
         label5.Text          = "";
         if (stopDownload)
         {
             buttonCvsU.Text = buttonCvsU_TS;
         }
         else
         {
             buttonCvsU.Text = buttonCvsU_TC;
         }
     }
     if (updatesCPFound)
     {
         if (stopDownload)
         {
             buttonUpdateCP.Enabled = false;
         }
         else
         {
             buttonUpdateCP.Enabled = true;
             buttonUpdateCP.Text    = buttonUpdateCP_TE;
         }
     }
     else
     {
         buttonUpdateCP.Enabled = false;
         buttonUpdateCP.Text    = buttonUpdateCP_TN;
     }
 }
Esempio n. 30
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void enableDisableButtons()
 {
     if (updatesFound)
     {
         if (stopDownload)
         {
             comboBox_Updates.Enabled   = false;
             button_AboutUpdate.Enabled = false;
             button_CheckUpdate.Text    = textStop;
         }
         else
         {
             comboBox_Updates.Enabled   = true;
             button_AboutUpdate.Enabled = true;
             label5.Text = textSize + FuncParser.convertFileSize(FuncParser.intRead(pathUpdateFolder + nameUpdateInfo, "Update_" + numberSelectFile, "update_file_filesize"));
             if (updateInstall)
             {
                 button_CheckUpdate.Enabled = false;
                 button_CheckUpdate.Text    = textInstalled;
             }
             else
             {
                 button_CheckUpdate.Enabled = true;
                 button_CheckUpdate.Text    = textUpdate;
             }
         }
     }
     else
     {
         comboBox_Updates.Enabled   = false;
         button_AboutUpdate.Enabled = false;
         label5.Text = "";
         if (stopDownload)
         {
             button_CheckUpdate.Text = textStop;
         }
         else
         {
             button_CheckUpdate.Text = textCheck;
         }
     }
     if (updatesCPFound)
     {
         if (stopDownload)
         {
             button_UpdateCP.Enabled = false;
         }
         else
         {
             button_UpdateCP.Enabled = true;
             button_UpdateCP.Text    = textUpdate;
         }
     }
     else
     {
         button_UpdateCP.Enabled = false;
         button_UpdateCP.Text    = textNoUpdate;
     }
 }