Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click Private Sub tvFolderTree_AfterSelect(ByVal sender As System.Object, ByVal e As ) Handles tvFolderTree.AfterSelect NewTreeNode.Text = listing.GetDatumAsString(i, SystemColumn.DisplayName) If listing.GetDatumAsString(i, SystemColumn.EntryType).ToLower = "folder" Then ' Listing should never get anything other than folder, but will check anyway Using listing As FolderListing = LFFold.OpenFolderListing(entrySetting, 1000)ĭim rowCount As Integer = listing.RowsCount SFullPath = sFullPath.Replace(sFullPath.Substring(0, sFullPath.IndexOf("\")), "")ĭim LFFold As FolderInfo = Folder.GetFolderInfo(sFullPath, myLFSession)ĭim entrySetting As New EntryListingSettings()ĮntrySetting.EntryFilter = EntryTypeFilter.FoldersĮntrySetting.AddColumn(SystemColumn.EntryType)ĮntrySetting.AddColumn(SystemColumn.DisplayName) ' Remove repository name from path for LF use Private Sub tvFolderTree_AfterExpand(sender As System.Object, e As ) Handles tvFolderTree.AfterExpandĭim sFullPath As String = e.Node.FullPath 'Do not use empty user name for LF Auth (if that is what was passed)
' Use blank User and Password for WinAuth MyLFSession.ApplicationName = Application.ProductName ' Only process if LFDatabase object is nothingĭim LFRepo As New RepositoryRegistration(lfserv, sRepo) Private Sub LFLogin(sServer As String, sRepo As String, bWinAuth As Boolean, Optional sUser As String = "admin", Optional sPW As String = "") ' Only process if LFDatabase object is not nothing Public WriteOnly Property bLFWinAuth() As Boolean Public WriteOnly Property LFPassword() As String Public WriteOnly Property LFUserName() As String Public WriteOnly Property LFRepositoryName() As String Public WriteOnly Property LFServerName() As String Public ReadOnly Property Path() As String Public ReadOnly Property EntryId() As Integer ' Dim _EntryID As Integer = myBrowser.EntryId ' 'and/or _EntryID = to selected folder Entry ID ' 'If OK was clicked, set _Path = to selected folder path ' Dim myBrowser As New PFTBrowser(sLFServerName, sLFRepositoryName, bLFWinAuth, sLFUserName, sLFPassword) ' provide valid LF server, repository, windows authentication, ' To use this item, instantiate using the keyword New and ' displaying the LF Folder structure, and a TableLayoutPanel
' This Dialog Window is made up of a panel and treeview for
'** Copyright © Paper Free Technology 2008 **
Here is the code for the PFTBrowse Dialog form: Now place a TreeView object anywhere inside the panel and name it tvFolderTree. Add a Panel (its name does not matter) to the Dialog form and set it to cover most of the form. In your VB project, add an new Dialog item (I named mine PFTBrowser). Here I will share an RA based folder browser/picker. I have shared a folder picker in the past based on LFSO.