Пример #1
0
        public static void LogIn(int userId)
        {
            _user     = new UserObj();
            _user.ID  = userId;
            _loggedIn = true;

            _threadKeepalive      = new Thread(() => Keepalive());
            _threadKeepalive.Name = "Keepalive Thread (Keepalive method)";
            _threadKeepalive.Start();
        }
Пример #2
0
        public static void LogOut()
        {
            _loggedIn = false;

            //_threadKeepalive.Abort();
            _threadKeepalive.Join();

            _user = null;
            _contacts.Clear();
            OnContactUpdate();
        }