Esempio n. 1
0
 private void directConnection_SendCompleted(object sender, ObjectEventArgs e)
 {
     OnBridgeSent(e.Object as P2PMessageSessionEventArgs);
 }
Esempio n. 2
0
 private void SetUserTileToPictureBox(object sender, ObjectEventArgs e)
 {
     if (displayUser.InvokeRequired)
     {
         displayUser.Invoke(new EventHandler<ObjectEventArgs>(SetUserTileToPictureBox), new object[] { sender, e });
     }
     else
     {
         try
         {
             Image img = Image.FromStream(new MemoryStream((byte[])e.Object));
             displayUser.Image = img;
         }
         catch (Exception ex)
         {
             Trace.WriteLine("Get UserTile error: " + ex.Message);
         }
     }
 }
Esempio n. 3
0
 protected virtual void OnSendCompleted(object sender, ObjectEventArgs e)
 {
     if (SendCompleted != null)
         SendCompleted(sender, e);
 }
Esempio n. 4
0
        private void Processor_SendCompleted(object sender, ObjectEventArgs e)
        {
            int transid = (int)e.Object;
            P2PMessageSessionEventArgs p2pe = null;

            lock (p2pAckMessages)
            {
                if (p2pAckMessages.ContainsKey(transid))
                {
                    p2pe = p2pAckMessages[transid];
                    p2pAckMessages.Remove(transid);
                }
            }

            if (p2pe != null)
            {
                OnBridgeSent(p2pe);
            }
        }
 protected virtual void OnSendCompleted(ObjectEventArgs e)
 {
     if (SendCompleted != null)
         SendCompleted(this, e);
 }