Esempio n. 1
0
        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
            }
        }
Esempio n. 2
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;
        }
Esempio n. 3
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
            {
            }
        }