Beispiel #1
0
        public void DeSelectPoints(IReadOnlyCollection <TimedValue> timedValues)
        {
            timedValues.ForEach(x => _selectionCount[x]--);
            IReadOnlyCollection <TimedValue> reallyDeselected = _selectionCount.Where(x => x.Value == 0).Select(x => x.Key).ToList();

            reallyDeselected.ForEach(x => _selectionCount.Remove(x));
            OnPointsDeselected?.Invoke(this, new TimedValuesArgs(reallyDeselected));
        }
Beispiel #2
0
 public void DeselectAllPoints()
 {
     if (_selectionCount.Count == 0)
     {
         return;
     }
     OnPointsDeselected?.Invoke(this, new TimedTelemetryArgs(_selectionCount.Keys));
     _selectionCount.Clear();
 }
Beispiel #3
0
        public void DeSelectPoints(IEnumerable <TimedTelemetrySnapshot> timedTelemetrySnapshots)
        {
            var telemetrySnapshotsEnumerated = timedTelemetrySnapshots.ToArray();
            var previouslySelected           = telemetrySnapshotsEnumerated.Where(x => _selectionCount.ContainsKey(x)).ToList();

            /*IReadOnlyCollection<TimedTelemetrySnapshot> reallyDeselected = _selectionCount.Where(x => x.Value == 0).Select(x => x.Key).ToList();
             * reallyDeselected.ForEach(x => _selectionCount.Remove(x));*/
            if (previouslySelected.Count == 0)
            {
                return;
            }
            previouslySelected.ForEach(x => _selectionCount.Remove(x));
            OnPointsDeselected?.Invoke(this, new TimedTelemetryArgs(previouslySelected));
        }