Changeset 1069 for Scheduling/trunk


Ignore:
Timestamp:
Jan 17, 2011, 9:25:48 AM (14 years ago)
Author:
Sam Habiel
Message:

CGView: Refactor PositionGrid into CalendarGrid.

File:
1 edited

Legend:

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

    r1066 r1069  
    1313{
    1414        /// <summary>
    15         /// Summary description for CGView.
     15        /// Main Form: Shows Tree of Clinics and Calendar Grid
    1616        /// </summary>
    1717        public class CGView : System.Windows.Forms.Form
     
    820820            this.calendarGrid1.TabIndex = 0;
    821821            this.calendarGrid1.TimeScale = 20;
    822             this.calendarGrid1.CGAppointmentAdded += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded);
    823             this.calendarGrid1.CGAppointmentChanged += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentChanged);
    824             this.calendarGrid1.CGSelectionChanged += new IndianHealthService.ClinicalScheduling.CGSelectionChangedHandler(this.calendarGrid1_CGSelectionChanged);
     822            this.calendarGrid1.CGAppointmentAdded += new CalendarGrid.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded);
     823            this.calendarGrid1.CGAppointmentChanged += new CalendarGrid.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentChanged);
     824            this.calendarGrid1.CGSelectionChanged += new CalendarGrid.CGSelectionChangedHandler(this.calendarGrid1_CGSelectionChanged);
    825825            this.calendarGrid1.DoubleClick += new System.EventHandler(this.calendarGrid1_DoubleClick);
    826826            //
     
    14831483
    14841484                                        //Position grid to 0700
    1485                                         PositionGrid(cg, 7);
     1485                                        cg.PositionGrid(7);
    14861486                                }
    14871487                        }
     
    15731573                                cg.TimeScale = nScale;
    15741574
    1575                                 PositionGrid(cg, 7);
     1575                                cg.PositionGrid(7);
    15761576
    15771577                                //Get the OverBook and ModifySchedule permissions from ResourceUser table
     
    16201620                                v.calendarGrid1.Refresh();
    16211621                        }
    1622                 }
    1623 
    1624                 private void PositionGrid(CalendarGrid cg, int nHour)
    1625                 {
    1626                                 //Position grid to nHour
    1627                                 int nRow = 0, nCol = 0;
    1628                                 DateTime dStart = DateTime.Today;
    1629                                 dStart = dStart.AddHours(nHour);
    1630                                 cg.GetCellFromTime(dStart, ref nRow, ref nCol, false, "");
    1631                                 int nHeight = cg.CellHeight + 10;
    1632                                 nHeight *= nRow;
    1633                                 cg.AutoScrollPosition = new Point(50, nHeight);
    1634                                 cg.Invalidate();
    16351622                }
    16361623
     
    24292416                        CalendarGrid cg = this.calendarGrid1;
    24302417                        cg.TimeScale = 10;
    2431                         PositionGrid(cg, 7);
     2418                        cg.PositionGrid(7);
    24322419                }
    24332420
     
    24362423                        CalendarGrid cg = this.calendarGrid1;
    24372424                        cg.TimeScale = 15;
    2438                         PositionGrid(cg, 7);
     2425                        cg.PositionGrid(7);
    24392426                }
    24402427
     
    24432430                        CalendarGrid cg = this.calendarGrid1;
    24442431                        cg.TimeScale = 20;
    2445                         PositionGrid(cg, 7);
     2432                        cg.PositionGrid(7);
    24462433                }
    24472434
     
    24502437                        CalendarGrid cg = this.calendarGrid1;
    24512438                        cg.TimeScale = 30;
    2452                         PositionGrid(cg, 7);
     2439                        cg.PositionGrid(7);
    24532440                }
    24542441
Note: See TracChangeset for help on using the changeset viewer.