'Imports Stax.UI

'Public Class TreePageControl
'    Inherits UserControl

'#Region " Designer "

'    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
'        If disposing Then
'            If Not (components Is Nothing) Then
'                components.Dispose()
'            End If
'        End If
'        MyBase.Dispose(disposing)
'    End Sub

'    Private components As System.ComponentModel.IContainer
'    Friend WithEvents UserControlProxy As UserControlProxy

'    Friend WithEvents tv As ExtendedTreeView
'    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
'        Me.tv = New Stax.UI.ExtendedTreeView
'        Me.UserControlProxy = New UserControlProxy
'        Me.SuspendLayout()
'        '
'        'tv
'        '
'        Me.tv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
'                    Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
'        Me.tv.HideSelection = False
'        Me.tv.Location = New System.Drawing.Point(0, 0)
'        Me.tv.Name = "tv"
'        Me.tv.PathSeparator = "/"
'        Me.tv.Scrollable = False
'        Me.tv.SelectOnMouseDown = True
'        Me.tv.ShowPlusMinus = False
'        Me.tv.Size = New System.Drawing.Size(144, 302)
'        Me.tv.TabIndex = 0
'        '
'        'UserControlProxy
'        '
'        Me.UserControlProxy.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
'                    Or System.Windows.Forms.AnchorStyles.Left) _
'                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
'        Me.UserControlProxy.Location = New System.Drawing.Point(151, 0)
'        Me.UserControlProxy.Name = "UserControlProxy"
'        Me.UserControlProxy.Size = New System.Drawing.Size(225, 304)
'        Me.UserControlProxy.TabIndex = 1
'        '
'        'TreePageControl
'        '
'        Me.Controls.Add(Me.UserControlProxy)
'        Me.Controls.Add(Me.tv)
'        Me.Name = "TreePageControl"
'        Me.Size = New System.Drawing.Size(376, 304)
'        Me.ResumeLayout(False)

'    End Sub

'#End Region

'    Private Types As New Dictionary(Of TreeNode, Type)

'    Public Sub New()
'        MyBase.New()
'        InitializeComponent()
'    End Sub

'    Public Sub AddPage(ByVal path As String, ByVal controlType As Type)
'        Types(TreeViewHelp.AddNode(path, tv)) = controlType
'    End Sub

'    Public Sub ShowPage(ByVal t As Type)
'        For Each i As TreeNode In Types.Keys
'            If Types(i) Is t Then
'                tv.SelectedNode = i
'            End If
'        Next
'    End Sub

'    Public Sub ShowPage(ByVal node As TreeNode)
'        Dim dc As DialogControl = CType(UserControlProxy.ShowUserControl(Types(node)), DialogControl)
'        dc.Caption = node.Text
'    End Sub

'    Private Sub tv_BeforeCollapse(ByVal sender As Object, ByVal e As TreeViewCancelEventArgs) Handles tv.BeforeCollapse
'        e.Cancel = True
'    End Sub

'    Public Sub ExpandNodes()
'        tv.ExpandAll()
'    End Sub

'    Public Function GetRecent() As String
'        If tv.SelectedNode Is Nothing Then
'            Return ""
'        Else
'            Return tv.SelectedNode.FullPath
'        End If
'    End Function

'    Public Sub ShowRecent(ByVal path As String)
'        For Each i As TreeNode In Types.Keys
'            If i.FullPath = path Then
'                tv.SelectedNode = i
'            End If
'        Next
'    End Sub

'    Private Sub tv_AfterSelect(ByVal sender As Object, ByVal e As TreeViewEventArgs) Handles tv.AfterSelect
'        ShowPage(e.Node)
'    End Sub
'End Class