예제 #1
6
 protected override void OnBeginPrint(PrintEventArgs e)
 {
     _printElements = new ArrayList();
     _pageNum = 0;
     _printIndex = 0;
     foreach (IPrintable printObject in _printObjects)
     {
         PrintElement element = new PrintElement(printObject);
         _printElements.Add(element);
         element.Print();
     }
 }
예제 #2
0
 public void Print(PrintElement element)
 {
     element.AddText(Text);
 }
예제 #3
0
 private void InitializeControl(string filename)
 {
     _printObjects = new ArrayList();
     Header = new PrintElement(null);
     Header.AddText("File: " + filename);
     Header.AddText("Page: [pagenum]");
     Header.AddHorizontalRule();
     Header.AddBlankLine();
     Footer = new PrintElement(null);
     Footer.AddBlankLine();
     Footer.AddHorizontalRule();
     DateTime dt = DateTime.Now;
     Footer.AddText("Printed on " + String.Format("{0:f}", dt));
 }