Is there any sample for Schedule Control google calendar sync in VB.NET Winform?
I searched on the website, but I did not found. Can you provide one, please?
Hi Halcyon Security,
We are currently analyzing the possibilities of mentioned scenario. We need time to validate the scenario, we will provide an update on or before March 04, 2024.
Hi Halcyon Security,
We are currently analyzing the possibilities of mentioned scenario. We need time to validate the scenario, we will provide an update on or before March 06, 2024.
Hi Halcyon Security,
Based
on your requirement, we have prepared a sample for Schedule Control with Google
Calendar sync in VB. We have attached the sample for your reference.
Follow the steps mentioned in the MAUI blog below to create a project in Google
Cloud and enable the Google Calendar API.
Blog: Effortless
Google Calendar Events Synchronization in .NET MAUI Scheduler (syncfusion.com)
To sync Google Calendar events with the WinForms schedule control, please refer
to the code snippets provided.
|
Dim data As SimpleScheduleDataProvider Dim dataprovider As ArrayListDataProvider = New Syncfusion.Schedule.ArrayListDataProvider() Dim appointments As IScheduleAppointment = dataprovider.NewScheduleAppointment()
' Initialize the Google Calendar service with the API key Dim service As New CalendarService(New BaseClientService.Initializer() With {.ApiKey = "AIzaSyD9qOEdUHFSsKyBP-VVkW-ffJzl0lTLZt0", .ApplicationName = "Schedular"})
Dim calendarId As String = "en-gb.indian#[email protected]"
' Define a DateTime range to retrieve events Dim startDate As DateTime = DateTime.Now Dim endDate As DateTime = DateTime.Now.AddDays(90)
' Define the request to retrieve events Dim request As EventsResource.ListRequest = service.Events.List(calendarId) request.TimeMin = startDate request.TimeMax = endDate request.ShowDeleted = False
' Execute the calendar service request and retrieve events Dim events As Events = request.Execute() For Each appointment As [Event] In events.Items appointments = dataprovider.NewScheduleAppointment() appointments.StartTime = Convert.ToDateTime(appointment.Start.Date) appointments.EndTime = Convert.ToDateTime(appointment.Start.Date) appointments.Subject = appointment.Summary appointments.ForeColor = Color.Red dataprovider.AddItem(appointments) Next appointment Me.scheduleControl1.DataSource = dataprovider |
Kindly refer the output.
We hope this helps to achieve your requirement. Please let us know, if
need any further assistance.