Ignore:
Timestamp:
Jan 17, 2011, 9:12:38 AM (13 years ago)
Author:
Sam Habiel
Message:

CalendarGrid:

  • Added PositionGrid from CGView
  • Added Delegates from other classes that contained just one line.

CGAppointmentChangedArgs & CGSelectionChangedArgs:

  • Changed to use automatic properties

CGAvailability:

File:
1 edited

Legend:

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

    r1065 r1068  
    5454        private const int WM_VSCROLL = 0x115;   // Vertical Scrolling Windows Message
    5555
     56        public delegate void CGAppointmentChangedHandler(object sender, CGAppointmentChangedArgs e);
     57        public event CGAppointmentChangedHandler CGAppointmentChanged;
    5658        public event CGAppointmentChangedHandler CGAppointmentAdded;
    5759
    58         public event CGAppointmentChangedHandler CGAppointmentChanged;
    59 
     60        public delegate void CGSelectionChangedHandler(object sender, CGSelectionChangedArgs e);
    6061        public event CGSelectionChangedHandler CGSelectionChanged;
    6162
     
    11721173        }
    11731174
     1175        public void PositionGrid(int nHour)
     1176        {
     1177            //Position grid to nHour
     1178            int nRow = 0, nCol = 0;
     1179            DateTime dStart = DateTime.Today;
     1180            dStart = dStart.AddHours(nHour);
     1181            this.GetCellFromTime(dStart, ref nRow, ref nCol, false, "");
     1182            int nHeight = this.CellHeight + 10;
     1183            nHeight *= nRow;
     1184            this.AutoScrollPosition = new Point(50, nHeight);
     1185            this.Invalidate();
     1186        }
     1187
     1188
    11741189        /// <summary>
    11751190        /// The purpose of this is to properly draw the date boxes at the top of the calendar grid.
Note: See TracChangeset for help on using the changeset viewer.