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 } }
// End of functions by Windows Forms private void SubmitDetails_Click(object sender, EventArgs e) { NameBox.Hide(); NameInput.Hide(); CompanyBox.Hide(); CompanyInput.Hide(); PurposeBox.Hide(); PurposeInput.Hide(); EmailBox.Hide(); EmailInput.Hide(); SubmitDetails.Hide(); label1.Text = "Installation"; label2.Text = "Click \"Install\" To install..."; InstallButton.Show(); string DetailsEncoded = EncodeUserDetails(); System.IO.File.WriteAllText(@".\UserDetails.txt", DetailsEncoded); }
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 } }
void refreshItemsBasedOnCurrentState() { switch (_installationState) { case ModBotInstallationState.NotInstalled: StatusLabel.Text = "Mod-Bot not installed"; StatusLabel.ForeColor = Color.FromArgb(252, 124, 0); InstallButton.Show(); InstallButton.Text = "Install Mod-Bot"; Reinstall.Hide(); break; case ModBotInstallationState.OutOfDate: StatusLabel.Text = "Mod-Bot out of date"; StatusLabel.ForeColor = Color.FromArgb(255, 255, 0); InstallButton.Show(); InstallButton.Text = "Update Mod-Bot"; Reinstall.Hide(); break; case ModBotInstallationState.UpToDate: InstallButton.Show(); InstallButton.Text = "Start Game"; Reinstall.Show(); Reinstall.Text = "Reinstall"; StatusLabel.Text = "Mod-Bot up to date!"; StatusLabel.ForeColor = Color.FromArgb(124, 252, 0); break; case ModBotInstallationState.BetaVersion: InstallButton.Show(); InstallButton.Text = "Start Game (beta)"; Reinstall.Text = "Reinstall stable"; StatusLabel.Text = "Mod-Bot beta installed"; StatusLabel.ForeColor = Color.FromArgb(255, 0, 255); break; case ModBotInstallationState.UnableToVerify: StatusLabel.Text = "Unable to check latest Mod-Bot version"; StatusLabel.ForeColor = Color.FromArgb(125, 0, 125); InstallButton.Show(); InstallButton.Text = "Start Game"; Reinstall.Hide(); break; } if (UserPreferences.Current.ShouldUseBetaPath) { InstallButton.Text = "Start (beta)"; Reinstall.Text = "Start (non beta)"; } InstallButton.Visible = _numCurrentlyLoadingModItems == 0 && _numCurrentlyUpdatingModItems == 0 && (_missingModDependencies == null || _missingModDependencies.Count == 0); Reinstall.Visible = _numCurrentlyLoadingModItems == 0 && _numCurrentlyUpdatingModItems == 0 && (_missingModDependencies == null || _missingModDependencies.Count == 0); installedModsLoading.Visible = _numCurrentlyLoadingModItems > 0; if (!_hasInitializedInstalledModsView && _installationState != ModBotInstallationState.Failed && _installationState != ModBotInstallationState.NotInstalled) { initializeInstalledModsView(); } }