Пример #1
0
		public async Task ProcessPackage(User user, JoinRoom package)
		{
			var result = new JoinRoom();
			result.ID = package.ID;
			if (!mServer.Rooms.ContainsKey(package.ID))
			{
				result.Result = false;
				await mServer.ClientListener.Send(user, result);
				return;
			}
			user.Room = mServer.Rooms[package.ID];
			result.Result = true;
			await mServer.ClientListener.Send(user, result);
		}
Пример #2
0
		private void JoinRoomRecived(JoinRoom joinRoom)
		{
			if (!joinRoom.Result)
				return;
			mMainForm.ControlStack.Push(new RoomControl(mMainForm));
		}