Beispiel #1
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);
 }
Beispiel #2
0
 private void refreshDecals()
 {
     FuncMisc.refreshComboBox(comboBoxDecalsTAB, new List <double>()
     {
         0, 20, 50, 100
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Display", "iMaxDecalsPerFrame"), false, comboBoxDecals_SelectedIndexChanged);
 }
Beispiel #3
0
 private void refreshLODObjects()
 {
     FuncMisc.refreshComboBox(comboBoxLODObjectsTAB, new List <double>()
     {
         12500, 25000, 40000, 75000
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "TerrainManager", "fTreeLoadDistance"), false, comboBoxLODObjects_SelectedIndexChanged);
 }
Beispiel #4
0
 private void refreshTextures()
 {
     FuncMisc.refreshComboBox(comboBoxTexturesTAB, new List <double>()
     {
         0, 1, 2
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Display", "iTexMipMapSkip"), false, comboBoxTextures_SelectedIndexChanged);
 }
Beispiel #5
0
 private void refreshShadow()
 {
     FuncMisc.refreshComboBox(comboBoxShadowResTAB, new List <double>()
     {
         512, 1024, 2048, 4096
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Display", "iShadowMapResolution"), false, comboBoxShadowRes_SelectedIndexChanged);
 }
Beispiel #6
0
 private void refreshAF()
 {
     FuncMisc.refreshComboBox(comboBoxAFTAB, new List <double>()
     {
         0, 2, 4, 8, 16
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Display", "iMaxAnisotropy"), false, comboBoxAF_SelectedIndexChanged);
 }
Beispiel #7
0
 private void refreshWaterReflect()
 {
     FuncMisc.refreshComboBox(comboBoxWaterReflectTAB, new List <double>()
     {
         512, 1024, 2048
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Water", "iWaterReflectWidth"), false, comboBoxWaterReflect_SelectedIndexChanged);
 }
 private void refreshCB2()
 {
     FuncMisc.refreshComboBox(comboBox2, new List <double>()
     {
         1, 2
     }, FormMain.numberStyle, false, comboBox2_SelectedIndexChanged);
 }
Beispiel #9
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;
     }
 }
Beispiel #10
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);
     }
 }
        //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
        public static void iniWrite(string path, string section, string key, string value)
        {
            bool readyToWrite = false;

            blockClearSR = true;
            string line = stringRead(path, section, key);

            blockClearSR = false;
            if (lineIndex != -1)
            {
                if (line == null || value == null || line.ToLower() != value.ToLower())
                {
                    cacheFile[lineIndex] = key + "=" + value;
                    readyToWrite         = true;
                }
            }
            else
            {
                if (startIndex != -1 && enbIndex != -1)
                {
                    cacheFile[enbIndex] += Environment.NewLine + key + "=" + value;
                    readyToWrite         = true;
                }
                else
                {
                    File.AppendAllText(path, Environment.NewLine + "[" + section + "]" + Environment.NewLine + key + "=" + value + Environment.NewLine);
                }
            }
            if (readyToWrite)
            {
                FuncMisc.writeToFile(path, cacheFile);
            }
            cacheFile = null;
        }
Beispiel #12
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);
     }
 }
Beispiel #13
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);
     }
 }
Beispiel #14
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);
     }
 }
Beispiel #15
0
 public FormENB()
 {
     InitializeComponent();
     FuncMisc.setFormFont(this);
     Directory.SetCurrentDirectory(FormMain.pathLauncherFolder);
     if (FormMain.numberStyle > 1)
     {
         imageBackgroundImage();
     }
     if (FormMain.langTranslate == "EN")
     {
         langTranslateEN();
     }
     toolTip1.SetToolTip(label3, reservedMemory);
     toolTip1.SetToolTip(comboBox3, reservedMemory);
     toolTip1.SetToolTip(button_Compress, compressMemory);
     toolTip1.SetToolTip(label9, compressMemory);
     toolTip1.SetToolTip(button_WaitBuffer, waitBuffer);
     toolTip1.SetToolTip(label6, waitBuffer);
     toolTip1.SetToolTip(label14, occlusionCulling);
     toolTip1.SetToolTip(button_OC, occlusionCulling);
     toolTip1.SetToolTip(label17, expandMemory);
     toolTip1.SetToolTip(buttonExpandMemory, expandMemory);
     refreshFileList();
     refreshAllValue();
 }
Beispiel #16
0
 private void refreshAA()
 {
     FuncMisc.refreshComboBox(comboBoxAATAB, new List <double>()
     {
         0, 2, 4, 8
     }, FuncParser.intRead(FormMain.pathSkyrimPrefsINI, "Display", "iMultiSample"), false, comboBoxAA_SelectedIndexChanged);
 }
Beispiel #17
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();
 }
