void worker_DoWork(object sender, DoWorkEventArgs e) { FileComparer.Scan.DirectoryScanner sourceScanner = new FileComparer.Scan.DirectoryScanner(txtSource.Text); FileComparer.Scan.DirectoryScanner destScanner = new FileComparer.Scan.DirectoryScanner(txtDest.Text); sourceScanner.ScanDirectory(sourceScanner.SourceDirectory); destScanner.ScanDirectory(destScanner.SourceDirectory); FileComparer.Compare.FileComparer fileComparer = new FileComparer.Compare.FileComparer(sourceScanner.ScannedInfo, destScanner.ScannedInfo); fileComparer.LeftOverLocation = txtLeftOvers.Text; fileComparer.OnComparisonCompleted += new FileComparer.Compare.ComparisonCompletionHandler(fileComparer_OnComparisonCompleted); fileComparer.Compare(); }
static void Main(string[] args) { FileComparer.Scan.DirectoryScanner sourceScanner = new FileComparer.Scan.DirectoryScanner(args[0]); FileComparer.Scan.DirectoryScanner destScanner = new FileComparer.Scan.DirectoryScanner(args[1]); sourceScanner.ScanDirectory(sourceScanner.SourceDirectory); destScanner.ScanDirectory(destScanner.SourceDirectory); FileComparer.Compare.FileComparer fileComparer = new FileComparer.Compare.FileComparer(sourceScanner.ScannedInfo, destScanner.ScannedInfo); fileComparer.LeftOverLocation = ""; fileComparer.OnComparisonCompleted += new FileComparer.Compare.ComparisonCompletionHandler(fileComparer_OnComparisonCompleted); fileComparer.Compare(); }