-
Notifications
You must be signed in to change notification settings - Fork 0
/
RestrictionsViewModel.vb
46 lines (34 loc) · 1.36 KB
/
RestrictionsViewModel.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
Imports System.Collections.ObjectModel
Imports DevExpress.Mvvm.POCO
Namespace WpfApplication1
Public Class RestrictionsViewModel
Private ReadOnly data As SampleDataGenerator = New SampleDataGenerator()
Protected Sub New()
AppointmentsPerDay = 10
DayCount = 2
ResourceCount = 3
End Sub
Public Overridable ReadOnly Property Appointments As ObservableCollection(Of AppointmentData)
Get
Return data.Appointments
End Get
End Property
Public Overridable ReadOnly Property Resources As ObservableCollection(Of ResourceData)
Get
Return data.Resources
End Get
End Property
Public Overridable Property AppointmentsPerDay As Integer
Public Overridable Property DayCount As Integer
Public Overridable Property ResourceCount As Integer
Protected Sub OnDayCountChanged()
data.SetUp(DayCount, ResourceCount, AppointmentsPerDay)
End Sub
Protected Sub OnResourceCountChanged()
data.SetUp(DayCount, ResourceCount, AppointmentsPerDay)
End Sub
Public Shared Function Create() As RestrictionsViewModel
Return ViewModelSource.Create(Function() New RestrictionsViewModel())
End Function
End Class
End Namespace