void CallbackMethod(IAsyncResult ar) { ScanExeDelegate del = (ScanExeDelegate)ar.AsyncState; if (del != null) { //int res = del.EndInvoke(ar); //Console.WriteLine(res.ToString()); } if (--disksCount == 0) { Console.WriteLine("*******FINISH***********FINISH************FINISH***********"); exeFiles.Sort( (a, b) => { if (a.FullName.CompareTo(b.FullName) > 0) { return(1); } else { return(-1); } }); Console.WriteLine("****SORTFINISH*********SORTFINISH********SORTFINISH******"); progressBar.Dispatcher.Invoke( new Action(() => { progressBar.Visibility = System.Windows.Visibility.Hidden; labal.Content = "***SCAN FINISHED***"; } )); } }
public MainWindow() { InitializeComponent(); progressBar.IsIndeterminate = true; FillListBox(); scanExeDelegate = ScanExeFull; //scanExeDelegate += SecondMet; finishScanDelegate = FinishScan; Fill(); }
public MainWindow() { InitializeComponent(); progressBar.IsIndeterminate = true; FillListBox(); scanExeDelegate = ScanExeFull; //scanExeDelegate += SecondMet; finishScanDelegate = FinishScan; Fill(); }