コード例 #1
0
 private void DefaultFindAction()
 {
     if (string.IsNullOrEmpty(txtFind.Text))
     {
         _availableRefs.RemoveFilter();
     }
     else
     {
         _availableRefs.ApplyFilter(r => (r.KeyedName ?? "").IndexOf(txtFind.Text, StringComparison.OrdinalIgnoreCase) >= 0);
         ApplyDefaultSort();
     }
 }
コード例 #2
0
 private void txtFilter_TextChanged(object sender, EventArgs e)
 {
     try
     {
         _filterable.ApplyFilter(v => GetDisplayText(v).IndexOf(txtFilter.Text, StringComparison.OrdinalIgnoreCase) >= 0);
         SortDefault();
         if (_filterable.Count > 0)
         {
             listValues.SelectedIndex = 0;
         }
     }
     catch (Exception ex)
     {
         Utils.HandleError(ex);
     }
 }
コード例 #3
0
 private void txtFilter_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(txtFilter.Text))
         {
             _items.RemoveFilter();
         }
         else
         {
             _items.ApplyFilter(i => i.Name.IndexOf(txtFilter.Text, StringComparison.OrdinalIgnoreCase) >= 0);
         }
     }
     catch (Exception ex)
     {
         Utils.HandleError(ex);
     }
 }