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

load_surrounding_rows() private méthode

private load_surrounding_rows ( log_view lv ) : void
lv log_view
Résultat void
        private void load_surrounding_rows(log_view lv) {
            int sel = lv.sel_row_idx;
            if (sel < 0)
                sel = 0;
            // get as many rows as possible, in both directions
            int max_count = Math.Min(app.inst.look_around_find, lv.item_count);
            var surrounding = util.surrounding(sel, max_count, 0, lv.item_count);
            int min = surrounding.Item1, max = surrounding.Item2;
            // at this point, we know the start and end
            for (int idx = min; idx < max; ++idx) {
                var i = lv.item_at(idx);
                List<string> row = new List<string>();
                foreach (int col_idx in column_indexes_)
                    row.Add(log_view_cell.cell_value(i, col_idx));
                preview_items_.Add(row);
            }

            for ( int match_idx = 0; match_idx < preview_items_.Count; ++match_idx)
                matches_.Add(match_idx);
        }