namespace Microsoft.Samples.WinForms.Cs.PrintingExample1 {
using System;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Printing;
using System.IO;
public class PrintingExample1 : System.Windows.Forms.Form {
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components;
protected internal System.Windows.Forms.Button printButton;
private Font printFont;
private StreamReader streamToPrint;
public PrintingExample1() {
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
// 启动打印按钮的事件处理程序
printButton.Click += new System.EventHandler(printButton_Click);
}