Beispiel #1
0
 internal void ScanToEmailReceived(ScanToEmailResponse message)
 {
     try
     {
         m_callback.ScanToEmailReceived(message);
     }
     catch (CommunicationException)
     {
         // we don't really care...
     }
     catch (TimeoutException)
     {
         // we don't really care about this either.
     }
 }
Beispiel #2
0
 internal void ScanToEmailReceived(ScanToEmailResponse message)
 {
     try
     {
         m_callback.ScanToEmailReceived(message);
     }
     catch (CommunicationException)
     {
         // we don't really care...
     }
     catch (TimeoutException)
     {
         // we don't really care about this either.
     }
 }
        public ScanToEmailResponse Handle(ScanToEmailRequest message)
        {
            ScanToEmailResponse response = new ScanToEmailResponse();

            string tempPath = System.IO.Path.GetTempPath();

            ScanAdapter adapter = new ScanAdapter(message.DeviceId, message.PaperSize, message.ScanSource);
            PdfDocument pdfDoc = adapter.ScanToPDF();

            logger.Debug(string.Format("Address: {0}  Password: {1}", message.EmailAddress, message.EmailPassword));
            GMailProvider emailProvider = new GMailProvider();
            emailProvider.EmailAddress = message.EmailAddress;
            emailProvider.EmailPassword = message.EmailPassword;
            emailProvider.PdfDoc = pdfDoc;

            emailProvider.Execute();

            return response;
        }
Beispiel #4
0
        public ScanToEmailResponse Handle(ScanToEmailRequest message)
        {
            ScanToEmailResponse response = new ScanToEmailResponse();

            string tempPath = System.IO.Path.GetTempPath();


            ScanAdapter adapter = new ScanAdapter(message.DeviceId, message.PaperSize, message.ScanSource);
            PdfDocument pdfDoc  = adapter.ScanToPDF();

            logger.Debug(string.Format("Address: {0}  Password: {1}", message.EmailAddress, message.EmailPassword));
            GMailProvider emailProvider = new GMailProvider();

            emailProvider.EmailAddress  = message.EmailAddress;
            emailProvider.EmailPassword = message.EmailPassword;
            emailProvider.PdfDoc        = pdfDoc;

            emailProvider.Execute();

            return(response);
        }
 public void ScanToEmailReceived(ScanToEmailResponse message)
 {
     m_receiver.ReceiveResponse(message);
 }
Beispiel #6
0
 private void ScanToEmailResponseReceived(ScanToEmailResponse response)
 {
     this.Status = "Scan completed.";
 }
Beispiel #7
0
 private void ScanToEmailResponseReceived(ScanToEmailResponse response)
 {
     this.Status = "Scan completed.";
 }
 public void ScanToEmailReceived(ScanToEmailResponse message)
 {
     m_receiver.ReceiveResponse(message);
 }