private void OnDataSourceReplaced(DataSource prevDataSource, DataSource currDataSource) { heightDataSource = null; if (prevDataSource != null) { prevDataSource.Changed -= OnDataSourceChanged; } if (currDataSource != null) { currDataSource.Changed += OnDataSourceChanged; heightDataSource = new VectorToMagnitudeDataSource(currDataSource); } UpdateUI(); }
private void OnDataSourceReplaced(DataSource prevDataSource, DataSource currDataSource) { heightDataSource = null; if (prevDataSource != null) { prevDataSource.Changed -= OnDataSourceChanged; } if (currDataSource != null) { currDataSource.Changed += OnDataSourceChanged; heightDataSource = new VectorToMagnitudeDataSource(currDataSource); } UpdateUI(); }