done without smiley. added prompt for reset
This commit is contained in:
parent
50ec054dd0
commit
e08e0e24e4
@ -327,16 +327,28 @@ namespace ElementaryMathematics
|
|||||||
|
|
||||||
private void btnReset_Click(object sender, EventArgs e)
|
private void btnReset_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
btnClear_Click(sender, e);
|
|
||||||
|
|
||||||
numRunningCorrect = 0;
|
DialogResult btnDialog;
|
||||||
numRunningIncorrect = 0;
|
string strResponse;
|
||||||
|
|
||||||
UpdateButtons();
|
strResponse = "Do you really want to reset all statistics?";
|
||||||
rdoAddition.Select();
|
|
||||||
|
btnDialog = MessageBox.Show(strResponse, "Chapter Four", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
|
||||||
|
|
||||||
|
if (btnDialog == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
btnClear_Click(sender, e);
|
||||||
|
|
||||||
|
numRunningCorrect = 0;
|
||||||
|
numRunningIncorrect = 0;
|
||||||
|
|
||||||
|
UpdateButtons();
|
||||||
|
rdoAddition.Select();
|
||||||
|
|
||||||
|
lblNumCorrect.Text = "0";
|
||||||
|
lblNumIncorrect.Text = "0";
|
||||||
|
}
|
||||||
|
|
||||||
lblNumCorrect.Text = "0";
|
|
||||||
lblNumIncorrect.Text = "0";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateButtons()
|
private void UpdateButtons()
|
||||||
|
Loading…
Reference in New Issue
Block a user