www.pudn.com > PrinterPageSetting.rar > IPrinterPageSetting.cs
using System;
using System.Drawing;
using System.Drawing.Printing;
namespace GoldPrinter
{
///
/// PrintDocument.PrintPage的委托定义
///
public delegate void PrintPageDelegate(Object obj,System.Drawing.Printing.PrintPageEventArgs ev) ;
///
/// 导出到Excel委托定义
///
public delegate void ImportExcelDelegate(Object obj,ImportExcelArgs ev);
public class ImportExcelArgs
{
public Icon ButtonIcon = null;
}
///
/// IPrinterPageSetting 的接口,显示打印纸张设置、打印机设置、打印预览对话框。
///
/// 程序提供:周方勇;Email:flygoldfish@sina.com。
/// 请 关 注:WebMIS.Net快速开发工具,不写一行程序开发B/S架构下MIS、OA、CRM、人事管理、档案管理等数据库网页系统。简单、实用、稳定、可靠。
/// 下 载:
/// 上海奥联:WWW.AlinkSoft.COM
/// 用友华表:WWW.CellSoft.CC
///★★★★★您可以免费使用此程序,但是请您保留此说明,以维护知识产权★★★★★
///
public interface IPrinterPageSetting
{
///
/// 获取或设置打印文档
///
System.Drawing.Printing.PrintDocument PrintDocument
{
get;
set;
}
///
/// 关联一个方法,目的是让具体的打印由实例化者来操作。这里当属性使用,其实可以用PrintPage。
/// 如PrinterPageSetting1.PrintPage = new PrintPageDelegate(this.PrintPageEventHandler);
///
PrintPageDelegate PrintPageValue
{
get;
set;
}
///
/// 当需要为当前页打印的输出时发生,如果对此不了解,就用PrintPageValue赋值也可以
///
event PrintPageDelegate PrintPage;
///
/// 导出到Excel委托定义的实现
///
ImportExcelDelegate ImportExcelValue
{
get;
set;
}
///
/// 显示页面设置对话框,并返回PageSettings
///
///
System.Drawing.Printing.PageSettings ShowPageSetupDialog();
///
/// 显示打印机设置对话框,并返回PrinterSettings
///
///
System.Drawing.Printing.PrinterSettings ShowPrintSetupDialog();
///
/// 显示打印预览对话框
///
void ShowPrintPreviewDialog();
}//End Interface
}//End NameSpace