Esempio n. 1
0
        private void SearchImpl()
        {
            if (_search == null)
            {
                CheckForSelectedSymbolChange();
                Timer.Enabled = false;
                return;
            }

            Result result = _search.Search();

            if (result.Completed)
            {
                _search = null;
            }

            _list.AddRange(result.IncrementalFound);
            _list.Sort(SearchSort);
            RowCount = _list.Count;
            Refresh();
        }
Esempio n. 2
0
        private void StartSearch()
        {
            // Don't start searching until we are actually displayed.
            if (!_handleCreated)
            {
                return;
            }

            _list.Clear();
            Timer.Enabled = true;
            RowCount      = 0;

            if (_search != null)
            {
                _search.Cancel();
            }

            _info.ShowInvalidData = _showInvalidData;
            _info.SearchText      = SearchText;
            _info.Storage         = _storage;
            _search = new IncrementalSearch(_info.GetInitialData(), _info.ShouldAllow);

            SearchImpl();
        }