public AppViewModel() { DBSearch = new a7DbSearchEngine(); HierarchyExplorer = new a7HierarchyExplorer(); FileSearch = new a7FileSearch(); FileSearch.DBSearch = DBSearch; }
void dbSearch_AcutalizedWork(object sender, a7DbSearchEngine.DBSearchEventArgs e) { this.tbProgress.Dispatcher.Invoke( new Action( () => { this.tbProgress.Text = "Table:" + e.ActualAnalizedTable + "(" + e.ActualTable + "/" + e.TableCount + ")" + ", Value:" + "(" + e.ActualTableValue + "/" + e.ValuesCount + ")" + e.ActualAnalizedValue; } ) ); this.pbProgress.Dispatcher.Invoke( new Action( () => { this.pbProgress.Value = ((double)(((double)e.ValuesCount * e.ActualTable) - (e.ValuesCount - e.ActualTableValue)) / ((double)e.TableCount * e.ValuesCount)) * 100; } ) ); }
void dbSearch_Finished(object sender, a7DbSearchEngine.DBSearchFinishedEventArgs e) { this.tbProgress.Dispatcher.Invoke(new Action(() => { this.tbNotFoundItems.Text = e.NotUsedValuesList; tiDBResults.IsSelected = true; } )); }