Ejemplo n.º 1
0
 private void LogFileWatcher_Renamed(object sender, RenamedEventArgs e)
 {
     if (ProgramHelper.IsTemporaryFormat(e.OldFullPath) && ProgramHelper.IsCompressedFormat(e.FullPath))
     {
         AddDelayed(e.FullPath);
     }
 }
Ejemplo n.º 2
0
 private void LogFileWatcher_Created(object sender, FileSystemEventArgs e)
 {
     if (ProgramHelper.IsSupportedFormat(e.FullPath))
     {
         AddDelayed(e.FullPath);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Invoked when a BackgroundWorker begins working.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BgWorkerDoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker bg      = sender as BackgroundWorker;
            GridRow          rowData = e.Argument as GridRow;

            e.Result = rowData;
            _runningCount++;
            _anyRunning = true;
            ProgramHelper.DoWork(rowData);
        }
Ejemplo n.º 4
0
        private void ParseLog(object logFile)
        {
            GridRow row = new GridRow(logFile as string, "Ready to parse")
            {
                BgWorker = new System.ComponentModel.BackgroundWorker()
                {
                    WorkerReportsProgress = true
                }
            };

            try
            {
                ProgramHelper.DoWork(row);
            }
            catch (CancellationException ex)
            {
                Console.WriteLine(ex.InnerException != null ? ex.InnerException.Message : ex.Message);
            }
            catch (Exception)
            {
                Console.WriteLine("Something terrible has happened");
            }
        }