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(); }
public static void LogOut() { _loggedIn = false; //_threadKeepalive.Abort(); _threadKeepalive.Join(); _user = null; _contacts.Clear(); OnContactUpdate(); }