Esempio n. 1
0
 /* 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);
     }
 }
Esempio n. 2
0
        /* 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;
        }
Esempio n. 3
0
        /* 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;
        }
Esempio n. 4
0
 /* 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);
     }
 }
Esempio n. 5
0
		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;
			}
		}