private void Progress_Shown(object sender, EventArgs e) { ds = new DuplicateScanner(TargetFolder, UpdateUI); ds.OnFinishedProcessing += new DuplicateScanner.SwitchWindowHandler(ds_OnFinishedProcessing); }