public void Init(SessionManager manager, LobbySession session)
        {
            _manager = manager;
            _session = session;

            LoadMatches();
        }
 public void Init(SessionManager manager, GameRoom.GameRoomSession session, Bet bet)
 {
     _manager = manager;
     _session = session;
     _bet = bet;
 }
        public void Init(SessionManager manager, GameRoom.GameRoomSession session)
        {
            _manager = manager;
            _session = session;

            _description = _session.GameRoom.Description;
            _password = _session.GameRoom.Password;
            _isBetting = _session.GameRoom.IsBetting;
            _isTeamBotPlaced = _session.GameRoom.IsTeamBotPlaced;
            _bettingType = _session.GameRoom.BettingType == null ? "1v1" : _session.GameRoom.BettingType;
            _isAdvertising = _session.GameRoom.IsAdvertising;
            _members = _session.GameRoom.Members;
            //temporary admins view does not include owner cause he cannot be disabled now, later admins must be initialized with complete list
            //_admins = session.GameRoom.Admins;
            _admins = session.GameRoom.AdminsWithoutOwner;
            _notAdmins = session.GameRoom.MembersNotAdmins;

            PrepareControls();
        }
        public void Init(SessionManager manager, GameRoom.GameRoomSession session)
        {
            _manager = manager; // the mediator and messaging service (sort of)
            _session = session; // the model (sort of)

            // socket membership messages trigger on the session, so update room's membership when session members change
            _session.Membership.CollectionChanged += Membership_CollectionChanged;
            _session.GameRoom.PropertyChanged += GameRoom_PropertyChanged;
            _session.RoomBets.CollectionChanged += RoomBets_CollectionChanged;
            _session.MyMatch.PropertyChanged += MyMatch_PropertyChanged;
            _session.ChatMessageReceived += ChatMessages_CollectionChanged;

            _mutedMembersIds = new List<string>();
            InitMembership();
        }
        public void LoggedOut()
        {
            lock (_userLookup)
            {
                _userLookup.Clear();
            }
            Friends.Clear();
            _friendLookup.Clear();

            timer.Stop();
            Voip.Dispose();

            PgSession.Begin(PgSession.Logout);
            _sessionManager = null;
        }
        public UserDataManager(SocketSession session)
        {
            UserData = this;
            Settings = PointGaming.Settings.SettingsUser.Load(session.User.username);
            PgSession = session;
            User = GetPgUser(session.User);
            User.Status = "online";
            _sessionManager = new SessionManager();
            Friendship = new FriendshipManager(PgSession);
            Voip = new VoipSession(this);
            Voip.Enable();

            timer = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(5);
            timer.Tick += new EventHandler(CheckIdle);
            timer.Start();
        }