An issue enabling a panel on event
<p>What I want to do now is have my program, in the background add up the 5 seconds after every occurrence such that once 25seconds have occurred an event is fired. </p>

<p>Any suggestions? </p>

<p>Here is some code of what is going on</p>

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

        }

        //Code for Peck Counter

        private int counter = 0;

        public event EventHandler Clicked5TimesEvent;

        private void OnClicked5TimesEvent()
        {
            if (Clicked5TimesEvent != null)
            {
                Clicked5TimesEvent(this, EventArgs.Empty);
            }
        }

        //Stimulus with Peck Counter
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            counter++;
            if (counter % 5 == 0)
            {
                //Code for Hopper
                //Code to Write Data
                string file_name = "C:\\Users\\Carter Daniels\\DATA\\AUTOSHAPINGdata.txt";
                System.IO.StreamWriter objWriter;
                objWriter = new System.IO.StreamWriter(file_name, true);
                objWriter.WriteLine("5 pecks");
                objWriter.WriteLine("1 Reinforcement");
                objWriter.Close();
                //ITI Panel
                ITIpanel.Visible = true;
            }
        }

        private void ITIpanel_Paint(object sender, PaintEventArgs e)
        {
            if (ITIpanel.Visible == true) 
            {
                ITItimers.Enabled = true;
            } 
        }

        private void ITItimers_Tick(object sender, EventArgs e)
        {
            ITIpanel.Visible = false;
            string file_name = "C:\\Users\\Carter Daniels\\DATA\\AUTOSHAPINGdata.txt";
            System.IO.StreamWriter objWriter;
            objWriter = new System.IO.StreamWriter(file_name, true);
            objWriter.WriteLine("5s ITI");
            objWriter.Close();
            ITItimers.Enabled = false; 
            autoshapingPanel.Visible = true;
        }
    }
}
</code></pre>

<p>What i want my program to do is count the # of times the ITIpanel or ITItimers has occurred and fire a new event after one or the other, preferably the timer has occurred 20 times</p>
