Skip to content

Commit

Permalink
Handler for 'clear DB' button
Browse files Browse the repository at this point in the history
  • Loading branch information
Ridireacht committed May 24, 2022
1 parent 05ba980 commit d1c0674
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion GUI/PrimeNumbers/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ private void button1_Click(object sender, EventArgs e)
// 'Clear DB' button
private void button2_Click(object sender, EventArgs e)
{
DB.ClearDatabase();
if (isDatabase == true)
DB.ClearDatabase();
else
textBox1.Text = "There is no database to be cleared!";
}


Expand Down

0 comments on commit d1c0674

Please sign in to comment.