CalendarGrid:
- Added PositionGrid from CGView - Added Delegates from other classes that contained just one line. CGAppointmentChangedArgs & CGSelectionChangedArgs: - Changed to use automatic properties CGAvailability: - Added override ToString()
This commit is contained in:
parent
36caf08c92
commit
b2d2f1beca
|
@ -489,9 +489,9 @@ namespace IndianHealthService.ClinicalScheduling
|
|||
this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0);
|
||||
this.calendarGrid1.TabIndex = 2;
|
||||
this.calendarGrid1.TimeScale = 20;
|
||||
this.calendarGrid1.CGAppointmentAdded += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded);
|
||||
this.calendarGrid1.CGAppointmentChanged += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentChanged);
|
||||
this.calendarGrid1.CGSelectionChanged += new IndianHealthService.ClinicalScheduling.CGSelectionChangedHandler(this.calendarGrid1_CGSelectionChanged);
|
||||
this.calendarGrid1.CGAppointmentAdded += new CalendarGrid.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded);
|
||||
this.calendarGrid1.CGAppointmentChanged += new CalendarGrid.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentChanged);
|
||||
this.calendarGrid1.CGSelectionChanged += new CalendarGrid.CGSelectionChangedHandler(this.calendarGrid1_CGSelectionChanged);
|
||||
this.calendarGrid1.DoubleClick += new System.EventHandler(this.calendarGrid1_DoubleClick);
|
||||
//
|
||||
// CGAVView
|
||||
|
|
|
@ -2,103 +2,26 @@
|
|||
{
|
||||
using System;
|
||||
/// <summary>
|
||||
/// This class was regenerated from Calendargrid.dll using Reflector.exe
|
||||
/// by Sam Habiel for WorldVista. The original source code is lost.
|
||||
/// Custom event args for CGAppointment events when changing appointments.
|
||||
/// More documentation when I totally understand it.
|
||||
/// I changed it to automatic properties.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CGAppointmentChangedArgs : EventArgs
|
||||
{
|
||||
private DateTime m_dEnd;
|
||||
private DateTime m_dStart;
|
||||
private int m_nAccessTypeID;
|
||||
private int m_nSlots;
|
||||
private CGAppointment m_pAppt;
|
||||
private string m_sOldResource;
|
||||
private string m_sResource;
|
||||
public int AccessTypeID {get; set;}
|
||||
|
||||
public int AccessTypeID
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_nAccessTypeID;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_nAccessTypeID = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CGAppointment Appointment
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_pAppt;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_pAppt = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime EndTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_dEnd;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_dEnd = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string OldResource
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_sOldResource;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_sOldResource = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Resource
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_sResource;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_sResource = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int Slots
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_nSlots;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_nSlots = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime StartTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_dStart;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_dStart = value;
|
||||
}
|
||||
}
|
||||
public CGAppointment Appointment {get; set;}
|
||||
|
||||
public DateTime EndTime {get; set;}
|
||||
|
||||
public string OldResource {get; set;}
|
||||
|
||||
public string Resource {get; set;}
|
||||
|
||||
public int Slots {get; set;}
|
||||
|
||||
public DateTime StartTime {get; set;}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -213,6 +213,11 @@
|
|||
this.m_StartTime = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return ResourceList + " (" + Slots + ") @ " + StartTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,51 +2,17 @@
|
|||
{
|
||||
using System;
|
||||
/// <summary>
|
||||
/// This class was regenerated from Calendargrid.dll using Reflector.exe
|
||||
/// by Sam Habiel for WorldVista. The original source code is lost.
|
||||
/// Custom Event Args for SelectionChange. Don't know totally what it does yet.
|
||||
/// Changed to automatic properties.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CGSelectionChangedArgs : EventArgs
|
||||
{
|
||||
private DateTime m_dEnd;
|
||||
private DateTime m_dStart;
|
||||
private string m_sResource;
|
||||
public DateTime EndTime {get; set;}
|
||||
|
||||
public DateTime EndTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_dEnd;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_dEnd = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Resource
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_sResource;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_sResource = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime StartTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_dStart;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_dStart = value;
|
||||
}
|
||||
}
|
||||
public string Resource {get; set;}
|
||||
|
||||
public DateTime StartTime {get; set;}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,10 +53,11 @@
|
|||
private const int WM_HSCROLL = 0x114; // Horizontal Scrolling Windows Message
|
||||
private const int WM_VSCROLL = 0x115; // Vertical Scrolling Windows Message
|
||||
|
||||
public delegate void CGAppointmentChangedHandler(object sender, CGAppointmentChangedArgs e);
|
||||
public event CGAppointmentChangedHandler CGAppointmentChanged;
|
||||
public event CGAppointmentChangedHandler CGAppointmentAdded;
|
||||
|
||||
public event CGAppointmentChangedHandler CGAppointmentChanged;
|
||||
|
||||
public delegate void CGSelectionChangedHandler(object sender, CGSelectionChangedArgs e);
|
||||
public event CGSelectionChangedHandler CGSelectionChanged;
|
||||
|
||||
public CalendarGrid()
|
||||
|
@ -1171,6 +1172,20 @@
|
|||
return rectangle2.IntersectsWith(rect);
|
||||
}
|
||||
|
||||
public void PositionGrid(int nHour)
|
||||
{
|
||||
//Position grid to nHour
|
||||
int nRow = 0, nCol = 0;
|
||||
DateTime dStart = DateTime.Today;
|
||||
dStart = dStart.AddHours(nHour);
|
||||
this.GetCellFromTime(dStart, ref nRow, ref nCol, false, "");
|
||||
int nHeight = this.CellHeight + 10;
|
||||
nHeight *= nRow;
|
||||
this.AutoScrollPosition = new Point(50, nHeight);
|
||||
this.Invalidate();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The purpose of this is to properly draw the date boxes at the top of the calendar grid.
|
||||
/// Otherwise, when scrolling, it gets garbled.
|
||||
|
|
Loading…
Reference in New Issue