private void directConnection_SendCompleted(object sender, ObjectEventArgs e) { OnBridgeSent(e.Object as P2PMessageSessionEventArgs); }
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); } } }
protected virtual void OnSendCompleted(object sender, ObjectEventArgs e) { if (SendCompleted != null) SendCompleted(sender, e); }
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); }