Exemplo n.º 1
0
        protected void filter(IBindingListView source, StringSearchMatcher search)
        {
            if (propname == null || search.TextLength == 0)
            {
                source.RemoveFilter();
                if (propname == null) TextBox.Clear();
            }
            else
                source.Filter = propname + " like " + (AlwaysSearchInnerText ? "*" : null) + Text + "*";

            var p = GetCurrentPosition();
            if (p.X != pos.X && pos.X != -1 && RecordCount > 0 && p.Y != -1)
            {
                SetPosition(pos.X, p.Y);
            }
        }
Exemplo n.º 2
0
        protected virtual bool search(StringSearchMatcher search)
        {
            object pos = GetPosition();
            for (; ; )
            {

                var val = GetCurrent();
                if (val != null && search.Matches(val.ToString()))
                {
                    SetFoundPosition();
                    return true;
                }
                if (!IncreasePosition()) break;
            }
            ResetStartPosition(pos);
            return false;
        }
Exemplo n.º 3
0
 protected abstract void filter(StringSearchMatcher search);
Exemplo n.º 4
0
 public SearchBoxBase()
 {
     searchmatcher = new StringSearchMatcher(GetDefaultMode());
     InitializeComponent();
 }
Exemplo n.º 5
0
 protected override void filter(StringSearchMatcher search)
 {
     filter(BindingListView, search);
 }
Exemplo n.º 6
0
 protected override void filter(StringSearchMatcher search)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 7
0
 protected override bool search(StringSearchMatcher search)
 {
     if (needsetprops) setprops();
     return base.search(search);
 }