-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUserViewModel.vb
110 lines (86 loc) · 3 KB
/
UserViewModel.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
109
110
Imports DevExpress.Mvvm
Imports DevExpress.Mvvm.DataAnnotations
Imports DXDocumentUIServiceSample.Common
Imports System
Imports System.Collections.ObjectModel
Imports System.ComponentModel
Namespace DXDocumentUIServiceSample.ViewModel
Public Interface IDocumentContent
Sub OnClose(e As CancelEventArgs)
Sub OnDestroy()
End Interface
Public Class UserViewModel
Inherits ViewModelBase
Implements IDocumentContent
Public Property ID() As Integer
Get
Return GetValue(Of Integer)()
End Get
Set(ByVal value As Integer)
SetValue(value)
End Set
End Property
Public Property NickName() As String
Get
Return GetValue(Of String)()
End Get
Set(ByVal value As String)
SetValue(value)
End Set
End Property
Public Property Registration() As DateTime
Get
Return GetValue(Of DateTime)()
End Get
Set(ByVal value As DateTime)
SetValue(value)
End Set
End Property
Public Property Rating() As Decimal
Get
Return GetValue(Of Decimal)()
End Get
Set(ByVal value As Decimal)
SetValue(value)
End Set
End Property
Public Property GlobalUserActivity() As ObservableCollection(Of ActionsPerMonth)
Get
Return GetValue(Of ObservableCollection(Of ActionsPerMonth))()
End Get
Set(ByVal value As ObservableCollection(Of ActionsPerMonth))
SetValue(value)
End Set
End Property
Public Property LocalUserActivity() As ObservableCollection(Of ActionsPerMonth)
Get
Return GetValue(Of ObservableCollection(Of ActionsPerMonth))()
End Get
Set(ByVal value As ObservableCollection(Of ActionsPerMonth))
SetValue(value)
End Set
End Property
<Command>
Public Sub Close()
DocumentOwner.Close(CType(Me, DevExpress.Mvvm.IDocumentContent), False)
End Sub
#Region "IDocumentContent"
Public Property DocumentOwner() As IDocumentOwner
Public Sub OnClose(ByVal e As System.ComponentModel.CancelEventArgs)
End Sub
Public Sub OnDestroy()
End Sub
Private Sub IDocumentContent_OnClose(e As CancelEventArgs) Implements IDocumentContent.OnClose
Throw New NotImplementedException()
End Sub
Private Sub IDocumentContent_OnDestroy() Implements IDocumentContent.OnDestroy
Throw New NotImplementedException()
End Sub
Public ReadOnly Property Title() As Object
Get
Return String.Format("{1} ({2})", ID, NickName, Registration.ToShortDateString())
End Get
End Property
#End Region
End Class
End Namespace