private void newgame_MouseDown(object sender, MouseButtonEventArgs e) { newgame.Visibility = Visibility.Hidden; DoubleAnimation da = new DoubleAnimation(); da.Duration = TimeSpan.FromSeconds(3); da.From = 1; da.To = 0; da.Completed += new EventHandler(da_Completed); MenuField.BeginAnimation(Grid.OpacityProperty, da); newgame.Visibility = Visibility.Hidden; a = 3; b = 3; hitCount = 0; HitCount.Content = hitCount; lab1.Content = a; }
private void Expanim_Completed(object sender, EventArgs e) { pa.Visibility = Visibility.Hidden; a = b; if (b == 0) { newgame.Visibility = Visibility.Visible; MenuField.Visibility = Visibility.Visible; DoubleAnimation da = new DoubleAnimation(); da.From = 0; da.To = 1; da.Duration = TimeSpan.FromSeconds(2); MenuField.BeginAnimation(Grid.OpacityProperty, da); Score2.Content = hitCount; Score1.Visibility = Visibility.Visible; Score2.Visibility = Visibility.Visible; } ifHit = false; }