コード例 #1
0
        // Token: 0x06002FDC RID: 12252 RVA: 0x0011756C File Offset: 0x0011576C
        private static ExDateTime[] GetViewDaysForMonthlyView(ISessionContext sessionContext, ExDateTime start)
        {
            ExDateTime exDateTime;
            ExDateTime exDateTime2;

            DatePickerBase.GetVisibleDateRange(start, out exDateTime, out exDateTime2, sessionContext.TimeZone);
            ExDateTime[] array = new ExDateTime[42 - exDateTime2.Day / 7 * 7];
            for (int i = 0; i < array.Length; i++)
            {
                array[i] = exDateTime.IncrementDays(i);
            }
            return(array);
        }
コード例 #2
0
        public void GetFreeBusy()
        {
            ExTraceGlobals.CalendarCallTracer.TraceDebug((long)this.GetHashCode(), "DatePickerEventHandler.GetFreeBusy");
            ExDateTime month = (ExDateTime)base.GetParameter("m");

            OwaStoreObjectId[] array;
            if (!base.IsParameterSet("fId"))
            {
                array = new OwaStoreObjectId[]
                {
                    base.UserContext.CalendarFolderOwaId
                };
            }
            else
            {
                array = (OwaStoreObjectId[])base.GetParameter("fId");
                if (array.Length > 5)
                {
                    throw new OwaInvalidRequestException("Too many folders");
                }
                if (array.Length == 0)
                {
                    throw new OwaInvalidRequestException("Must pass at least one folder id");
                }
            }
            ExDateTime exDateTime;
            ExDateTime arg;

            DatePickerBase.GetVisibleDateRange(month, out exDateTime, out arg, base.UserContext.TimeZone);
            Duration timeWindow = new Duration((DateTime)exDateTime, (DateTime)arg.IncrementDays(1));

            ExTraceGlobals.CalendarTracer.TraceDebug <ExDateTime, ExDateTime>((long)this.GetHashCode(), "Getting free/busy data from {0} to {1}", exDateTime, arg);
            string multiCalendarFreeBusyDataForDatePicker = Utilities.GetMultiCalendarFreeBusyDataForDatePicker(timeWindow, array, base.UserContext);

            this.Writer.Write("<div id=fb _m=\"");
            this.Writer.Write(month.Month);
            this.Writer.Write("\" _y=\"");
            this.Writer.Write(month.Year);
            this.Writer.Write("\">");
            Utilities.HtmlEncode(multiCalendarFreeBusyDataForDatePicker, this.Writer);
            this.Writer.Write("</div>");
        }
コード例 #3
0
        protected override void OnLoad(EventArgs e)
        {
            this.selectedDate = (this.startDateTime = Utilities.GetQueryStringParameterDateTime(base.Request, "sd", base.UserContext.TimeZone));
            this.endDateTime  = Utilities.GetQueryStringParameterDateTime(base.Request, "ed", base.UserContext.TimeZone);
            string queryStringParameter = Utilities.GetQueryStringParameter(base.Request, "fid", false);

            if (!string.IsNullOrEmpty(queryStringParameter))
            {
                this.folderId = OwaStoreObjectId.CreateFromString(queryStringParameter);
            }
            if (this.startDateTime < this.endDateTime)
            {
                this.meetingDuration = (int)(this.endDateTime - this.startDateTime).TotalMinutes;
            }
            DatePickerBase.GetVisibleDateRange(this.selectedDate, out this.startDateTime, out this.endDateTime, base.UserContext.TimeZone);
            if (this.selectedDate.TimeOfDay.TotalMinutes < (double)this.WorkingHours.GetWorkDayStartTime(this.selectedDate) || (double)this.WorkingHours.GetWorkDayEndTime(this.selectedDate) <= this.selectedDate.TimeOfDay.TotalMinutes || (double)this.WorkingHours.GetWorkDayEndTime(this.selectedDate) < this.selectedDate.TimeOfDay.TotalMinutes + (double)this.meetingDuration || this.ForceShowing24Hours)
            {
                this.show24Hours = true;
            }
            this.recipientWell = new CalendarItemRecipientWell();
        }