/// <summary> /// Refresh display values based on replace values /// </summary> public void GetValues() { lock (_syncRoot) { string newVal = Value; _values.Clear(); NotifyPropertyChanged("Values"); _values = new AsyncObservableCollection <string>(_valuesDictionary.Keys); if (_replaceValues != null && _replaceValues.Count > 0) { for (int i = 0; i < _values.Count; i++) { if (_replaceValues.ContainsValue(_values[i])) { foreach (var value in _replaceValues) { if (value.Value == _values[i]) { _values[i] = value.Key; } } } } } _numericValues = new AsyncObservableCollection <T>(_valuesDictionary.Values); NotifyPropertyChanged("Values"); Value = newVal; } }
public void Clear() { _valuesDictionary.Clear(); _values.Clear(); _numericValues.Clear(); NotifyPropertyChanged("Values"); }
public void Clear(bool notify = true) { _valuesDictionary.Clear(); _values.Clear(); _numericValues.Clear(); if (notify) { NotifyPropertyChanged("Values"); } }