Dim range1 As New TimeRange() With { _
Key .Start = New TimeSpan(8, 0, 0), _
Key .[End] = New TimeSpan(12, 0, 0) _
}
Dim range2 As New TimeRange() With { _
Key .Start = New TimeSpan(13, 0, 0), _
Key .[End] = New TimeSpan(17, 0, 0) _
}
If dataManager.Settings.DaysOfWeek Is Nothing Then
dataManager.Settings.DaysOfWeek = _
New ScheduleDaysOfWeek()
End If
If dataManager.Settings.DaysOfWeek.Friday Is Nothing Then
dataManager.Settings.DaysOfWeek.Friday = _
New ScheduleDayOfWeek()
End If
If dataManager.Settings.DaysOfWeek.Friday.DaySettings Is Nothing Then
dataManager.Settings.DaysOfWeek.Friday.DaySettings = _
New DaySettings()
End If
dataManager.Settings.DaysOfWeek.Friday.DaySettings. _
IsWorkday = True
dataManager.Settings.DaysOfWeek.Friday.DaySettings. _
WorkingHours.Add(range1)
dataManager.Settings.DaysOfWeek.Friday.DaySettings. _
WorkingHours.Add(range2)