示例#1
0
        //private bool bolPrintSuccess = false;
        ///// <summary>
        ///// 打印是否成功
        ///// </summary>
        //[System.ComponentModel.Browsable( false )]
        //public bool PrintSuccess
        //{
        //    get
        //    {
        //        return bolPrintSuccess;
        //    }
        //}

        protected override void OnEndPrint(PrintEventArgs e)
        {
            base.OnEndPrint(e);
            if (this.PreparePrintJob)
            {
                this.myPrintJob = null;
                PrinterInformation info = new PrinterInformation(this.PrinterSettings.PrinterName);
                foreach (PrintJob job in info.Jobs)
                {
                    if (job.Document == this.DocumentName)
                    {
                        this.myPrintJob = job;
                        break;
                    }
                }
            }
        }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 /// <returns>操作是否成功</returns>
 public bool LastPageEjected()
 {
     return(PrinterInformation.ControlJob(this, PrintJobControlCommand.LAST_PAGE_EJECTED, false));
 }
示例#3
0
 /// <summary>
 /// 删除任务
 /// </summary>
 /// <returns>操作是否成功</returns>
 public bool Delete()
 {
     return(PrinterInformation.ControlJob(this, PrintJobControlCommand.DELETE, false));
 }
示例#4
0
 /// <summary>
 /// 发送到镜像打印端口
 /// </summary>
 /// <returns>操作是否成功</returns>
 public bool SendToPrinter()
 {
     return(PrinterInformation.ControlJob(this, PrintJobControlCommand.SENT_TO_PRINTER, false));
 }
示例#5
0
 /// <summary>
 /// 恢复打印任务
 /// </summary>
 /// <returns>操作是否成功</returns>
 public bool Resume()
 {
     return(PrinterInformation.ControlJob(this, PrintJobControlCommand.RESUME, false));
 }
示例#6
0
 /// <summary>
 /// 重新启动打印任务
 /// </summary>
 /// <returns>操作是否成功</returns>
 public bool Restart()
 {
     return(PrinterInformation.ControlJob(this, PrintJobControlCommand.RESTART, false));
 }
示例#7
0
 /// <summary>
 /// 暂停任务
 /// </summary>
 /// <returns>操作是否成功</returns>
 public bool Pause()
 {
     return(PrinterInformation.ControlJob(this, PrintJobControlCommand.PAUSE, false));
 }
示例#8
0
 /// <summary>
 /// 取消任务
 /// </summary>
 /// <returns>操作是否成功</returns>
 public bool Cancel()
 {
     return(PrinterInformation.ControlJob(this, PrintJobControlCommand.CANCEL, false));
 }
示例#9
0
 /// <summary>
 /// 刷新状态
 /// </summary>
 public void Refresh()
 {
     PrinterInformation.RefreshPrintJob(this, true);
 }