Ejemplo n.º 1
0
        /// <summary>
        /// Performs the specified search and populates the UserTreeStore
        /// <returns>true if any users were found by this search, false otherwise</returns>
        /// </summary>
        private void PerformInitialSearch(string searchAttribute, string searchString)
        {
            string searchContext;

            MemberInfo[] memberInfoA;
            int          totalMembers;

            if (searchString == null)
            {
                simws.FindFirstMembers(
                    domainID,
                    NumOfMembersToReturnDefault,
                    out searchContext,
                    out memberInfoA,
                    out totalMembers);
            }
            else
            {
                simws.FindFirstSpecificMembers(
                    domainID,
                    searchAttribute,
                    SearchEntry.Text,
                    SearchType.Contains,
                    NumOfMembersToReturnDefault,
                    out searchContext,
                    out memberInfoA,
                    out totalMembers);
            }

            memberListModel.Reinitialize(searchContext, memberInfoA, totalMembers);
            memberList.Reload();
            memberList.Refresh();
            // The code in this if statement fixes Bug 87444 (User Selector
            // dialog is not refreshed when performing a search).  By forcing
            // the first item to be selected, this bug no longer happens.
            if (totalMembers > 0)
            {
                memberList.Selected = 0;
            }
        }