Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
BunifuCircleProgressbar1.Value = 100 = Conversions.ToString(ListBox1.Items.Count)
Label9.Text = Conversions.ToString(ListBox1.Items.Count)
If Not BunifuCircleProgressbar1.Value = BunifuCircleProgressbar1.Value = 100 Then
Try
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1
TextBox1.Text = ListBox1.SelectedItem.ToString
Catch ex As Exception
End Try
Try
Dim scanbox As New TextBox
Dim read As String = My.Computer.FileSystem.ReadAllText("viruslist.dat")
BunifuCircleProgressbar1. 'делаем увелечение, прирост
Label8.Text = Conversions.ToString(QR.ListBox2.Items.Count)
Label2.Text = Conversions.ToString(BunifuCircleProgressbar1.Value)
scanbox.Text = read.ToString
Dim md5 As MD5CryptoServiceProvider = New MD5CryptoServiceProvider
Dim f As FileStream = New FileStream(ListBox1.SelectedItem, FileMode.Open, FileAccess.Read, FileShare.Read, 8192)
f = New FileStream(ListBox1.SelectedItem, FileMode.Open, FileAccess.Read, FileShare.Read, 8192)
md5.ComputeHash(f)
Dim hash As Byte() = md5.Hash
Dim buff As StringBuilder = New StringBuilder
Dim hashByte As Byte
For Each hashByte In hash
buff.Append(String.Format("{0:X2}", hashByte))
Next
If scanbox.Text.Contains(buff.ToString) Then
QR.ListBox2.Items.Add(ListBox1.SelectedItem)
End If
Catch ex As Exception
End Try
Else
Timer1.Stop()
MsgBox("Сканирование завершено.")
Label9.Text = "0"
Label8.Text = "0"
Label2.Text = "0"
TextBox1.Clear()
BunifuCircleProgressbar1.Value = 0
End If
End Sub