-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDurationViewModel.vb
80 lines (76 loc) · 2.23 KB
/
DurationViewModel.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
Imports System.ComponentModel
Public Class DurationViewModel
Implements INotifyPropertyChanged
Private _Name As String
Public Property Name As String
Get
Return _Name
End Get
Set(value As String)
_Name = value
DoPropertyChanged("Name")
End Set
End Property
Private _Hourly As Boolean
Public Property Hourly As Boolean
Get
Return _Hourly
End Get
Set(value As Boolean)
_Hourly = value
DoPropertyChanged("Hourly")
End Set
End Property
Private _Daily As Boolean
Public Property Daily As Boolean
Get
Return _Daily
End Get
Set(value As Boolean)
_Daily = value
DoPropertyChanged("Daily")
End Set
End Property
Private _Weekly As Boolean
Public Property Weekly As Boolean
Get
Return _Weekly
End Get
Set(value As Boolean)
_Weekly = value
DoPropertyChanged("Weekly")
End Set
End Property
Private _Monthly As Boolean
Public Property Monthly As Boolean
Get
Return _Monthly
End Get
Set(value As Boolean)
_Monthly = value
DoPropertyChanged("Monthly")
End Set
End Property
Public Sub New(name As String, frequency As Integer, hourly As Boolean, daily As Boolean, weekly As Boolean, monthly As Boolean)
Me.Name = name
Me.Frequency = frequency
Me.Hourly = hourly
Me.Daily = daily
Me.Weekly = weekly
Me.Monthly = monthly
End Sub
Private _Frequency As Integer
Public Property Frequency As Integer
Get
Return _Frequency
End Get
Set(value As Integer)
_Frequency = value
DoPropertyChanged("Frequency")
End Set
End Property
Public Sub DoPropertyChanged(name As String)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(name))
End Sub
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
End Class