示例#1
0
 /// <summary>
 /// Loads style definition to C1PrintDocument control.
 /// </summary>
 /// <param name="style">The <see cref="PrintStyle"/> for loading into print document object.</param>
 public void LoadStyle(PrintStyle style)
 {
     if (style.Load(PrintDocument))
     {
         CurrentStyle = style;
         AddScheduleReferences();
     }
 }
示例#2
0
 /// <summary>
 /// Opens a separate application window in which end users can preview
 /// the output that would be generated by the print operation.
 /// </summary>
 /// <param name="style">The <see cref="PrintStyle"/> object to preview.</param>
 /// <param name="start">The <see cref="DateTime"/> value specifying the beginning of the print range.</param>
 /// <param name="end">The <see cref="DateTime"/> value specifying the end of the print range.</param>
 public void Preview(PrintStyle style, DateTime start, DateTime end)
 {
     if (style != null)
     {
         SetupPrintContext(style, start, end);
         PreviewCurrentStyle();
     }
 }
示例#3
0
 /// <summary>
 /// Sends the specified printing style to the printer.
 /// </summary>
 /// <param name="style">The <see cref="PrintStyle"/> object to print.</param>
 /// <param name="start">The <see cref="DateTime"/> value specifying the beginning of the print range.</param>
 /// <param name="end">The <see cref="DateTime"/> value specifying the end of the print range.</param>
 public void Print(PrintStyle style, DateTime start, DateTime end)
 {
     if (style != null)
     {
         SetupPrintContext(style, start, end);
         InternalPrint();
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PrintOptionsForm"/> form.
 /// </summary>
 /// <param name="info">The <see cref="PrintInfo"/> object.</param>
 /// <param name="defaultStyle">The <see cref="PrintStyle"/> object which should be selected initially.</param>
 /// <param name="printContext">The <see cref="PrintContextType"/> value, determining the filter of styles which should be shown in a form.</param>
 public PrintOptionsDialog(PrintInfo info, PrintStyle defaultStyle, PrintContextType printContext)
 {
     InitializeComponent();
     _context = printContext;
     _info    = info;
     foreach (PrintStyle ps in _info.PrintStyles)
     {
         if ((_context & ps.Context) != 0)
         {
             lstStyles.Items.Add(ps);
         }
     }
     if (defaultStyle != null && lstStyles.Items.Count > 0)
     {
         lstStyles.SelectedItem = defaultStyle;
     }
     _hidePrivateAppointmentsInitial = HidePrivateAppointments = _info.HidePrivateAppointments;
 }
示例#5
0
 // load specified PrintStyle into the PrintDocument control and initialize date range
 internal void SetupPrintContext(PrintStyle style, DateTime start, DateTime end)
 {
     LoadStyle(style);
     style.SetDateRangeTags(PrintDocument, start, end);
 }
示例#6
0
 /// <summary>
 /// Opens a separate application window in which end users can preview
 /// the output that would be generated by the print operation.
 /// </summary>
 /// <param name="style">The <see cref="PrintStyle"/> object to preview.</param>
 public void Preview(PrintStyle style)
 {
     Preview(style, _schedule.VisibleDates[0], _schedule.VisibleDates[_schedule.VisibleDates.Count - 1]);
 }