大佬教程收集整理的这篇文章主要介绍了vb.net – Google日历活动中缺少弹出式提醒,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一些VBA代码可以创建事件并附加弹出提醒:
If (sEventSetTings.bSetReminder) Then Dim oReminders As New Data.Event.RemindersData() Dim oReminder As New Data.EventReminder() Dim listReminders As IList(Of Data.EventReminder) = New List(Of Data.EventReminder)() oReminder.minutes = sEventSetTings.iSetReminderTime oReminder.Method = "popup" listReminders.Add(oReminder) oReminderS.UseDefault = false oReminders.Overrides = listReminders oEvent.Reminders = oReminders End If
多年来它一直有效.我可以在在线日历中看到类似的内容:
现在,我正在使用Windows 10 / Microsoft Edge,我去看看我的事件,这就是我所看到的:
它已经改变了.如果我手动设置通知,它将只允许电子邮件.弹出提醒发生了什么?
根据Google Calendar Documentation弹出提醒仍然支持.所以我很困惑.
更新
如果查看EventReminder.Method属性的定义:
Namespace Google.Apis.Calendar.v3.Data Public Class EventReminder Implements IDirectResponsescheR_726_11845@a Public Sub New() ' ' SumMary: ' The method used by this reminder. Possible values are: - "email" - Reminders ' are sent via email. - "sms" - Reminders are sent via SMs. these are only available ' for Google Apps for Work,Education,and Government customers. requests to set ' SMS reminders for other account types are ignored. - "popup" - Reminders are ' sent via a UI popup. <JsonProperty("method")> Public Overridable Property Method As String ' ' SumMary: ' number of minutes before the start of the event when the reminder should trigger. ' Valid values are between 0 and 40320 (4 weeks in minutes). <JsonProperty("minutes")> Public Overridable Property minutes As Integer? ' ' SumMary: ' The ETag of the item. Public Overridable Property ETag As String End Class End Namespace
因此,API希望您使用:
>电子邮件
>弹出窗口
>短信
然而,正如我们已经同意的那样,网络浏览器中的Google日历现在已经改变,它不再显示“提醒”部分,而是“通知”部分.对我来说,它列出:
>电子邮件
>通知
因此,我仍然不清楚如何在VB.NET中以编程方式创建事件,并使用相应的弹出提醒.
请求帮助
答案仍然无法帮助我.您无法再创建日历事件并将提醒对象方法设置为“弹出窗口”.似乎必须使用“通知”,我无法弄清楚如何使用V3 API以编程方式执行此操作.
进一步的研究
我手动使用Google Chrome创建了一个日历,并添加了一个活动.然后我添加了一个通知设置为1天.我将此日历导出为ICS格式:
BEGIN:VEVENT DTSTART:20170420T143000Z DTEND:20170420T153000Z DTSTAMP:20170307T102059Z UID:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx CREATED:20170307T102022Z DESCRIPTION:This is a test LAST-MODIFIED:20170307T102045Z LOCATION:Home SEQUENCE:0 STATUS:CONFIRMED SUMMary:Test TRANSP:OPAQUE BEGIN:VALARM ACTION:DISPLAY DESCRIPTION:This is an event reminder trigGER:-P1D END:VALARM END:VEVENT
最后请注意这一点:
BEGIN:VALARM ACTION:DISPLAY DESCRIPTION:This is an event reminder trigGER:-P1D END:VALARM
根据Wikipedia,它声明事件可以有一些VALARM代码.
如果我将此ICS文件导入Microsoft Outlook中的新日历,则将其正确设置为一天:
然而,当我按照我的预期导出我正确的事件时,没有VALARM对象存在.然而,我已正确创建它们:
If (sEventSetTings.bSetReminder) Then Dim oReminders As New Data.Event.RemindersData() Dim oReminder As New Data.EventReminder() Dim listReminders As IList(Of Data.EventReminder) = New List(Of Data.EventReminder)() oReminder.minutes = sEventSetTings.iSetReminderTime oReminder.Method = "popup" listReminders.Add(oReminder) oReminderS.UseDefault = false oReminders.Overrides = listReminders oEvent.Reminders = oReminders End If
他们没有被Google Calendar V3 API所尊重.我认为这里的问题是该功能被破坏了.然后将其从弹出窗口重命名为通知,而不是使用这些弹出警报创建事件的更新支持.我正在使用最新的包管理器下载.几天前我和Google一起提出了一个关于它的issue.
我不相信这是我的错误.鉴于用户群的沉默,我得出结论,没有人实际上使用API来创建事件和设置提醒.或者,可能有其他用户现在已经影响了代码并且不知道此问题.
但如果你知道它,并且可以复制我的问题/或者知道一个实用的解决方案,请告诉我.谢谢.
以上是大佬教程为你收集整理的vb.net – Google日历活动中缺少弹出式提醒全部内容,希望文章能够帮你解决vb.net – Google日历活动中缺少弹出式提醒所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。