internal override LocalizedString When()
 {
     if (Recurrence.IsGregorianCompatible(this.CalendarType))
     {
         if (base.RecurrenceInterval == 1)
         {
             if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
             {
                 return(ClientStrings.CalendarWhenMonthlyThEveryMonth(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek)));
             }
             return(ClientStrings.TaskWhenMonthlyThEveryMonth(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek)));
         }
         else if (base.RecurrenceInterval == 2)
         {
             if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
             {
                 return(ClientStrings.CalendarWhenMonthlyThEveryOtherMonth(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek)));
             }
             return(ClientStrings.TaskWhenMonthlyThEveryOtherMonth(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek)));
         }
         else
         {
             if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
             {
                 return(ClientStrings.CalendarWhenMonthlyThEveryNMonths(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), base.RecurrenceInterval));
             }
             return(ClientStrings.TaskWhenMonthlyThEveryNMonths(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), base.RecurrenceInterval));
         }
     }
     else if (base.RecurrenceInterval == 1)
     {
         if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
         {
             return(ClientStrings.AlternateCalendarWhenMonthlyThEveryMonth(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek)));
         }
         return(ClientStrings.AlternateCalendarTaskWhenMonthlyThEveryMonth(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek)));
     }
     else if (base.RecurrenceInterval == 2)
     {
         if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
         {
             return(ClientStrings.AlternateCalendarWhenMonthlyThEveryOtherMonth(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek)));
         }
         return(ClientStrings.AlternateCalendarTaskWhenMonthlyThEveryOtherMonth(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek)));
     }
     else
     {
         if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
         {
             return(ClientStrings.AlternateCalendarWhenMonthlyThEveryNMonths(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), base.RecurrenceInterval));
         }
         return(ClientStrings.AlternateCalendarTaskWhenMonthlyThEveryNMonths(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), base.RecurrenceInterval));
     }
 }
 internal override LocalizedString When()
 {
     if (Recurrence.IsGregorianCompatible(this.CalendarType))
     {
         if (base.RecurrenceInterval == 1)
         {
             if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
             {
                 return(ClientStrings.CalendarWhenMonthlyEveryMonth(this.DayOfMonth));
             }
             return(ClientStrings.TaskWhenMonthlyEveryMonth(this.DayOfMonth));
         }
         else if (base.RecurrenceInterval == 2)
         {
             if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
             {
                 return(ClientStrings.CalendarWhenMonthlyEveryOtherMonth(this.DayOfMonth));
             }
             return(ClientStrings.TaskWhenMonthlyEveryOtherMonth(this.DayOfMonth));
         }
         else
         {
             if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
             {
                 return(ClientStrings.CalendarWhenMonthlyEveryNMonths(this.DayOfMonth, base.RecurrenceInterval));
             }
             return(ClientStrings.TaskWhenMonthlyEveryNMonths(this.DayOfMonth, base.RecurrenceInterval));
         }
     }
     else if (base.RecurrenceInterval == 1)
     {
         if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
         {
             return(ClientStrings.AlternateCalendarWhenMonthlyEveryMonth(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth));
         }
         return(ClientStrings.AlternateCalendarTaskWhenMonthlyEveryMonth(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth));
     }
     else if (base.RecurrenceInterval == 2)
     {
         if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
         {
             return(ClientStrings.AlternateCalendarWhenMonthlyEveryOtherMonth(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth));
         }
         return(ClientStrings.AlternateCalendarTaskWhenMonthlyEveryOtherMonth(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth));
     }
     else
     {
         if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
         {
             return(ClientStrings.AlternateCalendarWhenMonthlyEveryNMonths(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth, base.RecurrenceInterval));
         }
         return(ClientStrings.AlternateCalendarTaskWhenMonthlyEveryNMonths(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth, base.RecurrenceInterval));
     }
 }
Example #3
0
 protected void DemoteRecurrenceProperties(Recurrence recurrence)
 {
     if (recurrence == null)
     {
         return;
     }
     if (Recurrence.IsGregorianCompatible(base.Context.Type))
     {
         this.DemoteRecurrenceProperties(recurrence, "RRULE", "EXDATE");
         return;
     }
     this.DemoteRecurrenceProperties(recurrence, "X-MICROSOFT-RRULE", "X-MICROSOFT-EXDATE");
 }
        internal override LocalizedString When()
        {
            LocalizedString result;

            if (Recurrence.IsGregorianCompatible(this.CalendarType))
            {
                if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
                {
                    result = ClientStrings.CalendarWhenYearly(new LocalizedMonth(this.month), this.DayOfMonth);
                }
                else
                {
                    result = ClientStrings.TaskWhenYearly(new LocalizedMonth(this.month), this.DayOfMonth);
                }
            }
            else if (this.IsLeapMonth)
            {
                if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
                {
                    result = ClientStrings.AlternateCalendarWhenYearlyLeap(Recurrence.GetCalendarName(this.CalendarType), this.month, this.DayOfMonth);
                }
                else
                {
                    result = ClientStrings.AlternateCalendarTaskWhenYearlyLeap(Recurrence.GetCalendarName(this.CalendarType), this.month, this.DayOfMonth);
                }
            }
            else if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
            {
                result = ClientStrings.AlternateCalendarWhenYearly(Recurrence.GetCalendarName(this.CalendarType), this.month, this.DayOfMonth);
            }
            else
            {
                result = ClientStrings.AlternateCalendarTaskWhenYearly(Recurrence.GetCalendarName(this.CalendarType), this.month, this.DayOfMonth);
            }
            return(result);
        }
Example #5
0
        internal override LocalizedString When()
        {
            LocalizedString result;

            if (Recurrence.IsGregorianCompatible(this.CalendarType))
            {
                if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
                {
                    result = ClientStrings.CalendarWhenYearlyTh(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), new LocalizedMonth(this.Month));
                }
                else
                {
                    result = ClientStrings.TaskWhenYearlyTh(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), new LocalizedMonth(this.Month));
                }
            }
            else if (this.IsLeapMonth)
            {
                if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
                {
                    result = ClientStrings.AlternateCalendarWhenYearlyThLeap(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), this.Month);
                }
                else
                {
                    result = ClientStrings.AlternateCalendarTaskWhenYearlyThLeap(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), this.Month);
                }
            }
            else if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence)
            {
                result = ClientStrings.AlternateCalendarWhenYearlyTh(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), this.Month);
            }
            else
            {
                result = ClientStrings.AlternateCalendarTaskWhenYearlyTh(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), this.Month);
            }
            return(result);
        }