void ResetForm() { CurrentUserName.BeginInvoke((System.Windows.Forms.MethodInvoker) delegate() { CurrentUserName.Clear(); }); CurrentChatRoom.BeginInvoke((System.Windows.Forms.MethodInvoker) delegate() { CurrentChatRoom.Clear(); }); CurrentUserName.BeginInvoke((System.Windows.Forms.MethodInvoker) delegate() { CurrentUserName.AppendText("Current User Name: " + SetNameTextBox.Text + "."); }); CurrentChatRoom.BeginInvoke((System.Windows.Forms.MethodInvoker) delegate() { CurrentChatRoom.AppendText("Current Chat Room: " + ChatRoomName.Text + "."); }); }
public void PublishMessage(string message) { if (CurrentChatRoom == null) { throw new Exception("The session hasn't started."); } CurrentChatRoom.PublishMessage(CurrentSession.Username, message); }
public void SetPeers(Dictionary <string, Uri> peers) { if (CurrentChatRoom == null) { throw new Exception("The session hasn't started."); } CurrentChatRoom.SetPeers(peers); }
//IChatRoom public void ReceiveMessage(string username, IVectorMessage <IMessage> message) { if (CurrentChatRoom == null) { throw new Exception("The session hasn't started."); } CurrentChatRoom.ReceiveMessage(username, message); }
public void LeaveRoom() { IsRoomHost = false; if (InRoom) { CurrentChatRoom.Leave(this); } }
public void VectorRecoveryRequest(int[] vetor, string adress) { CurrentChatRoom.VectorRecoveryRequest(vetor, adress); }