PrintPageEventArgs.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //
  2. // System.Drawing.PrintPageEventArgs.cs
  3. //
  4. // Author:
  5. // Dennis Hayes ([email protected])
  6. // Herve Poussineau ([email protected])
  7. //
  8. // (C) 2002 Ximian, Inc
  9. //
  10. using System;
  11. using System.Drawing;
  12. namespace System.Drawing.Printing {
  13. /// <summary>
  14. /// Summary description for PrintPageEventArgs.
  15. /// </summary>
  16. public class PrintPageEventArgs : EventArgs {
  17. bool cancel;
  18. Graphics graphics;
  19. bool hasmorePages;
  20. Rectangle marginBounds;
  21. Rectangle pageBounds;
  22. PageSettings pageSettings;
  23. public PrintPageEventArgs(Graphics graphics, Rectangle marginBounds,
  24. Rectangle pageBounds, PageSettings pageSettings) {
  25. this.graphics = graphics;
  26. this.marginBounds = marginBounds;
  27. this.pageBounds = pageBounds;
  28. this.pageSettings = pageSettings;
  29. }
  30. public bool Cancel {
  31. get{
  32. return cancel;
  33. }
  34. set{
  35. cancel = value;
  36. }
  37. }
  38. public Graphics Graphics {
  39. get{
  40. return graphics;
  41. }
  42. }
  43. public bool HasMorePages {
  44. get{
  45. return hasmorePages;
  46. }
  47. set{
  48. hasmorePages = value;
  49. }
  50. }
  51. public Rectangle MarginBounds {
  52. get{
  53. return marginBounds;
  54. }
  55. }
  56. public Rectangle PageBounds {
  57. get{
  58. return pageBounds;
  59. }
  60. }
  61. public PageSettings PageSettings {
  62. get{
  63. return pageSettings;
  64. }
  65. }
  66. // used in PrintDocument.Print()
  67. internal void SetGraphics(Graphics g)
  68. {
  69. graphics = g;
  70. }
  71. }
  72. }