Exemplo n.º 1
0
        void processor_ProcessingAnalysis(object sender, AnalysisCompletedEventArgs e)
        {
            // This is a thread safe thing here.  We can never access the GUI elements except from the
            // thread that created it...STA.
            if (InvokeRequired)
            {
                Invoke(new EventHandler <AnalysisCompletedEventArgs>(processor_ProcessingAnalysis), sender, e);
                return;
            }

            UpdateAnalysisView(e.Analysis);
        }
Exemplo n.º 2
0
        void processor_AnalysisCompleted(object sender, AnalysisCompletedEventArgs e)
        {
            // This is a thread safe thing here.  We can never access the GUI elements except from the
            // thread that created it...STA.
            if (InvokeRequired)
            {
                Invoke(new EventHandler <AnalysisCompletedEventArgs>(processor_AnalysisCompleted), sender, e);
                return;
            }

            OnStatus(string.Format("...Analysis {0}/{1} completed: {2}", e.Number, e.Total, e.Analysis.Name));
            DisplayScansVsNet(e.Analysis);
            UpdateAnalysisView(e.Analysis);

            if (AnalysisCompleted != null)
            {
                AnalysisCompleted(sender, e);
            }

            mprogress_analysis.Visible = true;
            mprogress_analysis.Minimum = 0;
            mprogress_analysis.Maximum = e.Total;
            mprogress_analysis.Value   = e.Number;
        }