Navigation bar
  Home Print document Start Previous page
 96 of 234 
Next page End  

Gravitybox Schedule Primer
Page 94 
1998-2004 Gravitybox Software LLC
must exist in the Rooms collection or an error will occur. The starting room must be less
than or equal to the ending room. The StartTime and EndTime parameters must be
valid times and they must be in the range of the schedule. The StartTime may be no
less than the schedule’s property StartTime and the EndTime parameter may be no
more than the value of the schedule’s StartTime plus DayLength. DayLength is the
length of the day in hours. The starting time must be less than or equal to the ending
time. The PrinterDeviceName of the PrinterParameters object is the name of the printer
to which the schedule is being sent. The Orientation property of the oPrinterParameters
object will determine whether the print job will be performed in portrait or landscape
mode. See the printer’s documentation for an explanation of this concept.
Note:
Some developers have had problems creating the “CPrinterParameter “object in C++. 
An object of this type is necessary to call the “GoPrint” method. To help these
developers, there is a helper method named “GetPrinterParameter”. Given a set of
parameters, this method will return a reference to an object of this type. You may use
the returned object as the last parameter to the “GoPrint” method. The
“CPrinterParameter “ object is used to specify all of the necessary information to the
print routine, like paper size, copies, etc. So if you cannot call the print method because
you cannot create this object, just let the schedule create one for you and use it to print
the schedule.
PrintPageInfo
When printing, there is also the option of displaying the page information on each page
with the PrintPageInfo property. This property determines if the page positions are
printed. A schedule may be several pages across and down. This may cause confusion
as to how they are to be pieced together. If the PrintPageInfo property is set, the X and
Y positions are printed in the top, left corner of each page to facilitate the reconstruction
of large schedules. The format of this information is [X, Y], where X is the horizontal
position (1..N) and Y is the vertical position (1..M). There will be a total of M * N pages
printed.
During the process of printing, some sort of visual cues may be given to the user, as to
what is happening. Several events are provided to render this functionality. These
events aid in informing the user about the progress of the print. They inform of the
percent complete and determine if a print was canceled.
The PrintStart event is raised immediately after the GoPrint method is invoked and error
checking completes. An error may occur if the date or room range is invalid. Another
common source of errors is that an end value is less than a start value. For example,
the start date is June 3 and the end date is June 1. This is logically impossible, so an
error occurs.
The PrintDone event is raised, after the all pages have been sent to the printer. This will
be the last event of the sequence assuming that no errors occur and the printing is not
http://www.purepage.com