Ejemplo n.º 1
0
 OnXpsDriverDocEvent(
     XpsSerializationXpsDriverDocEventArgs e
     )
 {
     if (XpsSerializationXpsDriverDocEvent != null)
     {
         XpsSerializationXpsDriverDocEvent(this, e);
     }
 }
Ejemplo n.º 2
0
        OnXpsDriverDocEvent(
            )
        {
            XpsSerializationXpsDriverDocEventArgs e = new XpsSerializationXpsDriverDocEventArgs(_documentEvent,
                                                                                                _currentCount,
                                                                                                _printTicket);

            _manager.OnXpsDriverDocEvent(e);

            return(e);
        }
Ejemplo n.º 3
0
        ForwardUserPrintTicket(
            Object sender,
            XpsSerializationPrintTicketRequiredEventArgs e
            )
        {
            Boolean mustCallXpsDriverDocEvent = true;

            _printTicket      = e.PrintTicket;
            _printTicketLevel = e.PrintTicketLevel;

            switch (_printTicketLevel)
            {
            case PrintTicketLevel.FixedDocumentSequencePrintTicket:
            {
                _currentCount  = _currentDocSequence;
                _documentEvent = XpsDocumentEventType.AddFixedDocumentSequencePrintTicketPre;
                break;
            }

            case PrintTicketLevel.FixedDocumentPrintTicket:
            {
                _currentCount  = _currentFixedDocument;
                _documentEvent = XpsDocumentEventType.AddFixedDocumentPrintTicketPre;
                break;
            }

            case PrintTicketLevel.FixedPagePrintTicket:
            {
                _currentCount  = _currentPage + 1;
                _documentEvent = XpsDocumentEventType.AddFixedPagePrintTicketPre;
                break;
            }

            default:
            {
                mustCallXpsDriverDocEvent = false;
                break;
            }
            }

            if (mustCallXpsDriverDocEvent)
            {
                XpsSerializationXpsDriverDocEventArgs xpsEventArgs = OnXpsDriverDocEvent();

                if (xpsEventArgs.Modified)
                {
                    e.PrintTicket = xpsEventArgs.PrintTicket;
                }
            }
        }