Example #1
0
        /// <summary>
        /// 发送数据
        /// </summary>
        /// <param name="bs"></param>
        public void Send(byte[] bs)
        {
            if (!m_serialPort.IsOpen)
            {
                throw new SerialPortException("不能在串口关闭状态发送数据");
            }
            //异步发送
            AsyncSend call = new AsyncSend(DoAsyncSend);

            call.BeginInvoke(bs, null, null);
        }
Example #2
0
        public void Send(byte[] bs)
        {
            if (!m_SerialPort.IsOpen)
            {
                return;
                //throw new SerialPortException("不能在串口关闭状态发送数据");
            }

            //异步发送
            AsyncSend call = new AsyncSend(DoAsyncSend);

            call.BeginInvoke(bs, null, null);
            //bs = null;
            //GC.Collect();
            //GC.WaitForPendingFinalizers();
        }
Example #3
0
 public void AsyncSendPrintData(EntityBase masterData, Boolean isOrder)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(masterData, isOrder, null, null);
 }
Example #4
0
 public void AsyncSendEmail(string subject, string body, string mailTo, string replayTo, MailPriority mailPriority)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendEmail);
     asyncSend.BeginInvoke(subject, body, mailTo, replayTo, mailPriority, null, null);
 }
Example #5
0
 /// <summary>
 /// Begins sending a mail asynchronously
 /// </summary>
 /// <param name="mail">Mail Message to send</param>
 /// <param name="callback">Callback method</param>
 /// <param name="inReplyTo">The id the of the mail which we are responding to</param>
 public IAsyncResult BeginSending(MailSoap12TransportBinding mail, string inReplyTo, AsyncCallback callback)
 {
     _asyncSend = new AsyncSend(Send);
     return(_asyncSend.BeginInvoke(mail, inReplyTo, callback, _asyncSend));
 }
Example #6
0
 public void AsyncSendPrintData(IpMaster ipMaster)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(ipMaster, null, null);
 }
Example #7
0
 public void AsyncSendPrintData(PickListMaster pickListMaster)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(pickListMaster, null, null);
 }
Example #8
0
 public void AsyncSendPrintData(com.Sconit.Entity.EntityBase masterData)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(masterData, null, null);
 }
 public void AsyncSendMessage(string[] phones, string content)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendMessage);
     asyncSend.BeginInvoke(phones, content, null, null);
 }
Example #10
0
 public void AsyncSendPrintData(Hu hu)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(hu, null, null);
 }
Example #11
0
 public void AsyncSendPrintData(ReceiptMaster receiptMaster)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(receiptMaster, null, null);
 }