-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHistory.vb
62 lines (46 loc) · 1.88 KB
/
History.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Public Class History
Private Sub History_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
ListBox1.Items.Clear()
Dim c As Integer = My.Settings.History.Count
Dim x As Integer
For x = 0 To c - 1
ListBox1.Items.Add(My.Settings.History.Item(x))
Next
Catch ex As Exception
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form1.wb.Navigate(ListBox1.SelectedItem)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Try
Try
Dim item As Integer = My.Settings.History.IndexOf(ListBox1.SelectedItem)
My.Settings.History.RemoveAt(item)
ListBox1.Items.Remove(ListBox1.SelectedItem)
My.Settings.Save()
Catch ex As Exception
End Try
Catch ex As Exception
End Try
End Sub
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Form1.wb.Navigate(ListBox1.SelectedItem)
End Sub
Private Sub DeleteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Try
Try
Dim item As Integer = My.Settings.History.IndexOf(ListBox1.SelectedItem)
My.Settings.History.RemoveAt(item)
ListBox1.Items.Remove(ListBox1.SelectedItem)
My.Settings.Save()
Catch ex As Exception
End Try
Catch ex As Exception
End Try
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ListBox1.Items.Clear()
End Sub
End Class