Esempio n. 1
0
        void DoSearch()
        {
            string searchText = _text.Text;

            if (searchText == string.Empty)
            {
                _list.Items.Clear();
            }
            else
            {
                //MapDataManager.FindAndMarkFeatures(searchText);
                _findResults = MapDataManager.FindFeatures(searchText).ToList();
                _list.Items.Clear();
                foreach (var find in _findResults)
                {
                    _list.Items.Add(new TextBlock {
                        Text = string.Format("Feature {0}", find.FeatId)
                    });
                }
            }
        }
Esempio n. 2
0
        private void DoQuery()
        {
            if (_cbbLayers.SelectedItem == null || _cbbProps.SelectedItem == null || _cbbOperations.SelectedItem == null)
            {
                return;
            }

            string         layerName = _cbbLayers.SelectedItem.ToString();
            string         prop      = _cbbProps.SelectedItem.ToString();
            QueryOperation operation = (QueryOperation)_cbbOperations.SelectedIndex;
            string         param     = _txtParam.Text;

            var theme = new PredicateTheme(f => MapDataManager.FeatureSelector(f, prop, operation, param), Colors.Yellow, Colors.Gray);

            MapControl.Current.Layers.First(x => x.LayerData.Name == layerName).ApplyColorTheme(theme);
            _findResults = MapDataManager.QueryFeatures(layerName, prop, operation, param).ToList();
            _list.Items.Clear();
            foreach (var find in _findResults)
            {
                _list.Items.Add(new TextBlock {
                    Text = string.Format("Feature {0}", find.FeatId)
                });
            }
        }