Ignore:
Timestamp:
Mar 20, 2011, 3:22:11 AM (13 years ago)
Author:
Sam Habiel
Message:

CalendarGrid:

  • Support for Autoscrolling corrected.
  • A little optimization: Grid is only drawn once now when starting, not twice (don't know why original code did that).

CGAppointment:

  • Added member Patient (new Class)

CGDocument:

  • OnOpenDocument now accepts input of DateTime to decide where to open document.
  • SlotsAvailable algorithm now includes code for scaling according to timescale and code to merge Blocks if they are adjacent.

CGDocumentManager:

  • Fix bug having to do with canceling log-in after first retry. BMX lib threw an exception which was not caught.

CGView: Many changes:

  • SlotsAvailable signature changed in CGDocument. All references to it had to be changed.
  • Opening a node in the tvSchedules by clicking on the plus sign did not select it. Code changes to make it select it.
  • UpdateStatusBar now uses a string builder; and shows a more comprehensive message on the availability in the Status Bar.
  • Focus issues on various controls.
  • Support for printing a slip after an appointment is made automatically has been added.

CustomPrinting:

  • now includes a method to print a single appointment slip

DAppointPage:

  • Checkbox to decide whether to print appt slip added.
  • New readonly property to get the appointment that has been made (of type CGAppointment).

DApptSearch:

  • StartDate and EndDate now autoadjust based on each other.
  • lblMessage added to show user message if no appointments are found.
File:
1 edited

Legend:

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

    r1091 r1106  
    112112            }
    113113        }
    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
    115146        /// <summary>
    116147        /// Print Letter to be given or mailed to the patient
Note: See TracChangeset for help on using the changeset viewer.