Need to stop timer , because it is looping and opening the same window over and over
<p>I have this screen that is on startup, basically like a splash, but it isnt. I put a timer on it. After a few seconds the window must dissapear and then the log in must show. I've got as far as showing the new form, but it is on a loop. It keeps opening the new form again and again! Here is my code. Where am I doing this wrong?</p>

<p><strong>Timer</strong></p>

<pre><code>int count;
count = 0;

public Windowsplash
</code></pre>

<p>System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();</p>

<pre><code>        dispatcherTimer.Interval = new TimeSpan(0,0,0,0,2500);
        dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
        dispatcherTimer.Start();

private void dispatcherTimer_Tick(object sender, EventArgs e)
{
    System.Windows.Threading.DispatcherTimer dispatcherTimer = sender as System.Windows.Threading.DispatcherTimer;

            dispatcherTimer.Stop();
            MainWindow _new = new MainWindow();
            _new.Show();
            this.Close();
}
</code></pre>

<p>I want to stop the timer, so that the new window can stop opening the whole time!
Thanks!
PS: i edited it to what i now have</p>
