public int Compare(CalendarVisual x, CalendarVisual y)
        {
            FreeBusyVisual freeBusyVisual  = (FreeBusyVisual)x;
            FreeBusyVisual freeBusyVisual2 = (FreeBusyVisual)y;

            return(freeBusyVisual.FreeBusyIndex - freeBusyVisual2.FreeBusyIndex);
        }
        private void MapVisualsY()
        {
            long ticks = ((DateTime)this.dayFreeBusy.DateRange.Start).Ticks;
            long num   = ((DateTime)this.dayFreeBusy.DateRange.End).Ticks - ticks;

            for (int i = 0; i < this.dayFreeBusy.Count; i++)
            {
                FreeBusyVisual freeBusyVisual = (FreeBusyVisual)this.dayFreeBusy[i];
                freeBusyVisual.FreeBusyIndex = this.dataSource.GetWrappedBusyType(freeBusyVisual.DataIndex);
                if (freeBusyVisual.FreeBusyIndex == BusyTypeWrapper.Unknown)
                {
                    freeBusyVisual.FreeBusyIndex = BusyTypeWrapper.Free;
                }
                ExDateTime startTime = this.dataSource.GetStartTime(freeBusyVisual.DataIndex);
                ExDateTime endTime   = this.dataSource.GetEndTime(freeBusyVisual.DataIndex);
                long       num2      = ((DateTime)startTime).Ticks - ticks;
                long       num3      = ((DateTime)endTime).Ticks - ticks;
                int        num4      = (this.parentView.TimeStripMode == TimeStripMode.FifteenMinutes) ? 96 : 48;
                double     num5      = (double)num2 * (double)num4 / (double)num;
                freeBusyVisual.Rect.Y = Math.Floor(num5);
                if (freeBusyVisual.Rect.Y < 0.0)
                {
                    freeBusyVisual.Rect.Y = 0.0;
                    num5 = 0.0;
                }
                double a = (double)num3 * (double)num4 / (double)num;
                freeBusyVisual.Rect.Height = Math.Ceiling(a) - num5;
                if (freeBusyVisual.Rect.Y + freeBusyVisual.Rect.Height > (double)num4)
                {
                    freeBusyVisual.Rect.Height = (double)num4 - freeBusyVisual.Rect.Y;
                }
            }
        }
        // Token: 0x0600013D RID: 317 RVA: 0x0000A034 File Offset: 0x00008234
        private void TransformRolledUpFreeBusyVisuals(int iDay)
        {
            ArrayList arrayList = null;

            this.rowFreeBusy[iDay] = new BusyTypeWrapper[24 * ((this.timeStripMode == TimeStripMode.FifteenMinutes) ? 4 : 2)];
            BusyTypeWrapper[]       array = this.rowFreeBusy[iDay];
            FreeBusyVisualContainer freeBusyVisualContainer = this.rolledUpFreeBusy[iDay];

            for (int i = 0; i < freeBusyVisualContainer.Count; i++)
            {
                FreeBusyVisual freeBusyVisual = (FreeBusyVisual)freeBusyVisualContainer[i];
                if (!base.IsItemRemoved(freeBusyVisual.DataIndex))
                {
                    int num = 0;
                    while ((double)num < freeBusyVisual.Rect.Height)
                    {
                        if (array[(int)freeBusyVisual.Rect.Y + num] < freeBusyVisual.FreeBusyIndex)
                        {
                            array[(int)freeBusyVisual.Rect.Y + num] = freeBusyVisual.FreeBusyIndex;
                        }
                        num++;
                    }
                }
            }
            if (base.DataSource != null)
            {
                int             num2            = 0;
                int             num3            = 1;
                BusyTypeWrapper busyTypeWrapper = array[num2];
                for (int j = 1; j < array.Length; j++)
                {
                    if (array[j] == busyTypeWrapper)
                    {
                        num3++;
                    }
                    else
                    {
                        if (arrayList == null)
                        {
                            arrayList = new ArrayList();
                        }
                        arrayList.Add(new FreeBusyVisual(0)
                        {
                            FreeBusyIndex = busyTypeWrapper,
                            Rect          =
                            {
                                Y      = (double)num2,
                                Height = (double)num3
                            }
                        });
                        num2            = j;
                        num3            = 1;
                        busyTypeWrapper = array[j];
                    }
                }
                if (arrayList == null)
                {
                    arrayList = new ArrayList();
                }
                arrayList.Add(new FreeBusyVisual(0)
                {
                    FreeBusyIndex = busyTypeWrapper,
                    Rect          =
                    {
                        Y      = (double)num2,
                        Height = (double)num3
                    }
                });
                this.transformedRolledUpFreeBusy[iDay] = arrayList;
            }
        }