示例#1
0
 public void Leave()
 {
     if (_currentChatroom != null)
     {
         _currentChatroom.Unregister(this);
         _currentChatroom = null;
     }
 }
示例#2
0
 public void Enter(AbstractChatroom chatroom)
 {
     if (_currentChatroom != null)
     {
         Leave();
     }
     chatroom.Register(this);
     _currentChatroom = chatroom;
 }