Changeset 1068


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:

Location:
Scheduling/trunk/cs/bsdx0200GUISourceCode
Files:
5 edited

Legend:

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

    r1039 r1068  
    490490            this.calendarGrid1.TabIndex = 2;
    491491            this.calendarGrid1.TimeScale = 20;
    492             this.calendarGrid1.CGAppointmentAdded += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded);
    493             this.calendarGrid1.CGAppointmentChanged += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentChanged);
    494             this.calendarGrid1.CGSelectionChanged += new IndianHealthService.ClinicalScheduling.CGSelectionChangedHandler(this.calendarGrid1_CGSelectionChanged);
     492            this.calendarGrid1.CGAppointmentAdded += new CalendarGrid.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded);
     493            this.calendarGrid1.CGAppointmentChanged += new CalendarGrid.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentChanged);
     494            this.calendarGrid1.CGSelectionChanged += new CalendarGrid.CGSelectionChangedHandler(this.calendarGrid1_CGSelectionChanged);
    495495            this.calendarGrid1.DoubleClick += new System.EventHandler(this.calendarGrid1_DoubleClick);
    496496            //
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointmentChangedArgs.cs

    r622 r1068  
    33    using System;
    44    /// <summary>
    5     /// This class was regenerated from Calendargrid.dll using Reflector.exe
    6     /// by Sam Habiel for WorldVista. The original source code is lost.
     5    /// Custom event args for CGAppointment events when changing appointments.
     6    /// More documentation when I totally understand it.
     7    /// I changed it to automatic properties.
    78    /// </summary>
    89    [Serializable]
    910    public class CGAppointmentChangedArgs : EventArgs
    1011    {
    11         private DateTime m_dEnd;
    12         private DateTime m_dStart;
    13         private int m_nAccessTypeID;
    14         private int m_nSlots;
    15         private CGAppointment m_pAppt;
    16         private string m_sOldResource;
    17         private string m_sResource;
     12        public int AccessTypeID {get; set;}
    1813
    19         public int AccessTypeID
    20         {
    21             get
    22             {
    23                 return this.m_nAccessTypeID;
    24             }
    25             set
    26             {
    27                 this.m_nAccessTypeID = value;
    28             }
    29         }
     14        public CGAppointment Appointment {get; set;}
    3015
    31         public CGAppointment Appointment
    32         {
    33             get
    34             {
    35                 return this.m_pAppt;
    36             }
    37             set
    38             {
    39                 this.m_pAppt = value;
    40             }
    41         }
     16        public DateTime EndTime {get; set;}
    4217
    43         public DateTime EndTime
    44         {
    45             get
    46             {
    47                 return this.m_dEnd;
    48             }
    49             set
    50             {
    51                 this.m_dEnd = value;
    52             }
    53         }
     18        public string OldResource {get; set;}
    5419
    55         public string OldResource
    56         {
    57             get
    58             {
    59                 return this.m_sOldResource;
    60             }
    61             set
    62             {
    63                 this.m_sOldResource = value;
    64             }
    65         }
     20        public string Resource {get; set;}
    6621
    67         public string Resource
    68         {
    69             get
    70             {
    71                 return this.m_sResource;
    72             }
    73             set
    74             {
    75                 this.m_sResource = value;
    76             }
    77         }
     22        public int Slots {get; set;}
    7823
    79         public int Slots
    80         {
    81             get
    82             {
    83                 return this.m_nSlots;
    84             }
    85             set
    86             {
    87                 this.m_nSlots = value;
    88             }
    89         }
    90 
    91         public DateTime StartTime
    92         {
    93             get
    94             {
    95                 return this.m_dStart;
    96             }
    97             set
    98             {
    99                 this.m_dStart = value;
    100             }
    101         }
     24        public DateTime StartTime {get; set;}
    10225    }
    10326}
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAvailability.cs

    r622 r1068  
    214214            }
    215215        }
     216
     217        public override string ToString()
     218        {
     219            return ResourceList + " (" + Slots + ") @ " + StartTime;
     220        }
    216221    }
    217222}
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CGSelectionChangedArgs.cs

    r622 r1068  
    33    using System;
    44    /// <summary>
    5     /// This class was regenerated from Calendargrid.dll using Reflector.exe
    6     /// by Sam Habiel for WorldVista. The original source code is lost.
     5    /// Custom Event Args for SelectionChange. Don't know totally what it does yet.
     6    /// Changed to automatic properties.
    77    /// </summary>
    88    [Serializable]
    99    public class CGSelectionChangedArgs : EventArgs
    1010    {
    11         private DateTime m_dEnd;
    12         private DateTime m_dStart;
    13         private string m_sResource;
     11        public DateTime EndTime {get; set;}
    1412
    15         public DateTime EndTime
    16         {
    17             get
    18             {
    19                 return this.m_dEnd;
    20             }
    21             set
    22             {
    23                 this.m_dEnd = value;
    24             }
    25         }
     13        public string Resource {get; set;}
    2614
    27         public string Resource
    28         {
    29             get
    30             {
    31                 return this.m_sResource;
    32             }
    33             set
    34             {
    35                 this.m_sResource = value;
    36             }
    37         }
    38 
    39         public DateTime StartTime
    40         {
    41             get
    42             {
    43                 return this.m_dStart;
    44             }
    45             set
    46             {
    47                 this.m_dStart = value;
    48             }
    49         }
     15        public DateTime StartTime {get; set;}
    5016    }
    5117}
  • 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.