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