Пример #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);
        }
Пример #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();
        }
Пример #3
0
 public void AsyncSendPrintData(EntityBase masterData, Boolean isOrder)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(masterData, isOrder, null, null);
 }
Пример #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);
 }
Пример #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));
 }
Пример #6
0
 public void AsyncSendPrintData(IpMaster ipMaster)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(ipMaster, null, null);
 }
Пример #7
0
 public void AsyncSendPrintData(PickListMaster pickListMaster)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(pickListMaster, null, null);
 }
Пример #8
0
 public void AsyncSendPrintData(com.Sconit.Entity.EntityBase masterData)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(masterData, null, null);
 }
Пример #9
0
 public void AsyncSendMessage(string[] phones, string content)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendMessage);
     asyncSend.BeginInvoke(phones, content, null, null);
 }
Пример #10
0
 public void AsyncSendPrintData(Hu hu)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(hu, null, null);
 }
Пример #11
0
 public void AsyncSendPrintData(ReceiptMaster receiptMaster)
 {
     AsyncSend asyncSend = new AsyncSend(this.SendPrintData);
     asyncSend.BeginInvoke(receiptMaster, null, null);
 }