Esempio n. 1
0
        public void SelectByNames(List <string> _namePatters, NameMatchModes _matchMode)
        {
            if (dataGridView.Rows.Count < 1 || _matchMode == NameMatchModes.None || _namePatters.Count < 1)
            {
                return;
            }
            ClearSel();
            foreach (DataGridViewRow row in dataGridView.Rows)
            {
                foreach (var pattern in _namePatters)
                {
                    if (_matchMode == NameMatchModes.MatchName)
                    {
                        if (_fileSearcher.Assets[row.Index].FileName.Contains(pattern))
                        {
                            row.Selected = true;
                        }
                    }
                    else
                    {
                        if (_matchMode == NameMatchModes.AbsoluteMatch)
                        {
                            if (_fileSearcher.Assets[row.Index].FileName == pattern)
                            {
                                row.Selected = true;
                            }
                        }
                    }
                }
            }

            FocusSelection();
        }
Esempio n. 2
0
 public void CheckByNames(List <string> _namePatters, NameMatchModes _matchMode, bool _check)
 {
     SelectByNames(_namePatters, _matchMode);
     SetSelCheck(_check, false);
 }