private void InstalledModsList_SelectedIndexChanged(object sender, EventArgs e) { UpdateButton.Show(); Delete.Show(); CheckButton.Show(); ModVer.Show(); try { trycatchtext(SelectedModText, "Selected Mod: " + DownloadableModsList.SelectedItems[0].Text); trycatchtext(ModInfo, DownloadableModsList.SelectedItems[0].SubItems[3].Text); impModID = DownloadableModsList.SelectedItems[0].SubItems[4].Text; } catch (Exception exception) { //sike lmao } try { impModID = InstalledModsList.SelectedItems[0].SubItems[4].Text; SelectedModText.Text = "Selected Mod: " + InstalledModsList.SelectedItems[0].Text; ModInfo.Text = InstalledModsList.SelectedItems[0].SubItems[3].Text; ModVer.Text = "Current Ver: " + InstalledModsList.SelectedItems[0].SubItems[1].Text + ", Online Version: " + ModParsing .GetSpecificMod(InstalledModsList.SelectedItems[0].SubItems[4].Text).Version; } catch { } }
private void DownloadableModsList_SelectedIndexChanged(object sender, EventArgs e) { InstallButton.Show(); CheckButton.Show(); UpdateButton.Hide(); ModVer.Hide(); Delete.Hide(); DisEnaButton.Hide(); try { trycatchtext(SelectedModText, "Selected Mod: " + DownloadableModsList.SelectedItems[0].Text); trycatchtext(ModInfo, DownloadableModsList.SelectedItems[0].SubItems[3].Text); impModID = new string[DownloadableModsList.SelectedItems.Count]; for (int i = 0; i < DownloadableModsList.SelectedItems.Count; i++) { impModID[i] = DownloadableModsList.SelectedItems[i].SubItems[4].Text; } } catch { // ignored } }
private void LoadGUI(object sender, EventArgs e) { InitTimer(); //progress timer AllocConsole(); //enables console JsonCommon.OverrideModInstallerVariables(); //overrides vars if possible //check if in vs string dir = Directory.GetCurrentDirectory(); for (int i = 0; i < 3; i++) { dir = Directory.GetParent(dir).ToString(); //move up 3 dirs } dir += @"\bin\"; //add bin Console.WriteLine(ModInstallerCommon.Files.MainFiledir); Console.WriteLine("Detecting for" + ModInstallerCommon.Files.execdir); if (!File.Exists(ModInstallerCommon.Files.execdir) && !ModInstallerCommon.BypassExec && !Directory.Exists(dir)) { MessageBox.Show("ModInstaller cannot find the executable! Make sure my location is in a folder inside the h3vr directory! Just in case, I'll pull up a tutorial for you.", "Exectuable not found!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); var psi = new ProcessStartInfo { FileName = "https://youtu.be/LBcxS_mYLFE?t=21", UseShellExecute = true }; Process.Start(psi); Application.Exit(); } var onlineversion = new Version(JsonModList.GetDeserializedModListFormatOnline(JsonCommon.DatabaseInfo).Modlist[0].Version); if (ModInstallerCommon.ModInstallerVersion.CompareTo(onlineversion) < 0) { MessageBox.Show("H3VRModInstaller is out of date! (" + ModInstallerCommon.ModInstallerVersion + " vs " + onlineversion + ")", "Wrong version detected!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); var psi = new ProcessStartInfo { FileName = JsonModList.GetDeserializedModListFormatOnline(JsonCommon.DatabaseInfo).Modlist[0].Website, UseShellExecute = true }; Process.Start(psi); } InstallButton.Hide(); UpdateButton.Hide(); ModVer.Hide(); Delete.Hide(); CheckButton.Hide(); InstalledModsList.Hide(); ModsEnabled.Checked = true; UpdateModList(); UpdateCatagories(); }
private void LoadGUI(object sender, EventArgs e) { AllocConsole(); InstallButton.Hide(); UpdateButton.Hide(); ModVer.Hide(); Delete.Hide(); CheckButton.Hide(); InstalledModsList.Hide(); ModsEnabled.Checked = true; UpdateModList(); UpdateCatagories(); }
private void DownloadableModsList_SelectedIndexChanged(object sender, EventArgs e) { InstallButton.Show(); CheckButton.Show(); UpdateButton.Hide(); ModVer.Hide(); Delete.Hide(); try { trycatchtext(SelectedModText, "Selected Mod: " + DownloadableModsList.SelectedItems[0].Text); trycatchtext(ModInfo, DownloadableModsList.SelectedItems[0].SubItems[3].Text); impModID = DownloadableModsList.SelectedItems[0].SubItems[4].Text; } catch (Exception exception) { //sike lmao } }
private void LoadGUI(object sender, EventArgs e) { KeyDown += Form_KeyDown; if (!File.Exists(Utilities.ModCache)) { MessageBox.Show("Thank you for downloading H3VRModInstaller!\nIf there are any issues, or if you want a mod added, please hit us up on the Homebrew discord (@Frityet and @Potatoes)", "Thank you!", MessageBoxButtons.OK, MessageBoxIcon.Information); } InitTimer(); //progress timer //AllocConsole(); //enables console JsonCommon.OverrideModInstallerVariables(); //overrides vars if possible var onlineversion = new Version(JsonModList.GetDeserializedModListFormatOnline(JsonCommon.DatabaseInfo) .Modlist[0].Version); if (ModInstallerCommon.ModInstallerVersion.CompareTo(onlineversion) < 0) { MessageBox.Show("H3VRModInstaller is out of date! (" + ModInstallerCommon.ModInstallerVersion + " vs " + onlineversion + ")", "Out of date version detected!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); var psi = new ProcessStartInfo { FileName = JsonModList.GetDeserializedModListFormatOnline(JsonCommon.DatabaseInfo) .Modlist[0] .Website, UseShellExecute = true }; Process.Start(psi); } InstallButton.Hide(); UpdateButton.Hide(); ModVer.Hide(); Delete.Hide(); CheckButton.Hide(); UpdateModList(); UpdateCatagories(); CatagoriesComboBox.SelectedIndex = 0; }
private void LoadGUI(object sender, EventArgs e) { KeyDown += Form_KeyDown; if (!File.Exists(Utilities.ModCache)) { MessageBox.Show("Thank you for downloading H3VRModInstaller!\nIf there are any issues, or if you want a mod added, please hit us up on the Homebrew discord (@Frityet and @Potatoes)", "Thank you!", MessageBoxButtons.OK, MessageBoxIcon.Information); } InitTimer(); //progress timer //AllocConsole(); //enables console InstallButton.Hide(); UpdateButton.Hide(); ModVer.Hide(); Delete.Hide(); CheckButton.Hide(); UpdateModList(); UpdateCatagories(); DisEnaButton.Hide(); CatagoriesComboBox.SelectedIndex = 0; }
private void InstalledModsList_SelectedIndexChanged(object sender, EventArgs e) { UpdateButton.Show(); Delete.Show(); CheckButton.Show(); DisEnaButton.Show(); try { ModFile modinfo = ModParsing.GetSpecificMod(InstalledModsList.SelectedItems[0].SubItems[4].Text); //if cached mod is disabled if (!String.IsNullOrEmpty(modinfo.DelInfo)) { string path = Path.Combine(Utilities.GameDirectory, modinfo.DelInfo.Split('?')[0]); //split to get the first delinfo arg if (!File.Exists(path) && !Directory.Exists(path)) //if it is not disabled { DisEnaButton.Text = "Enable"; if (modinfo.Version == "0.0.0") { UpdateButton.Hide(); } } else { DisEnaButton.Text = "Disable"; UpdateButton.Show(); } } } catch {} ModVer.Show(); try { trycatchtext(SelectedModText, "Selected Mod: " + DownloadableModsList.SelectedItems[0].Text); trycatchtext(ModInfo, DownloadableModsList.SelectedItems[0].SubItems[3].Text); impModID = new string[DownloadableModsList.SelectedItems.Count]; for (int i = 0; i < DownloadableModsList.SelectedItems.Count; i++) { impModID[i] = DownloadableModsList.SelectedItems[i].SubItems[4].Text; } } catch { // ignored } try { impModID = new string[InstalledModsList.SelectedItems.Count]; for (int i = 0; i < InstalledModsList.SelectedItems.Count; i++) { impModID[i] = InstalledModsList.SelectedItems[i].SubItems[4].Text; } // impModID = InstalledModsList.SelectedItems[0].SubItems[4].Text; SelectedModText.Text = "Selected Mod: " + InstalledModsList.SelectedItems[0].Text; ModInfo.Text = InstalledModsList.SelectedItems[0].SubItems[3].Text; ModVer.Text = "Current Ver: " + InstalledModsList.SelectedItems[0].SubItems[1].Text + ", Online Version: " + ModParsing .GetSpecificMod(InstalledModsList.SelectedItems[0].SubItems[4].Text).Version; } catch { } }