protected virtual void SetDataSource(AsynchronousCollectionBase dataSource) { AsynchronousCollectionBase oldDataSource = DataSource; AsynchronousCollectionBase newDataSource = dataSource; DataSource = dataSource; IsDataSourceInitialized = DataSource != null; if (oldDataSource != null) { oldDataSource.LoadingCompleted -= OnDataSourceOnLoadingCompleted; } if (newDataSource != null) { newDataSource.LoadingCompleted += OnDataSourceOnLoadingCompleted; if (newDataSource.IsLoadingCompleted) { OnDataSourceOnLoadingCompleted(newDataSource, EventArgs.Empty); } } if (IsDataSourceInitialized) { if (DataSourceInitialized != null) { DataSourceInitialized(this, newDataSource); } } else { if (DataSourceUninitialized != null) { DataSourceUninitialized(this, oldDataSource); } } }
protected override void SetDataSource(AsynchronousCollectionBase dataSource) { if (DataSource != null) { ((INotifyPropertyChanged)DataSource).PropertyChanged -= OnDataSourcePropertyChanged; } base.SetDataSource(dataSource); if (DataSource != null) { ((INotifyPropertyChanged)DataSource).PropertyChanged += OnDataSourcePropertyChanged; } }
void OnLoadingCompleted(DataSourceManagerBase sender, AsynchronousCollectionBase dataSource) { SetIsSettingsEnabled(true); }
void OnDataSourceUninitialized(DataSourceManagerBase sender, AsynchronousCollectionBase oldDataSource) { SetIsSettingsEnabled(false); }
public Enumerator(AsynchronousCollectionBase owner) : base(owner) { }
public EnumeratorBase(AsynchronousCollectionBase owner) { this.owner = owner; this.index = -1; current = null; }
void OnLoadingCompleted(DataSourceManagerBase sender, AsynchronousCollectionBase dataSource) { EnableGrid(); }
void OnDataSourceManagerDataSourceUninitialized(DataSourceManagerBase sender, AsynchronousCollectionBase oldDataSource) { DisableGrid(); }