Пример #1
0
 private void TriggerExtractionEvent(MYPFileEventArgs e)
 {
     if (event_Extraction != null)
     {
         event_Extraction(this, e);
     }
 }
Пример #2
0
 private void TriggerExtractionEvent(MYPFileEventArgs e)
 {
     if (this.event_Extraction == null)
     {
         return;
     }
     this.event_Extraction((object)this, e);
 }
 private void ExtractionEventHandler(object sender, MYPHandler.MYPFileEventArgs e)
 {
     if (label_ExtractionErrors_Text.InvokeRequired)
     {
         Invoke(OnNewExtractedEvent, e);
     }
     else
     {
         TreatExtractionEvent(e);
     }
 }
        /// <summary>
        /// Treat file extraction events in the UI thread
        /// </summary>
        /// <param name="e"></param>
        private void TreatExtractionEvent(MYPHandler.MYPFileEventArgs e)
        {
            switch (e.State)
            {
            case Event_ExtractionType.ExtractionFinished:
            {
                OperationFinished();
                UpdateLabel_OnExtraction(e.Value);
                break;
            }

            case Event_ExtractionType.FileExtractionError:
            {
                statusPB.Value = (int)e.Value;
                UpdateLabel_OnExtractionError(e.Value);
                break;
            }

            case Event_ExtractionType.FileExtracted:
            {
                statusPB.Value = (int)e.Value;
                UpdateLabel_OnExtraction(e.Value);
                break;
            }

            case Event_ExtractionType.Scanning:
            {
                // statusPB.Value += 1; // handled in another place: Update_OnFileTableEvent
                if (scanFiles.Count != 0)
                {
                    CurrentMypFH = new MYPHandler.MYPHandler(scanFiles[0]
                                                             , FileTableEventHandler, ExtractionEventHandler
                                                             , hashDic);

                    MypFHList.Add(scanFiles[0], CurrentMypFH);
                    scanFiles.RemoveAt(0);

                    CurrentMypFH.Pattern = Pattern.Text;
                    t_worker             = new Thread(new ThreadStart(CurrentMypFH.ScanFileTable));
                    t_worker.Start();
                }
                else
                {
                    OperationFinished();
                }
                break;
            }
            }
        }
Пример #5
0
 private void TriggerExtractionEvent(MYPFileEventArgs e)
 {
     if (event_Extraction != null)
     {
         event_Extraction(this, e);
     }
 }