Private Sub LeftExplorer_Documen tCompleted ByVal sender As System Obj

 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
Private Sub LeftExplorer_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles LeftExplorer.DocumentCompleted
LeftBack.Enabled = LeftExplorer.CanGoBack
LeftForward.Enabled = LeftExplorer.CanGoForward
Dim Path As String
Path = ClearPath(e.Url.ToString)
LeftAddress.Text = Path
LeftTop.Enabled = True
If Path.EndsWith("\") Then
Path = Path.Substring(0, Path.LastIndexOf("\"))
End If
If Path.Split("\").Count < 2 Then
LeftTop.Enabled = False
End If
If Not Already Then
Synchronize(Tabs.Right, False)
End If
End Sub
Public Sub Synchronize(Optional ByVal Tab As Tabs = Tabs.Left, Optional ByVal Doing As Boolean = False)
If Not Doing Then
Dim OtherPath As String = ""
Dim Left As String = ClearPath(LeftExplorer.Url.ToString)
Dim Right As String = ClearPath(RightExplorer.Url.ToString)
Dim Path As String = ""
Dim Path2 As String = ""
If Tab = Tabs.Left Then
Path = Left
Path2 = Right
ElseIf Tab = Tabs.Right Then
Path = Right
Path2 = Left
End If
If Path.EndsWith("\") Then
Path = Path.Substring(Path.LastIndexOf("\"))
End If
If Path2.EndsWith("\") Then
Path2 = Path2.Substring(Path2.LastIndexOf("\"))
End If
OtherPath = Path.Substring(0, Path.LastIndexOf("\") + 1) & Path2.Substring(Path2.LastIndexOf("\") + 1)
' MsgBox(OtherPath)
If My.Computer.FileSystem.DirectoryExists(OtherPath) Then
Navigate(OtherPath, Tab, False)
End If
End If
End Sub