Example #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);
            }
        }
Example #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;
        }
Example #3
0
 protected abstract void filter(StringSearchMatcher search);
Example #4
0
 public SearchBoxBase()
 {
     searchmatcher = new StringSearchMatcher(GetDefaultMode());
     InitializeComponent();
 }
Example #5
0
 protected override void filter(StringSearchMatcher search)
 {
     filter(BindingListView, search);
 }
Example #6
0
 protected override void filter(StringSearchMatcher search)
 {
     throw new NotImplementedException();
 }
Example #7
0
 protected override bool search(StringSearchMatcher search)
 {
     if (needsetprops) setprops();
     return base.search(search);
 }