Esempio n. 1
0
    public UsersSearchPromptController(UsersSearchPromptView promptView)
    {
        view = promptView;
        view.SetIdleSearchTime(1.5f);

        userViewsHandler = new UsersSearchUserViewsHandler(view.GetUsersBaseElement(), view.GetUserElementsParent());
        usersSearcher    = new UsersSearcher();

        view.OnSearchText             += OnSearchText;
        view.OnShouldHide             += OnShouldHidePrompt;
        userViewsHandler.OnAddUser    += OnAddUserPressed;
        userViewsHandler.OnRemoveUser += OnRemoveUserPressed;
    }
Esempio n. 2
0
    public FriendsSearchPromptController(UsersSearchPromptView promptView, IFriendsController friendsController)
    {
        view = promptView;
        view.SetIdleSearchTime(IDLE_TIME_TRIGGER_SEARCH);

        friendsHandler   = new UsersSearchFriendsHandler(friendsController);
        userViewsHandler = new UsersSearchUserViewsHandler(view.GetUsersBaseElement(), view.GetUserElementsParent());

        friendsHandler.OnFriendRemoved += OnFriendRemoved;
        searchHandler.OnSearchChanged  += OnSearchResult;
        view.OnSearchText             += OnSearchText;
        view.OnShouldHide             += OnShouldHidePrompt;
        userViewsHandler.OnAddUser    += OnAddUserPressed;
        userViewsHandler.OnRemoveUser += OnRemoveUserPressed;
    }