コード例 #1
0
        /// <summary>
        /// Gets the recurrence exceptions.
        /// </summary>
        /// <param name="oRPattern">The o R pattern.</param>
        /// <returns></returns>
        public List <OutlookException> GetRecurrenceExceptions(Outlook.RecurrencePattern oRPattern)
        {
            if (oRPattern == null)
            {
                throw new ArgumentNullException("oRPattern");
            }

            List <OutlookException> retVal = new List <OutlookException>();

            if (this.InvokeRequired)
            {
                Func <Outlook.RecurrencePattern, List <OutlookException> > func = this.GetRecurrenceExceptions;
                retVal = (List <OutlookException>) this.Invoke(func, oRPattern);
            }
            else
            {
                for (int i = 1; i <= oRPattern.Exceptions.Count; i++)
                {
                    Outlook.Exception oException = oRPattern.Exceptions.Item(i);
                    OutlookException  exception  = _factory.Create <OutlookItem>(oException) as OutlookException;
                    if (exception != null)
                    {
                        retVal.Add(exception);
                    }
                }
            }
            return(retVal);
        }
コード例 #2
0
        /// <summary>
        /// Gets the recurrence occurence.
        /// </summary>
        /// <param name="orPattern">The or pattern.</param>
        /// <param name="recurrenceId">The recurrence id.</param>
        /// <returns></returns>
        public OutlookAppointment GetRecurrenceOccurence(Outlook.RecurrencePattern orPattern, DateTime recurrenceId)
        {
            OutlookAppointment retVal = null;

            if (this.InvokeRequired)
            {
                Func <Outlook.RecurrencePattern, DateTime, OutlookAppointment> func = GetRecurrenceOccurence;
                retVal = this.Invoke(func, orPattern, recurrenceId) as OutlookAppointment;
            }
            else
            {
                Outlook._AppointmentItem oOcurrence = orPattern.GetOccurrence(recurrenceId);
                if (oOcurrence != null)
                {
                    retVal = _factory.Create <OutlookItem>(oOcurrence) as OutlookAppointment;
                }
            }
            return(retVal);
        }
コード例 #3
0
        /// <summary>
        /// Gets the recurrence pattern.
        /// </summary>
        /// <param name="oAppItem">The o app item.</param>
        /// <returns></returns>
        public OutlookRecurrencePattern GetRecurrencePattern(Outlook._AppointmentItem oAppItem)
        {
            if (oAppItem == null)
            {
                throw new ArgumentNullException("oAppItem");
            }

            OutlookRecurrencePattern retVal = null;

            if (this.InvokeRequired)
            {
                Func <Outlook.AppointmentItem, OutlookRecurrencePattern> func = GetRecurrencePattern;
                retVal = this.Invoke(func, oAppItem) as OutlookRecurrencePattern;
            }
            else
            {
                Outlook.RecurrencePattern oRecPattern = oAppItem.GetRecurrencePattern();
                if (oRecPattern != null)
                {
                    retVal = _factory.Create <OutlookItem>(oRecPattern) as OutlookRecurrencePattern;
                }
            }
            return(retVal);
        }
コード例 #4
0
 public OutlookRecurrencePattern(OutlookListener outlookListener, Outlook.RecurrencePattern oRecurrPattern)
     : base(outlookListener)
 {
     _oRecurrPattern = oRecurrPattern;
 }
コード例 #5
0
 public OutlookRecurrencePattern(OutlookListener outlookListener, Outlook.RecurrencePattern oRecurrPattern)
     : base(outlookListener)
 {
     _oRecurrPattern = oRecurrPattern;
 }