Triggering an event after a specified number of clicks
<p>So I'm working on my first big C# project and am currently trying to do the following. On the screen is a red stimulus, which after being clicked five times must emit an event. Let's say in this case display a MessageBox. I know how to get MessageBoxes to display information on a button click, however, as mentioned, I want this one to show up after five clicks. I've scrounged the internet for weeks now and have not found anything suitable. </p>

<p>Here is the code I have where clicking on the stimulus yields the MessageBox with only one click.</p>

<pre><code>private void AutoSPanel_Paint(object sender, PaintEventArgs e)
{
}

private void pictureBox1_Click(object sender, EventArgs e)
{
    MessageBox.Show("Clicking once"); 
}
</code></pre>

<p>Note I've only included the Panel and the stimulus. All other code in my program has not been included. </p>

<p>Thanks in advance for any help! </p>
