Ejemplo n.º 1
0
        public void Check()
        {
            Log.Info("Validating " + filePath);
            DatValidator datValidator = new DatValidator
            {
                DatFile = filePath,
            };

            datValidator.OnValidateStatus   += OnValidateStatus;
            datValidator.OnValidateError    += OnValidateError;
            datValidator.OnValidateComplete += OnValidateComplete;
            datValidator.Validate();
        }
Ejemplo n.º 2
0
        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();
        }