/// <summary> /// Event handler for GUI exit button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnEnd_Click(object sender, EventArgs e) { Form form = new Goodbye(txtPercent.Text, txtAttempts.Text); form.StartPosition = FormStartPosition.CenterParent; form.Show(); }
/// <summary> /// Overridden OnClosing event to provide a goodbye dialog /// </summary> /// <param name="e"></param> protected override void OnClosing(CancelEventArgs e) { e.Cancel = true; Form form = new Goodbye(txtPercent.Text, txtAttempts.Text); form.StartPosition = FormStartPosition.CenterParent; form.Show(); }