public void Unbind() { RequestManager.LeaveRoom(Name); ResponseHandler.messageRecieived -= HandleMessage; active = false; Notifications = 0; }
public void CloseRoom() { var tab = this.tabControl1.SelectedTab; if (tab == null || tab.ToString() == "") { return; } this.tabControl1.TabPages.Remove(tab); RequestManager.LeaveRoom(((RoomObjExt)(tab.Tag)).Name); RoomObjExt room = tab.Tag as RoomObjExt; room.Unbind(); }