Ignore:
Timestamp:
Feb 21, 2011, 9:21:24 AM (13 years ago)
Author:
Sam Habiel
Message:

Remove CGSchedLib.OutputArray everywhere. Used to be needed in VS 2003; not anymore as you can see tables now.
CalendarGrid:

  • Make MinSince80 and TimesOverlap static functions for use by other classes since they are done over and over again.

CGAppointments:

  • Documentation updates

CGAVDocument:

CGDocument:

CGDocumentManager:

CGSchedLib: Lots of Changes

CGView:

  • OnUpdateScheduleCallback now has try catch when it this.Invokes the original form so that it won't crash if the form has been closed before it gets called.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs

    r1083 r1095  
    799799            foreach (CGAvailability availability in this.m_pAvArray)
    800800            {
    801                 if (this.TimesOverlap(availability.StartTime, availability.EndTime, timeFromCell, time2))
     801                if (TimesOverlap(availability.StartTime, availability.EndTime, timeFromCell, time2))
    802802                {
    803803                    nAccessTypeID = availability.AvailabilityType;
     
    842842            foreach (CGAvailability availability in this.m_pAvArray)
    843843            {
    844                 if (this.TimesOverlap(availability.StartTime, availability.EndTime, timeFromCell, time2))
     844                if (TimesOverlap(availability.StartTime, availability.EndTime, timeFromCell, time2))
    845845                {
    846846                    nAccessTypeID = availability.AvailabilityType;
     
    894894        }
    895895
    896         private int MinSince80(DateTime d)
     896        private static int MinSince80(DateTime d)
    897897        {
    898898            DateTime time = new DateTime(1980, 1, 1, 0, 0, 0);
     
    11531153        }
    11541154
    1155         private bool TimesOverlap(DateTime dStart1, DateTime dEnd1, DateTime dStart2, DateTime dEnd2)
     1155        /// <summary>
     1156        /// Do 2 time ranges overlap each other?
     1157        /// </summary>
     1158        /// <param name="dStart1">First Start Time</param>
     1159        /// <param name="dEnd1">First End Time</param>
     1160        /// <param name="dStart2">Second Start Time</param>
     1161        /// <param name="dEnd2">Second End Time</param>
     1162        /// <returns>True or False</returns>
     1163        public static bool TimesOverlap(DateTime dStart1, DateTime dEnd1, DateTime dStart2, DateTime dEnd2)
    11561164        {
    11571165            long ticks = dEnd1.Ticks - dStart1.Ticks;
     
    11651173            rect.Width = 1;
    11661174            rectangle2.Width = 1;
    1167             rect.Y = this.MinSince80(dStart1);
    1168             rect.Height = this.MinSince80(dEnd1) - rect.Y;
    1169             rectangle2.Y = this.MinSince80(dStart2);
    1170             rectangle2.Height = this.MinSince80(dEnd2) - rectangle2.Y;
     1175            rect.Y = MinSince80(dStart1);
     1176            rect.Height = MinSince80(dEnd1) - rect.Y;
     1177            rectangle2.Y = MinSince80(dStart2);
     1178            rectangle2.Height = MinSince80(dEnd2) - rectangle2.Y;
    11711179            return rectangle2.IntersectsWith(rect);
    11721180        }
Note: See TracChangeset for help on using the changeset viewer.