/* 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); } }
/* Done */ private void AsyncCompleted(object sender, WritingCompletedEventArgs e) { PrintStatus_t status; if (e.Cancelled) { status = PrintStatus_t.PRINT_CANCELLED; } else if (e.Error != null) { status = PrintStatus_t.PRINT_ERROR; } else { status = PrintStatus_t.PRINT_READY; } if (PrintUpdate != null) { gsPrintEventArgs info = new gsPrintEventArgs(status, true, 0); PrintUpdate(this, info); } m_busy = false; }
/* Done */ private void AsyncCompleted(object sender, WritingCompletedEventArgs e) { PrintStatus_t status; if (e.Cancelled) status = PrintStatus_t.PRINT_CANCELLED; else if (e.Error != null) status = PrintStatus_t.PRINT_ERROR; else status = PrintStatus_t.PRINT_READY; if (PrintUpdate != null) { gsPrintEventArgs info = new gsPrintEventArgs(status, true, 0); PrintUpdate(this, info); } m_busy = false; }
private void PrintProgress(object printHelper, gsPrintEventArgs Information) { if (Information.Status != PrintStatus_t.PRINT_BUSY) { xaml_PrintProgress.Value = 100; xaml_PrintGrid.Visibility = System.Windows.Visibility.Collapsed; } else { xaml_PrintProgress.Value = 100.0 * (double)Information.Page / (double)m_num_pages; } }