-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUserViewModel.cs
More file actions
48 lines (43 loc) · 1.57 KB
/
UserViewModel.cs
File metadata and controls
48 lines (43 loc) · 1.57 KB
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
using DevExpress.Mvvm;
using DevExpress.Mvvm.DataAnnotations;
using DXDocumentUIServiceSample.Common;
using System;
using System.Collections.ObjectModel;
namespace DXDocumentUIServiceSample.ViewModel {
public class UserViewModel : ViewModelBase, IDocumentContent {
public int ID {
get { return GetValue<int>(); }
set { SetValue(value); }
}
public string NickName {
get { return GetValue<string>(); }
set { SetValue(value); }
}
public DateTime Registration {
get { return GetValue<DateTime>(); }
set { SetValue(value); }
}
public decimal Rating {
get { return GetValue<decimal>(); }
set { SetValue(value); }
}
public ObservableCollection<ActionsPerMonth> GlobalUserActivity {
get { return GetValue<ObservableCollection<ActionsPerMonth>>(); }
set { SetValue(value); }
}
public ObservableCollection<ActionsPerMonth> LocalUserActivity {
get { return GetValue<ObservableCollection<ActionsPerMonth>>(); }
set { SetValue(value); }
}
[Command]
public void Close() {
DocumentOwner.Close(this, false);
}
#region IDocumentContent
public IDocumentOwner DocumentOwner { get; set; }
public void OnClose(System.ComponentModel.CancelEventArgs e) { }
public void OnDestroy() { }
public object Title { get { return $"{NickName} ({Registration.ToShortDateString()})"; } }
#endregion
}
}