private void OnTimeSourceChanged(TimeSource oldSource, TimeSource newSource) { if (oldSource != null) { newSource.ProgressChanged -= SourceOnProgressChanged; } if (newSource != null) { newSource.ProgressChanged += SourceOnProgressChanged; } }
private void TimeSourceChanged(TimeSource oldTimeSource, TimeSource newTimeSource) { if (oldTimeSource != null) { oldTimeSource.ProgressChanged -= TimeSource_ProgressChanged; } if (newTimeSource != null) { newTimeSource.ProgressChanged += TimeSource_ProgressChanged; TimeSource_ProgressChanged(newTimeSource, newTimeSource.Progress); } }