Example #1
0
 void ClearValues()
 {
     processed       = 0;
     total           = ofFiles.FileNames.Length;
     prgStatus.Value = 0;
     dgList.Rows.Clear();
     sdataset = null;
 }
Example #2
0
        private void btnLoad_Click(object sender, EventArgs e)
        {
            OpenFileDialog of = new OpenFileDialog();

            if (of.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            if (sdataset == null)
            {
                sdataset = new StaticDataset();
            }
            sdataset.Clear();
            sdataset.Load(of.FileName);
        }
Example #3
0
 public FormScanner()
 {
     mFiles = new List <string>();
     bFiles = new List <string>();
     StaticAnalysis.OnAnalysisComplete           += s => sdataset = s;
     StaticAnalysis.OnHistogramOfImportsComplete += s => HistogramOfImports = s;
     StaticAnalysis.OnFileAnalyzed += (f, b) =>
     {
         lock (ofFiles)
             this.Invoke(new MethodInvoker(new Action(() =>
             {
                 processed++;
                 prgStatus.Value = (int)(100 * processed / total);
                 dgList.Rows.Add(processed, f, b ? "Success" : "Fail");
                 dgList.FirstDisplayedScrollingRowIndex = dgList.RowCount - 1;
             })));
     };
     InitializeComponent();
 }