|
Re: Getting date into VB.NET: msg#00228org.google.api.calendar
I have a C# sample app, calendar.cs in samples, that goes over the feed, get's all the startdates, and creates an array of dates to put into the calendarcontrol (bolded dates). Below code tries to do the same? Here is the C# snippet. ArrayList dates = new ArrayList(50); EventQuery query = new EventQuery(); CalendarService service = new CalendarService("CalendarSampleApp"); if (userName != null && userName.Length > 0) { service.setUserCredentials(userName, passWord); } // only get event's for today - 1 month until today + 1 year query.Uri = new Uri(calendarURI); query.StartTime = DateTime.Now.AddDays(-28); query.EndTime = DateTime.Now.AddMonths(6); EventFeed calFeed = service.Query(query); // now populate the calendar while (calFeed != null && calFeed.Entries.Count > 0) { // look for the one with dinner time... foreach (EventEntry entry in calFeed.Entries) { this.entryList.Add(entry); if (entry.Times.Count > 0) { foreach (When w in entry.Times ) { dates.Add(w.StartTime); } } } // just query the same query again. query.Uri = new Uri(calFeed.NextChunk); calFeed = service.Query(query); } DateTime[] aDates = new DateTime[dates.Count]; int i =0; foreach (DateTime d in dates) { aDates[i++] = d; } this.calendarControl.BoldedDates = aDates;
On 9/26/06, Rienco <djrienco@xxxxxxxxx> wrote:
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Calendar Data API" group. To post to this group, send email to google-calendar-help-dataapi@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to google-calendar-help-dataapi-unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/google-calendar-help-dataapi -~----------~----~----~----~------~----~------~--~--- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Getting date into VB.NET: 00228, Rienco |
|---|---|
| Next by Date: | Re: Ruby Library: 00228, sanj |
| Previous by Thread: | Re: Getting date into VB.NETi: 00228, Rienco |
| Next by Thread: | add an entry with javascript: 00228, reverend |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |