/// <summary> /// Handles the Click event of the btnNewVersion control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> void btnNewVersion_Click(object sender, EventArgs e) { // If the version already exists, confirm that they want to recreate it if (_settings.DoesNextVersionExist()) { const string msg = "The next version already exists, it just has not been made live yet." + " Are you sure you wish to recreate the next version?"; if (MessageBox.Show(msg, "Recreate next version?", MessageBoxButtons.YesNo) == DialogResult.No) { return; } } // Show the form for creating the new version var newVersionForm = new NewVersionForm(); btnNewVersion.Enabled = false; newVersionForm.FormClosed += newVersionForm_FormClosed; newVersionForm.Show(); }
/// <summary> /// Handles the Click event of the btnNewVersion control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> void btnNewVersion_Click(object sender, EventArgs e) { // If the version already exists, confirm that they want to recreate it if (_settings.DoesNextVersionExist()) { const string msg = "The next version already exists, it just has not been made live yet." + " Are you sure you wish to recreate the next version?"; if (MessageBox.Show(msg, "Recreate next version?", MessageBoxButtons.YesNo) == DialogResult.No) return; } // Show the form for creating the new version var newVersionForm = new NewVersionForm(); btnNewVersion.Enabled = false; newVersionForm.FormClosed += newVersionForm_FormClosed; newVersionForm.Show(); }