Exemplo n.º 1
0
        protected virtual void BeforeProcessing()
        {
            // Check PDF path
            if (!PdfPath.isFilePathOK(".pdf"))
            {
                throw new System.IO.FileNotFoundException(String.Concat("File not found: ", PdfPath));
            }

            // Open Logger
            try { myLogger = new Logger(String.Concat(System.IO.Path.GetDirectoryName(PdfPath), "\\ErrorLog.txt")); }
            catch
            {
                throw;
            }

            // Start Timer
            timer = new Stopwatch();
            timer.Start();

            // Start counter at 0
            counter = 0;

            if (Bw == null)
            {
                throw new ArgumentNullException("Background Worker is null");
            }
        }