Пример #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void _watchers_IssueFound(object sender, PrinterIssueEventArgs e)
 {
     LogHelper.LogDebug();
     try
     {
         if (e != null)
         {
             PrinterTrouble pt = e.Issue;
             LogHelper.LogDebug(pt.Issue());
             if (pt != PrinterTrouble.None)
             {
                 APIWrapper.PrinterIssue(e.PrinterName, pt);
                 Notifier.Error(string.Format("Document can't be printed because of printer issue : {1}.{0}Administration has been notified about this issue.", Environment.NewLine, pt.Issue()));
             }
             else
             {
                 if (!string.IsNullOrWhiteSpace(e.Status))
                 {
                     //Notifier.Error(string.Format("Document can't be printed because of printer issue : {1}", Environment.NewLine, e.Status));
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Notifier.Error(ex);
     }
 }
Пример #2
0
 /// <summary>
 /// Sends printer issue if any exist
 /// </summary>
 /// <param name="printerName">printer name</param>
 /// <param name="issue">printer issue</param>
 public static void PrinterIssue(string machineName, string userName, string printerName, PrinterTrouble issue)
 {
     API.PrinterIssue(machineName, userName, printerName, issue.Issue());
 }