Posted 04 September 2010 - 09:59 AM
Posted 18 January 2011 - 10:16 AM
Posted 22 December 2011 - 05:40 AM
Posted 29 October 2012 - 05:30 AM
Posted 18 January 2013 - 06:43 AM
Posted 02 February 2013 - 02:10 PM
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
// If the user pressed a key that's in the ListBox, remove it
// and then make the game a little faster
if (listBox1.Items.Contains(e.KeyCode))
{
listBox1.Items.Remove(e.KeyCode);
listBox1.Refresh();
if (timer1.Interval > 400)
timer1.Interval -= 10;
if (timer1.Interval > 250)
timer1.Interval -= 7;
if (timer1.Interval > 100)
timer1.Interval -= 2;
DifficultyProgressbar.Value = 800 - timer1.Interval;
// The user pressed a correct key, so update the Stats object
// by calling its Update() method with the argument true
stats.Update(true);
}
else
{
// The user pressed an incorrect key, so update the Stats object
// by calling its Update() method with the argument false
stats.Update(false);
}
// Update the labels on the StatusStrip
Correctlabel.Text = "Correct: " + stats.Correct;
Missedlabel.Text = "Missed: " + stats.Missed;
Totallabel.Text = "Total: " + stats.Total;
Accuracylabel.Text = "Accuracy: " + stats.Accuracy + "%";
}
}
}
Posted 05 April 2013 - 11:52 AM