Пример #1
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);
     }
 }
Пример #2
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);
     }
 }
Пример #3
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);
     }
 }
Пример #4
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.unpackRAR(FormMain.pathSystemFolder + "GameText9.rar");
         }
     }
     else
     {
         refreshAO();
         refreshDOF();
         refreshEAA();
         refreshSAA();
         refreshTAA();
         FuncFiles.deleteAny(FormMain.pathDataFolder + "GameText9.bsa");
     }
     refreshAF();
     refreshAutoDetect();
     refreshCompressMemory();
     refreshFPS();
     refreshMemory();
     refreshExpandMemory();
 }
Пример #5
0
 private void fileUnpack(string filename)
 {
     FuncMisc.toggleButtons(this, false);
     listBox1.Enabled = false;
     FuncMisc.unpackRAR(pathCPFiles + filename);
     FuncMisc.toggleButtons(this, true);
     listBox1.Enabled = true;
 }
Пример #6
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;
 }
Пример #7
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();
 }
Пример #8
0
        //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
        private void button_deleteAllENB_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show(removeENBFiles, confirmTitle, MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                FuncClear.removeENB();
                FuncSettings.checkENB();
                FuncParser.iniWrite(FormMain.pathSkyrimPrefsINI, "Display", "iMaxAnisotropy", "16");
                FuncParser.iniWrite(FormMain.pathSkyrimPrefsINI, "Display", "bFXAAEnabled", "1");
                FuncParser.iniWrite(FormMain.pathLauncherINI, "ENB", "LastPreset", "");
                FuncMisc.unpackRAR(FormMain.pathLauncherFolder + @"CPFiles\System\GameText9.rar");
                refreshAllValue();
            }
        }
Пример #9
0
 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();
 }
Пример #10
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void button_Install_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         FuncMisc.toggleButtons(this, false);
         listBox1.Enabled = false;
         FuncClear.removeENB();
         FuncMisc.unpackRAR(FormMain.pathENBFolder + listBox1.SelectedItem.ToString());
         FuncParser.iniWrite(FormMain.pathLauncherINI, "ENB", "LastPreset", listBox1.SelectedItem.ToString());
         FuncParser.iniWrite(FormMain.pathENBLocalINI, "MEMORY", "VideoMemorySizeMb", FuncParser.stringRead(FormMain.pathLauncherINI, "ENB", "MemorySizeMb"));
         listBox1.Enabled = true;
         FuncMisc.toggleButtons(this, true);
         refreshAllValue();
     }
     else
     {
         MessageBox.Show(textNoFile);
     }
 }
Пример #11
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void button_FNIS_Click(object sender, EventArgs e)
 {
     label1.Focus();
     if (File.Exists(pathFNIS))
     {
         if (File.Exists(pathFNISRAR))
         {
             if (FuncMisc.dialogResult(textUnPackFNIS))
             {
                 FuncMisc.unpackRAR(pathFNISRAR);
             }
         }
         pressedButtonEvent(button_FNIS, BMbuttonHalfPressed, button_Half_MouseEnter, button_Half_MouseLeave);
         FuncMisc.runProcess(pathFNIS, null, closeFNIS, this, false, false);
     }
     else
     {
         MessageBox.Show(pathFNIS + textNotFound);
     }
 }
Пример #12
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 private void button_FNIS_Click(object sender, EventArgs e)
 {
     label1.Focus();
     if (File.Exists(pathFNIS))
     {
         if (File.Exists(pathFNISRAR))
         {
             DialogResult dialogResult = MessageBox.Show(unPackFNIS, confirmTitle, MessageBoxButtons.YesNo);
             if (dialogResult == DialogResult.Yes)
             {
                 FuncMisc.unpackRAR(pathFNISRAR);
             }
         }
         pressButtonEvent(button_FNISStart, BMbuttonHalfPressed, buttonH_MouseEnter, buttonH_MouseLeave);
         FuncMisc.runProcess(pathFNIS, null, FNISExited, this, false);
     }
     else
     {
         MessageBox.Show(pathFNIS + notFound);
     }
 }
