예제 #1
0
        private void ProcessSessionInformation(SessionListInformationPacket obj)
        {
            // All we need to do is update the model
            _viewModel.SessionsAvailable = obj.GameSessions;

            if (_view.FlowController.WebControl.IsDocumentReady)
            {
                _view.UpdateView();
            }
        }
예제 #2
0
        /// <summary>
        /// Sends a specific user a list of currently active sessions in the lobby.
        /// </summary>
        /// <param name="user">The user to send all the sessions to</param>
        public void SendUserUpdatedSession(User user, GameSession session)
        {
            var stubList = new List <GameSession>();

            stubList.Add(session);

            var packet = new SessionListInformationPacket(stubList);

            ClientNetworkManager.Instance.SendPacket(packet, user.Connection);
        }
예제 #3
0
파일: Form1.cs 프로젝트: Damian666/blasters
        private void ProcessSessionInformation(SessionListInformationPacket obj)
        {
            // Clear the old list
            lstSessions.DataSource = null;
            lstSessions.Items.Clear();
            lstSessions.DataSource = obj.GameSessions;
            _sessions = obj.GameSessions;


            UpdateSessionView();
        }
예제 #4
0
        /// <summary>
        /// Sends a specific user a list of currently active sessions in the lobby.
        /// </summary>
        /// <param name="user">The user to send all the sessions to</param>
        public void SendUserSessions(User user)
        {
            var packet = new SessionListInformationPacket(Sessions.ToList());

            ClientNetworkManager.Instance.SendPacket(packet, user.Connection);
        }