Exemplo n.º 1
0
        public static void PrintTranslateTicket(TransferTicket PrintData)
        {
            PrinterSettings settings = new PrinterSettings();
            PrintDocument   PrintDoc = new PrintDocument();

            PrintDoc.PrintPage += PrintDoc_PrintPage;
            //PrintDoc.DefaultPageSettings.PaperSize = new PaperSize("A7 Rotated", 200, 78);
            PrintDoc.DefaultPageSettings.Margins = new Margins(4, 4, 8, 4);
            PrintDoc.Print();
        }
Exemplo n.º 2
0
        }         // end class TransferTicket


        /// <summary>
        ///    Transfers the IDisposable items tracked by this instance into a new
        ///    instance.
        /// </summary>
        public ITransferTicket Transfer()
        {
            lock ( m_syncRoot )
            {
                if (null != m_outstandingTransfer)
                {
                    throw new InvalidOperationException("There is already an outstanding transfer.");
                }

                m_outstandingTransfer = new TransferTicket(this);
                return(m_outstandingTransfer);
            } // end lock
        }     // end Transfer()