-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCheckedListBoxItem.vb
55 lines (46 loc) · 1.38 KB
/
CheckedListBoxItem.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
Public Class CheckedListBoxItem
Private _state As CheckState = CheckState.Indeterminate
Private _item As Object
Private _description As String
Public Sub New()
Me.New(Nothing)
End Sub
Public Sub New(ByVal description As String)
Me.New(description, description)
End Sub
Public Sub New(ByVal item As Object, ByVal description As String)
Me.New(item, description, CheckState.Indeterminate)
End Sub
Public Sub New(ByVal item As Object, ByVal description As String, ByVal state As CheckState)
Me.state = state
Me.item = item
Me.description = description
End Sub
Public Overridable Property item() As Object
Get
Return _item
End Get
Set(ByVal value As Object)
_item = value
End Set
End Property
Public Property description() As String
Get
Return _description
End Get
Set(ByVal value As String)
_description = value
End Set
End Property
Public Property state() As CheckState
Get
Return _state
End Get
Set(ByVal value As CheckState)
_state = value
End Set
End Property
Public Overrides Function ToString() As String
Return description
End Function
End Class