Esempio n. 1
0
        public void Filter(List <T> values)
        {
            var old = new Dictionary <string, T>(_valuesDictionary);

            _valuesDictionary.Clear();
            foreach (var val in old)
            {
                if (values.Contains(val.Value))
                {
                    _valuesDictionary.Add(val.Key, val.Value);
                }
            }
            _values        = new AsyncObservableCollection <string>(_valuesDictionary.Keys);
            _numericValues = new AsyncObservableCollection <T>(_valuesDictionary.Values);
        }
Esempio n. 2
0
 /// <summary>
 /// Reload display values
 /// Should be called always after AddValues
 /// </summary>
 public void ReloadValues()
 {
     _values        = new AsyncObservableCollection <string>(_valuesDictionary.Keys);
     _numericValues = new AsyncObservableCollection <T>(_valuesDictionary.Values);
     NotifyPropertyChanged("Values");
 }