This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
XtraForm1.vb
66 lines (57 loc) · 2.59 KB
/
XtraForm1.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
Imports DevExpress.XtraScheduler
Imports DevExpress.XtraScheduler.UI
Imports System
Namespace E558
Partial Public Class XtraForm1
Inherits AppointmentRecurrenceForm
Public Sub New(ByVal pattern As Appointment, ByVal fdow As FirstDayOfWeek, ByVal afc As AppointmentFormController)
MyBase.New(pattern, fdow, afc)
'InitializeComponent();
checkEdit1.Tag = RecurrenceType.Hourly
UnsubscribeRecurrenceTypeControlsEvents()
SubscribeRecurrenceTypeControlsEvents()
SetRecurrenceType(Me.GetRecurrenceType())
End Sub
Protected Overrides Sub InitializeControls(ByVal firstDayOfWeek As FirstDayOfWeek)
InitializeComponent()
MyBase.InitializeControls(firstDayOfWeek)
End Sub
Protected Overrides Sub SubscribeRecurrenceTypeControlsEvents()
MyBase.SubscribeRecurrenceTypeControlsEvents()
If checkEdit1 IsNot Nothing Then
AddHandler checkEdit1.EditValueChanged, AddressOf chkRecurrenceTypeChanged
End If
End Sub
Protected Overrides Sub UnsubscribeRecurrenceTypeControlsEvents()
MyBase.UnsubscribeRecurrenceTypeControlsEvents()
If checkEdit1 IsNot Nothing Then
RemoveHandler checkEdit1.EditValueChanged, AddressOf chkRecurrenceTypeChanged
End If
End Sub
Protected Overrides Sub ChangeCurrentRecurrenceControl()
If Me.CurrentRecurrenceControl IsNot Nothing Then
Me.CurrentRecurrenceControl.Visible = False
End If
Select Case Me.GetRecurrenceType()
Case RecurrenceType.Daily
Me.CurrentRecurrenceControl = Me.dailyRecurrenceControl1
Case RecurrenceType.Weekly
Me.CurrentRecurrenceControl = Me.weeklyRecurrenceControl1
Case RecurrenceType.Monthly
Me.CurrentRecurrenceControl = Me.monthlyRecurrenceControl1
Case RecurrenceType.Hourly
Me.CurrentRecurrenceControl = Me.hourRecurrenceControl1
Case Else
Me.CurrentRecurrenceControl = Me.yearlyRecurrenceControl1
End Select
Me.CurrentRecurrenceControl.Visible = True
End Sub
Protected Overrides Sub SetRecurrenceType(ByVal type As RecurrenceType)
If type = RecurrenceType.Hourly AndAlso checkEdit1 IsNot Nothing Then
checkEdit1.Checked = True
Return
End If
MyBase.SetRecurrenceType(type)
End Sub
End Class
End Namespace