void OnImportDataSourceChanged(IImportDataSource oldValue, IImportDataSource newValue) { if (oldValue != null) { oldValue.CancelBackgroundProcessing(); oldValue.ReleaseTempResources(); } }
void fileExplorerControl1_SourcePathCanged(object sender, EventArgs e) { var path = fileExplorerControl1.SourcePath; if (Directory.Exists(path)) { this.ImportDataSource = new ImportDataSource(Model, path, true); this.filesGridControl.DataSource = this.ImportDataSource.RealtimeSource; this.filesExplorerView.ClearImageLoader(); } }