Wes Aday has it right...
if (timer1.Enabled == true)
{
}
else
{
}
{
maybe this will help...
private void BeatDetector_Move(object sender, EventArgs e)
{
if (timer1.Enabled == true)
{
if (secs == 0)
{
mins -= 1;
secs = 59;
}
else if (secs == 59)
{
mins += 1;
secs = 0;
}
if (lastLocation.X > BeatDetector.Location.X)
{
secs -= 1;
lastLocation.X = BeatDetector.Location.X;
}
if (lastLocation.X < BeatDetector.Location.X)
{
secs += 1;
lastLocation.X = BeatDetector.Location.X;
}
TimeSong.Text = mins + ":" + secs + " / " + Mins.Text + ":" + Secs.Text;
if (BeatDetector.Location.X == Createlabel().Location.X)
{
if (panel1.Contains(Createlabel()))
{
bool containsLetter = false;
string phoneNumber = Createlabel().Text.Trim();
for (int i = 0; i < phoneNumber.Length; i++)
{
if (!char.IsNumber(phoneNumber[i]))
{
int anInteger;
anInteger = Convert.ToInt32(Createlabel().Text);
anInteger = int.Parse(Createlabel().Text);
move = anInteger;
containsLetter = true;
}
}
if (containsLetter)
{
if (Createlabel().Text == "KICK2")
{
SoundPlayer player = new SoundPlayer(Properties.Resources.KICK2);
player.Play();
}
}
}
}
}
else
{
}
}