void link_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { if (e.Uri.AbsoluteUri == "about:bass") { BeatDetector.ShowAbout(); } else { Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri)); } e.Handled = true; }
private void StartStopBeatDetect() { if (_beatDetectEnabled) { if (_beatDetector != null) { _beatDetector.Stop(); _beatDetector = null; } _beatDetector = new BeatDetector(); _beatDetector.OnBeat += delegate { _dispatcher.BeginInvoke(new Action(_beatDetector_OnBeat), DispatcherPriority.SystemIdle, null); }; _beatDetector.Start(_audioDevice); } else { if (_beatDetector != null) { _beatDetector.Stop(); _beatDetector = null; } } }