gpt4 book ai didi

c# - 如何从 Windows Phone 8.1 中的设备日历中删除约会

转载 作者:太空宇宙 更新时间:2023-11-03 15:48:11 25 4
gpt4 key购买 nike

当我尝试通过我的应用程序从设备日历中删除一个事件时,它显示错误

错误信息:

An exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.ni.dll but was not handled in user code

Additional information: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

请看下面我用于删除操作的代码

 AppointmentStore appointmentStore = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AppCalendarsReadWrite);
AppointmentCalendar sysCal = await appointmentStore.GetAppointmentCalendarAsync(dCalendarID);
await sysCal.DeleteAppointmentAsync(dCalendarEventID);

任何人对此有任何想法请帮助我。谢谢

最佳答案

您是否有权使用日历?在应用程序 list 文件 WMAppManifest.xml 中查找 ID_CAP_APPOINTMENTS

关于c# - 如何从 Windows Phone 8.1 中的设备日历中删除约会,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27171046/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com