private void workshopPageBtn_Click(object sender, EventArgs e) { fixButton(); if (currAddon.workshopID != 0) { try { Process.Start("http://steamcommunity.com/sharedfiles/filedetails/?id=" + currAddon.workshopID); } catch (Exception ex) { // TODO.... 9/12/15 } return; } SingleTextboxForm stf = new SingleTextboxForm(); stf.Text = strings.WorkshopID; stf.textBox.Text = ""; stf.btn.Text = "OK"; stf.label.Text = strings.EnterWorkshopID + " (ex. 427193566):"; DialogResult dr = stf.ShowDialog(); if (dr == DialogResult.OK) { int id; if (Int32.TryParse(stf.textBox.Text, out id)) { currAddon.workshopID = id; Settings.Default.AddonNameToWorkshopID += currAddon.name + "=" + id + ";"; // perform a refresh changeCurrAddon(currAddon); } else { MetroMessageBox.Show(this, strings.CouldntParseID, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
private void workshopPageBtn_Click(object sender, EventArgs e) { fixButton(); if (currAddon.workshopID != 0) { Process.Start("http://steamcommunity.com/sharedfiles/filedetails/?id=" + currAddon.workshopID); return; } SingleTextboxForm stf = new SingleTextboxForm(); stf.Text = "Workshop ID"; stf.textBox.Text = ""; stf.btn.Text = "OK"; stf.label.Text = "Enter the workshop ID (ex. 427193566):"; DialogResult dr = stf.ShowDialog(); if (dr == DialogResult.OK) { int id; if (Int32.TryParse(stf.textBox.Text, out id)) { currAddon.workshopID = id; Settings.Default.AddonNameToWorkshopID += currAddon.name + "=" + id + ";"; // perform a refresh changeCurrAddon(currAddon); } else { MetroMessageBox.Show(this, "Couldn't parse ID!", "", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }