lw_common.ui.search_form.run_search C# (CSharp) Méthode

run_search() private méthode

private run_search ( ) : void
Résultat void
        private void run_search() {
            if (prev_search_.text == "") {
                // nothing to search for
                load_all_matches();
                return;
            }
            if ( prev_search_.use_regex)
                if (prev_search_.regex == null) {
                    // in this case, the regex is invalid
                    load_all_matches();
                    return;
                }

            List<int> matches = new List<int>();
            for (int idx = 0; idx < preview_items_.Count; ++idx) {
                var to_search = searchable_columns().Select(col => preview_items_[idx][col]);
                bool matches_now = string_search.matches(to_search, prev_search_);
                if ( matches_now)
                    matches.Add(idx);
            }
            matches_ = matches;
        }