-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml.vb
108 lines (101 loc) · 2.68 KB
/
MainWindow.xaml.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Imports Microsoft.VisualBasic
Imports System
Imports System.Windows
Imports DevExpress.Xpf.Grid
Namespace TreeListView_UnboundMode
''' <summary>
''' Interaction logic for MainWindow.xaml
''' </summary>
Partial Public Class MainWindow
Inherits Window
Public Sub New()
InitializeComponent()
BuildTree()
treeListView1.ExpandAllNodes()
End Sub
Private Sub BuildTree()
Dim rootNode As TreeListNode = CreateRootNode(New ProjectObject() With {.Name = "Project: Stanton", .Executor = "Nicholas Llams"})
Dim childNode As TreeListNode = CreateChildNode(rootNode, New StageObject() With {.Name = "Information Gathering", .Executor = "Ankie Galva"})
CreateChildNode(childNode, New TaskObject() With {.Name = "Design", .Executor = "Reardon Felton", .State = "In progress"})
End Sub
Private Function CreateRootNode(ByVal dataObject As Object) As TreeListNode
Dim rootNode As New TreeListNode(dataObject)
treeListView1.Nodes.Add(rootNode)
Return rootNode
End Function
Private Function CreateChildNode(ByVal parentNode As TreeListNode, ByVal dataObject As Object) As TreeListNode
Dim childNode As New TreeListNode(dataObject)
parentNode.Nodes.Add(childNode)
Return childNode
End Function
End Class
Public Class StageObject
Private privateName As String
Public Property Name() As String
Get
Return privateName
End Get
Set(ByVal value As String)
privateName = value
End Set
End Property
Private privateExecutor As String
Public Property Executor() As String
Get
Return privateExecutor
End Get
Set(ByVal value As String)
privateExecutor = value
End Set
End Property
End Class
Public Class ProjectObject
Private privateName As String
Public Property Name() As String
Get
Return privateName
End Get
Set(ByVal value As String)
privateName = value
End Set
End Property
Private privateExecutor As String
Public Property Executor() As String
Get
Return privateExecutor
End Get
Set(ByVal value As String)
privateExecutor = value
End Set
End Property
End Class
Public Class TaskObject
Private privateName As String
Public Property Name() As String
Get
Return privateName
End Get
Set(ByVal value As String)
privateName = value
End Set
End Property
Private privateExecutor As String
Public Property Executor() As String
Get
Return privateExecutor
End Get
Set(ByVal value As String)
privateExecutor = value
End Set
End Property
Private privateState As String
Public Property State() As String
Get
Return privateState
End Get
Set(ByVal value As String)
privateState = value
End Set
End Property
End Class
End Namespace