Ejemplo n.º 1
0
 private void removeButton_Click(object sender, EventArgs e)
 {
     foreach (ListViewItem malware in Class_Antivirus.MalwareList)
     {
         if (malware.Text == "not ransomware")
         {
             Class_Progress.StepCompleted("Ransomware", 5); //step five completed -> Ransomware Event completed
         }
     }
     Class_Antivirus.RemoveAllThreats();
     malwareListBox.Items.Clear(); //delete in UI
 }
Ejemplo n.º 2
0
        private void antivirusScan_BTN_Click(object sender, EventArgs e)
        {
            //When the scan button is clicked, hide the start screen.
            //Show the scanning screen.
            AntiVirus_scanPNL.BringToFront();

            Class_Antivirus.ScanResults();
            Header_LBL.Text += Class_Antivirus.MalwareList.Count(); //display number of threats

            foreach (ListViewItem file in Class_Antivirus.MalwareList)
            {
                malwareListBox.Items.Add(file.Text); //show up in UI
            }

            if (Class_Antivirus.MalwareList.Count() == 0)
            {
                removeButton.Enabled = false;
            }
        }