/// <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); }
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(); }
public void AsyncSendPrintData(EntityBase masterData, Boolean isOrder) { AsyncSend asyncSend = new AsyncSend(this.SendPrintData); asyncSend.BeginInvoke(masterData, isOrder, null, null); }
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); }
/// <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)); }
public void AsyncSendPrintData(IpMaster ipMaster) { AsyncSend asyncSend = new AsyncSend(this.SendPrintData); asyncSend.BeginInvoke(ipMaster, null, null); }
public void AsyncSendPrintData(PickListMaster pickListMaster) { AsyncSend asyncSend = new AsyncSend(this.SendPrintData); asyncSend.BeginInvoke(pickListMaster, null, null); }
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); }
public void AsyncSendPrintData(Hu hu) { AsyncSend asyncSend = new AsyncSend(this.SendPrintData); asyncSend.BeginInvoke(hu, null, null); }
public void AsyncSendPrintData(ReceiptMaster receiptMaster) { AsyncSend asyncSend = new AsyncSend(this.SendPrintData); asyncSend.BeginInvoke(receiptMaster, null, null); }