public void Pause() { if (IsPlaying()) { isPaused = true; if (timer != null && timer.IsRunning()) { timer.Pause(); } } }