Imports Web_Browser_2.frmBrowser
Public Class fmrChrono
Private Sub fmrChrono_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim F As Favorite
Dim L As ListViewItem
Dim S(1) As String
For Each F In Chronos
S(0) = F.Name
S(1) = F.URL
L = New ListViewItem(S)
lstChronos.Items.Add(L)
Next
End Sub
Private Sub cmdRemoveSelected_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRemoveSelected.Click
If MsgBox("Procedere all'eliminazione?", MsgBoxStyle.Question + vbYesNo) = MsgBoxResult.No Then
Exit Sub
End If
Dim L As ListViewItem
Dim I As Int16 = 0
For Each L In lstChronos.Items
If L.Checked Then
Chronos.RemoveAt(I)
End If
I += 1
Next
lstChronos.Items.Clear()
'Riempe la lista con gli elementi rimasti
Dim S(1) As String
Dim F As Favorite
For Each F In Chronos
S(0) = F.Name
S(1) = F.URL
L = New ListViewItem(S)
lstChronos.Items.Add(L)
Next
RefreshChronos()
MsgBox("Eliminazione completata!", MsgBoxStyle.Information)
End Sub
Private Sub cmdRemoveAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRemoveAll.Click
If MsgBox("Procedere all'eliminazione?", MsgBoxStyle.Question + vbYesNo) = MsgBoxResult.No Then
Exit Sub
End If
lstChronos.Items.Clear()
Chronos.Clear()
Web_Browser_2.frmBrowser.strChrono.DropDownItems.Clear()
End Sub
End Class