Dev control CheckedListBoxControl element lookup method

        ///  <Summary> 
        /// Find and an element checking method - by value lookup
         ///  </ Summary> 
        void SetItemCheckedByValue (CheckedListBoxControl CLBC, Object value) 
        { 
            ListBoxFindItemDelegate lbfid = the delegate (ListBoxFindItemArgs F) {f.IsFound = Object .Equals (value, f.ItemValue);};
             int A clbc.FindItem = ( 0 , to true , lbfid);
             IF (A> = 0 ) 
                clbc.SetItemChecked (A, to true ); 
        }
        ///  <Summary> 
        /// Find and an element checking method - Find by content
         ///  </ Summary> 
        void SetItemCheckedByText (CheckedListBoxControl CLBC, String text) 
        { 
            int A = clbc.FindString (text);
             IF ( A> 0 ) 
                clbc.SetItemChecked (A, to true ); 
        }
        ///  <Summary> 
        /// Find and an element checking method - fuzzy search by content
         ///  </ Summary> 
        void SetItemCheckedByMatchText (CheckedListBoxControl CLBC, String text) 
        { 
            int A = clbc.FindStringExact (text);
             IF (A> 0 ) 
                clbc.SetItemChecked (A, to true ); 
        }

 

Guess you like

Origin www.cnblogs.com/wangpenghan/p/11855119.html