public void start_scan() { Mutex scan_Mutex = new Mutex(); scan_Mutex.WaitOne(); ScanReport Scaning = new ScanReport(); //ScanSession ini = new ScanSession(); for (int i = 0; i < Info.Count(); i++) { string file_path = Info[i]; bool type_scan = type[i]; string save_time; int count_vir = 0; save_time = Get_Time(); file_step(file_path); if (vir_path != null && vir_type != null) { count_vir++; Scaning.insert_Report(inintScan(type_scan), save_time, Get_Time(), scaned_files, scaned_objects, count_vir, vir_type, vir_path); vir_path = null; vir_type = null; } ScanReportsRepository inserter = new ScanReportsRepository(); inserter.insert(Scaning); } scan_Mutex.ReleaseMutex(); }
private void button11_Click(object sender, EventArgs e) { ScanReportsRepository scanReportsRepository = new ScanReportsRepository(); string str = scanReportsRepository.read(); string word = null; for (int i = 0; i < str.Length; i++) { while (str[i] != '\n') { if (str[i] != '\r') { word = word + str[i]; } else { word = word + ", "; } i++; } listBox2.Items.Add(word); word = " "; } }