示例#1
0
        /// <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();
        }
示例#2
0
文件: MainForm.cs 项目: wtfcolt/game
        /// <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();
        }