Beispiel #18
0
 public FormENB()
 {
     InitializeComponent();
     FuncMisc.setFormFont(this);
     if (FormMain.numberStyle > 1)
     {
         imageBackgroundImage();
     }
     if (FormMain.langTranslate == "EN")
     {
         langTranslateEN();
     }
     toolTip1.SetToolTip(label9, textReservedMemory);
     toolTip1.SetToolTip(comboBox_Memory, textReservedMemory);
     toolTip1.SetToolTip(label11, textCompression);
     toolTip1.SetToolTip(button_Compress, textCompression);
     toolTip1.SetToolTip(label10, textExpandMemory);
     toolTip1.SetToolTip(button_ExpandMemory, textExpandMemory);
     toolTip1.SetToolTip(label2, textDOF);
     toolTip1.SetToolTip(button_DOF, textDOF);
     toolTip1.SetToolTip(label3, textAO);
     toolTip1.SetToolTip(button_AO, textAO);
     toolTip1.SetToolTip(label7, textAF);
     toolTip1.SetToolTip(button_AF, textAF);
     toolTip1.SetToolTip(comboBox_AF, textAF);
     toolTip1.SetToolTip(label6, textAA + "EdgeAA");
     toolTip1.SetToolTip(button_EAA, textAA + "EdgeAA");
     toolTip1.SetToolTip(label4, textAA + "SubPixelAA");
     toolTip1.SetToolTip(button_SAA, textAA + "SubPixelAA");
     toolTip1.SetToolTip(label5, textAA + "TemporalAA");
     toolTip1.SetToolTip(button_TAA, textAA + "TemporalAA");
     refreshFileList();
     refreshAllValue();
 }
Beispiel #19
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);
     }
 }
Beispiel #20
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);
 }
Beispiel #21
0
 private void fileUnpack(string filename)
 {
     FuncMisc.ToggleButtons(this, false);
     listBox1.Enabled = false;
     FuncMisc.UnPackRAR(CPFilesPath + filename);
     FuncMisc.ToggleButtons(this, true);
     listBox1.Enabled = true;
 }
Beispiel #22
0
 private void fileUnpack(string filename)
 {
     FuncMisc.toggleButtons(this, false);
     listBox1.Enabled = false;
     FuncMisc.unpackRAR(pathCPFiles + filename);
     FuncMisc.toggleButtons(this, true);
     listBox1.Enabled = true;
 }
Beispiel #23
0
 private void refreshValueLabelPapyrus()
 {
     papyrus = FuncMisc.refreshButton(button_Papyrus, FormMain.pathSkyrimINI, "Papyrus", "bEnableLogging", null, false);
     if (papyrus)
     {
         FuncFiles.creatDirectory(FormMain.pathMyDoc + "Logs");
     }
 }
Beispiel #24
0
 private void fileUnpack(string filename)
 {
     FuncMisc.toggleButtons(this, false);
     listBox1.Enabled = false;
     FuncMisc.unpackRAR(FormMain.pathModsFolder + filename);
     FuncMisc.toggleButtons(this, true);
     listBox1.Enabled = true;
 }
Beispiel #25
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void button_ResetSettings_Click(object sender, EventArgs e)
 {
     label1.Focus();
     if (FuncMisc.dialogResult(textSettingsReset))
     {
         resetSettings();
         button_Options_Click(this, new EventArgs());
     }
 }
Beispiel #26
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void button_Uninstall_Click(object sender, EventArgs e)
 {
     if (FuncMisc.dialogResult(textRemoveENB))
     {
         FuncClear.removeENB();
         FuncParser.iniWrite(FormMain.pathLauncherINI, "ENB", "LastPreset", "");
         refreshAllValue();
     }
 }
Beispiel #27
0
 private void enbUnpack(string filename)
 {
     FuncMisc.toggleButtons(this, false);
     listBox1.Enabled = false;
     FuncMisc.unpackRAR(pathENBfolder + filename);
     FuncMisc.toggleButtons(this, true);
     listBox1.Enabled = true;
     refreshAllValue();
 }
Beispiel #28
0
 private void unpackUpdates()
 {
     FuncMisc.UnPackRAR(updateFolder + "file" + numberSelectFile + ".rar");
     if (File.Exists(updateFolder + "Update_" + numberSelectFile + ".bat"))
     {
         Process.Start(updateFolder + "Update_" + numberSelectFile + ".bat");
     }
     FuncParser.iniWrite(FormMain.iniLauncher, "Updates", "Update_" + numberSelectFile + "_Version", FuncParser.stringRead(updateFolder + nameUpdateInfo, "Update_" + numberSelectFile, "update_file_version"));
     comboBox1_SelectedIndexChanged(this, new EventArgs());
 }
Beispiel #29
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();
     }
 }
Beispiel #30
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void button_Help_Click(object sender, EventArgs e)
 {
     label1.Focus();
     if (File.Exists(pathHelp))
     {
         FuncMisc.runProcess(pathHelp, null, null, this, true, false);
     }
     else
     {
         MessageBox.Show(pathHelp + textNotFound);
     }
 }