public void Check() { Log.Info("Validating " + filePath); DatValidator datValidator = new DatValidator { DatFile = filePath, }; datValidator.OnValidateStatus += OnValidateStatus; datValidator.OnValidateError += OnValidateError; datValidator.OnValidateComplete += OnValidateComplete; datValidator.Validate(); }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker = (BackgroundWorker)sender; Cursor.Current = Cursors.WaitCursor; string currentFile = this.tbConcordanceFilePath.Text; string outputDir = Path.GetDirectoryName(currentFile); string errorFile = Path.Combine(outputDir, "error.dat"); Log.Info("Validating " + currentFile); DatValidator datValidator = new DatValidator { Worker = worker, DatFile = currentFile, }; datValidator.OnValidateStatus += OnValidateStatus; datValidator.OnValidateError += OnValidateError; datValidator.OnValidateComplete += OnValidateComplete; datValidator.Validate(); }