Open SupaStid opened 9 months ago
Apologies again - I know I'm doing this wrong in CalendarStoreWindows
public async Task<string> CreateEvent(string calendarId, string title, string description,
string location, DateTimeOffset startDateTime, DateTimeOffset endDateTime,
bool isAllDay = false, bool hasAlarm = false, int AlarmMins = 0)
{
await EnsureWriteCalendarPermission();
var platformCalendarManager = await GetAppointmentStore(true)
.ConfigureAwait(false);
var platformCalendar = await platformCalendarManager
.GetAppointmentCalendarAsync(calendarId)
.AsTask().ConfigureAwait(false);
var eventToSave = new Appointment
{
Subject = title,
Details = description,
Location = location,
StartTime = startDateTime.LocalDateTime,
Duration = endDateTime.Subtract(startDateTime),
AllDay = isAllDay,
};
if (hasAlarm)
{
eventToSave.Reminder = new TimeSpan(0, AlarmMins, 0);
}
await platformCalendar.SaveAppointmentAsync(eventToSave)
.AsTask().ConfigureAwait(false);
return eventToSave.LocalId;
}
Apologies - very new to this and this is my first ever github input
public interface ICalendarStore
Add or change CreateEvent with 2 extra parameters
so the Modification CalaendarStoremacios.cs is
And in CalaendarStore.android.cs