Dim range1 As New TimeRange() With { _
.Start = New TimeSpan(8, 0, 0), _
.[End] = New TimeSpan(12, 0, 0) _
}
Dim range2 As New TimeRange() With { _
.Start = New TimeSpan(13, 0, 0), _
.[End] = New TimeSpan(17, 0, 0) _
}
If dataManager.Settings Is Nothing Then
dataManager.Settings = New ScheduleSettings()
End If
If dataManager.Settings.WorkingHours Is Nothing Then
dataManager.Settings.WorkingHours = New WorkingHoursCollection()
End If
dataManager.Settings.WorkingHours.Add(range1)
dataManager.Settings.WorkingHours.Add(range2)