private void HandleLoaded(object sender, RoutedEventArgs e) { if (_clockSource != null) { _clockSource.Dispose(); } _clockSource = null; if (!this.IsInDesignMode()) { _clockSource = new AudioClockDivider(_audioLink, METER_REFRESH_FREQ, id => HandleControlClockTick()); } }
public void Dispose() { if (_clockSource != null) { _clockSource.Dispose(); } }