Skip to content

Commit

Permalink
imp - Show events in ShowCalendars demo
Browse files Browse the repository at this point in the history
---

Currently, it doesn't list anything, and we'll find out why.

---

Type: imp
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Oct 2, 2024
1 parent 95144eb commit b74b671
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions VisualCard.ShowCalendars/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ static void Main(string[] args)
TextWriterColor.Write("Calendar UUID: {0}", Calendar.UniqueId);
TextWriterColor.Write("Calendar events: {0} event(s)", Calendar.Events.Length);

// List events
foreach (var eventInfo in Calendar.Events)
{
var summaries = eventInfo.GetString(CalendarStringsEnum.Summary);
var descriptions = eventInfo.GetString(CalendarStringsEnum.Description);
if (summaries.Length > 0)
TextWriterColor.Write("Event summary: {0}", summaries[0]);
if (descriptions.Length > 0)
TextWriterColor.Write("Event description: {0}", descriptions[0]);
}

// Print VCalendar
string raw = Calendar.SaveToString();
TextWriterColor.WriteColor(
Expand Down

0 comments on commit b74b671

Please sign in to comment.