예제 #1
0
파일: gsprint.cs 프로젝트: surjit/mupdf-1
 /* Do this update with each fixed document (page) that is handled */
 private void AsyncProgress(object sender, WritingProgressChangedEventArgs e)
 {
     if (PrintUpdate != null)
     {
         gsPrintEventArgs info = new gsPrintEventArgs(PrintStatus_t.PRINT_BUSY,
                             false, e.Number);
         PrintUpdate(this, info);
     }
 }
예제 #2
0
파일: gsprintbg.cs 프로젝트: surjit/mupdf-1
 /* Do this update with each fixed document (page) that is handled */
 private void AsyncProgress(object sender, WritingProgressChangedEventArgs e)
 {
     double perc = 100.0 * (double) e.Number / (double) m_pparams.num_pages;
     m_worker.ReportProgress((int) perc);
 }
예제 #3
0
 private void PrintAsync_WritingProgressChanged(object sender,
     WritingProgressChangedEventArgs e)
 {
     //Another page of the document has been printed. Update the UI.
     //pbPrintProgress.Value = e.Number;
 }
 // Handles writer progress changes
 private void OnWritingProgressChanged(object sender, WritingProgressChangedEventArgs e)
 {
     // Update progress bar
     progressBar.Value = e.ProgressPercentage;
 }
예제 #5
0
 // Handles printing
 private void OnWritingProgressChanged(object sender, WritingProgressChangedEventArgs e)
 {
     // Set printing percentage
     PrintingPercentage = e.ProgressPercentage + " %";
 }
예제 #6
0
        // ----------------------- AsyncPrintingProgress ----------------------
        /// <summary>
        ///   Creates an "async operation progress" event handler for tracking
        ///   the progress in printing a FixedDocumentSequence.</summary>
        private void AsyncPrintingProgress(
            object sender, WritingProgressChangedEventArgs e)
        {
            _batchProgress++;

            if (OnAsyncPrintChange != null)
            {
                String progress = String.Format("{0} - {1}",
                    e.WritingLevel.ToString(), e.Number.ToString());
                AsyncPrintEventArgs asyncInfo =
                    new AsyncPrintEventArgs(progress, false);
                OnAsyncPrintChange(this, asyncInfo);  // update display status
            }

            // Will only called EndBatchWrite when serializing Multiple Visuals
            if (_activeVtoXPSD != null && _batchProgress == 3)
            {
                _activeVtoXPSD.EndBatchWrite();
            }
        }