- Timestamp:
- Mar 20, 2011, 3:22:11 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CustomPrinting.cs
r1091 r1106 112 112 } 113 113 } 114 114 115 /// <summary> 116 /// Prints a single appointment slip to give to the patient 117 /// </summary> 118 /// <param name="appt">The Appointment to print</param> 119 /// <param name="e">PrintPageEventArgs from PrintDocument Print handler</param> 120 public virtual void PrintAppointmentSlip(CGAppointment appt, PrintPageEventArgs e) 121 { 122 Rectangle printArea = e.MarginBounds; 123 Graphics g = e.Graphics; 124 StringFormat sf = new StringFormat(); 125 sf.Alignment = StringAlignment.Center; //for title 126 Font fTitle = new Font(FontFamily.GenericSerif, 24, FontStyle.Bold); //for title 127 Font fBody = new Font(FontFamily.GenericSerif, 12); 128 string s = "Appointment Reminder Slip"; 129 g.DrawString(s, fTitle, Brushes.Black, printArea, sf); //title 130 131 // move down 132 int titleHeight = (int)g.MeasureString(s, fTitle, printArea.Width).Height; 133 printArea.Y += titleHeight; 134 printArea.Height -= titleHeight; 135 136 // draw underline 137 g.DrawLine(Pens.Black, printArea.Location, new Point(printArea.Right, printArea.Y)); 138 printArea.Y += 15; 139 printArea.Height -= 15; 140 141 142 143 } 144 145 115 146 /// <summary> 116 147 /// Print Letter to be given or mailed to the patient
Note:
See TracChangeset
for help on using the changeset viewer.