Пример #13
0
 private void unpackUpdates(bool readyDL)
 {
     for (int i = 1; i <= 200; i++)
     {
         if (FuncParser.keyExists(pathUpdateFolder + nameUpdateInfo, "Update_" + numberSelectFile, "update_delete_file_" + i.ToString()))
         {
             FuncFiles.deleteAny(FormMain.pathGameFolder + FuncParser.stringRead(pathUpdateFolder + nameUpdateInfo, "Update_" + numberSelectFile, "update_delete_file_" + i.ToString()));
         }
         else
         {
             break;
         }
     }
     FuncMisc.unpackRAR(pathUpdateFolder + "file" + numberSelectFile + ".rar");
     FuncParser.iniWrite(FormMain.pathLauncherINI, "Updates", "Update_" + numberSelectFile + "_Version", FuncParser.stringRead(pathUpdateFolder + nameUpdateInfo, "Update_" + numberSelectFile, "update_file_version"));
     comboBox_Updates_SelectedIndexChanged(this, new EventArgs());
     if (readyDL)
     {
         stopDownload = false;
         enableDisableButtons();
     }
 }
Пример #14
0
 private void setAspectRatioFiles()
 {
     if (comboBoxResolutionTAB.SelectedIndex != -1)
     {
         double[] arlist = new double[] { 1.3, 1.4, 1.7, 1.8, 2.5 };
         double   ar     = (double)screenListW[comboBoxResolutionTAB.SelectedIndex] / screenListH[comboBoxResolutionTAB.SelectedIndex];
         int      arl    = FuncParser.intRead(FormMain.pathLauncherINI, "General", "AspectRatio");
         for (int i = 0; i < arlist.Length; i++)
         {
             if (ar <= arlist[i])
             {
                 if (arl != i)
                 {
                     FuncMisc.unpackRAR(FormMain.pathLauncherFolder + @"CPFiles\System\AR(" + i.ToString() + ").rar");
                     FuncParser.iniWrite(FormMain.pathLauncherINI, "General", "AspectRatio", i.ToString());
                     FuncMisc.wideScreenMods();
                 }
                 break;
             }
         }
     }
 }
Пример #15
0
 //////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ//////////////////////////////////////////////////////////////
 public static void wideScreenMods()
 {
     if (FuncParser.intRead(FormMain.pathLauncherINI, "General", "AspectRatio") == 4)
     {
         if (File.Exists(FormMain.pathGameFolder + @"Data\Frostfall.esp") && (!File.Exists(FormMain.pathGameFolder + @"Data\Frostfall-WS.esp") || !File.Exists(FormMain.pathGameFolder + @"Data\Frostfall-WS.bsa")))
         {
             FuncMisc.unpackRAR(FormMain.pathLauncherFolder + @"CPFiles\System\AR(4)FF.rar");
         }
         if (File.Exists(FormMain.pathGameFolder + @"Data\DisableFastTravel.bsa") && new FileInfo(FormMain.pathGameFolder + @"Data\DisableFastTravel.bsa").Length != 45594)
         {
             FuncMisc.unpackRAR(FormMain.pathLauncherFolder + @"CPFiles\System\AR(4)DFT.rar");
         }
     }
     else
     {
         FuncFiles.deleteAny(FormMain.pathGameFolder + @"Data\Frostfall-WS.esp");
         FuncFiles.deleteAny(FormMain.pathGameFolder + @"Data\Frostfall-WS.bsa");
         if (File.Exists(FormMain.pathGameFolder + @"Data\DisableFastTravel.bsa") && new FileInfo(FormMain.pathGameFolder + @"Data\DisableFastTravel.bsa").Length != 45595)
         {
             FuncMisc.unpackRAR(FormMain.pathLauncherFolder + @"CPFiles\DisableFastTravel.rar");
         }
     }
 }
Пример #16
0
 // ------------------------------------------------ BORDER OF FUNCTION ---------------------------------------------------------- //
 private void button_Uninstall_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         if (FuncMisc.dialogResult(textDeleteMod))
         {
             string file = FormMain.pathModsFolder + listBox1.SelectedItem.ToString().Replace(".rar", ".txt");
             if (File.Exists(file))
             {
                 foreach (string line in File.ReadLines(file))
                 {
                     if (line.StartsWith("["))
                     {
                         break;
                     }
                     else if (line.Length > 0)
                     {
                         FuncFiles.deleteAny(FormMain.pathGameFolder + line);
                     }
                 }
                 if (FuncParser.keyExists(file, "UNINSTALL", "UNPACK"))
                 {
                     FuncMisc.unpackRAR(FormMain.pathGameFolder + FuncParser.stringRead(file, "UNINSTALL", "UNPACK"));
                 }
             }
             else
             {
                 MessageBox.Show(textNoUninstalFile);
             }
         }
     }
     else
     {
         MessageBox.Show(textNoFileSelect);
     }
 }
Пример #17
0
 private void programsUnpack(string FileName)
 {
     FuncMisc.toggleButtons(this, false);
     FuncMisc.unpackRAR(FormMain.pathProgramFiles + FileName);
     FuncMisc.toggleButtons(this, true);
 }