private void btnSend_Click(object sender, EventArgs e)
        {
            //send message
            uploaderWS.Message msg = new uploaderWS.Message();
            msg.Data = System.DateTime.Now.ToLongTimeString() + " "+txtMessage.Text.Trim();
            msg.To = txtTo.Text.Trim();

            if (msg.To.Length == 0)
            {
                listBoxEvents.Items.Add("Please input 'To'");
                return;
            }

            listBoxEvents.Items.Add(string.Format(" I said to {0}:{1}", msg.To, msg.Data));
            try
            {
                m_service.SendMessage(m_sessionID, msg);
            }
            catch (Exception e1)
            {
                listBoxEvents.Items.Add(e1.ToString());
            }
            txtMessage.Focus();
        }
 void sendJobResult(cardocr.JobInfo job)
 {
     //send message
     uploaderWS.Message msg = new uploaderWS.Message();
     msg.Data = encodeJobInfo(job);
     msg.To = job.SessionFrom;
     try
     {
         m_service.SendMessage(m_sessionID, msg);
     }
     catch (Exception e1)
     {
         listBoxEvents.Items.Add(e1.ToString());
     }
     txtMessage.Focus();
 }
Beispiel #3
0
 /// <remarks/>
 public void SendMessageAsync(System.Guid sessionID, Message msg) {
     this.SendMessageAsync(sessionID, msg, null);
 }
Beispiel #4
0
 /// <remarks/>
 public void SendMessageAsync(System.Guid sessionID, Message msg, object userState) {
     if ((this.SendMessageOperationCompleted == null)) {
         this.SendMessageOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendMessageOperationCompleted);
     }
     this.InvokeAsync("SendMessage", new object[] {
                 sessionID,
                 msg}, this.SendMessageOperationCompleted, userState);
 }
Beispiel #5
0
 public void SendMessage(System.Guid sessionID, Message msg) {
     this.Invoke("SendMessage", new object[] {
                 sessionID,
                 msg});
 }