Google日历ExtendedProperty由用户填写

时间:2014-09-09 13:04:21

标签: vb.net google-calendar-api

简短问题: 我有一个谷歌日历,其中约会由vb.net程序输入。我正在使用ExtendedProperty将值填充到变量中。但如果谷歌用户可以填写这个值,那将会容易得多。

长问题:我需要知道这个约会是否需要在会计软件中采取进一步行动。因此,如果用户能够在此谷歌预约中告知:"是,如果订单已完成,请致电客户#34;然后我就能找到这个约会并采取行动。 我正在使用newEvent.ContentContent变量,但这是错误的,因为用户需要填写: 是#和电话客户端如果订单准备就绪#

    Private Function GoogleAgendaAanmaken(ByVal GoogleEmail As String, ByVal GooglePassword As String, _
                         ByVal Titel As String, ByVal Omschr As String, ByVal Locatie As String, _
                         ByVal StartTijd As DateTime) As String

    GoogleAgendaAanmaken = ""
    Dim Id As String = Guid.NewGuid().ToString()

    Try

        Dim serv As CalendarService = GAuthenticate(GoogleEmail, GooglePassword)

        Dim newEvent As New Google.GData.Calendar.EventEntry
        newEvent.Title.Text = Titel
        newEvent.Content.Content = Omschr

        Dim Waar As New Google.GData.Extensions.Where()
        Waar.ValueString = Locatie
        newEvent.Locations.Add(Waar)

        Dim newTime As New Google.GData.Extensions.When()
        newTime.StartTime = StartTijd
        newTime.EndTime = DateAdd(DateInterval.Minute, 30, StartTijd)
        newEvent.Times.Add(newTime)

        Dim oExtendedProperty As New ExtendedProperty()
        oExtendedProperty.Name = "SynchronizationID"
        oExtendedProperty.Value = Id
        newEvent.ExtensionElements.Add(oExtendedProperty)

        Dim oExtendedProperty2 As New ExtendedProperty()
        oExtendedProperty2.Name = "Unit4Acties"
        oExtendedProperty2.Value = "JA"
        newEvent.ExtensionElements.Add(oExtendedProperty2)


        Dim newatom As AtomEntry
        Dim uri As New Uri("https://www.google.com/calendar/feeds/" & GoogleEmail & "/private/full")
        newatom = serv.Insert(uri, newEvent)
        GoogleAgendaAanmaken = Id

    Catch ex As Exception
        Call MessageBox.Show(ex.Message)
    End Try

    Return GoogleAgendaAanmaken

End Function

我想知道是否有可能改变" Unit4Acties"的价值。在谷歌日历本身,由用户?

提前致谢, 布莱恩

1 个答案:

答案 0 :(得分:0)

不可以,只能使用API​​写入扩展属性。