Menu

Diff of /trunk/GoogleContactsSync/AppointmentSync.cs [r386] .. [r387]  Maximize  Restore

Switch to side-by-side view

--- a/trunk/GoogleContactsSync/AppointmentSync.cs
+++ b/trunk/GoogleContactsSync/AppointmentSync.cs
@@ -71,7 +71,7 @@
             slave.Locations.Add(location);
 
             slave.Times.Clear();
-            if (!master.IsRecurring)
+            if (!master.IsRecurring || master.RecurrenceState != Outlook.OlRecurrenceState.olApptMaster)
                 slave.Times.Add(new Google.GData.Extensions.When(master.Start, master.End, master.AllDayEvent));
             ////slave.StartInStartTimeZone = master.StartInStartTimeZone;
             ////slave.StartTimeZone = master.StartTimeZone;
@@ -353,7 +353,7 @@
                 if (masterRecurrence.PatternEndDate.Date != outlookDateMin &&
                     masterRecurrence.PatternEndDate.Date != outlookDateMax)
                 {
-                    slaveRecurrence.Value += ";" + UNTIL + "=" + masterRecurrence.PatternEndDate.Date.AddDays(1).AddMinutes(-1).ToString(format);
+                    slaveRecurrence.Value += ";" + UNTIL + "=" + masterRecurrence.PatternEndDate.Date.AddDays(master.AllDayEvent?0:1).ToString(dateFormat);
                 }
                 //else if (masterRecurrence.Occurrences > 0)
                 //{
@@ -623,6 +623,10 @@
                         {
                             //slave.Times.Add(new Google.GData.Extensions.When(exception.AppointmentItem.Start, exception.AppointmentItem.Start, exception.AppointmentItem.AllDayEvent));
                             var googleRecurrenceException = new EventEntry();
+                            googleRecurrenceException.OriginalEvent = new OriginalEvent();
+                            googleRecurrenceException.OriginalEvent.IdOriginal = slave.EventId;
+                            //googleRecurrenceException.OriginalEvent.Href = ???
+                            googleRecurrenceException.OriginalEvent.OriginalStartTime = new When(exception.OriginalDate, exception.OriginalDate.AddMinutes(exception.AppointmentItem.Duration), exception.AppointmentItem.AllDayEvent);
                             sync.UpdateAppointment(exception.AppointmentItem, ref googleRecurrenceException);
                             //googleRecurrenceExceptions.Add(googleRecurrenceException);
                             ret = true;
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.