public void Listen() { // Uncomment for debugging UI //Events = GetEventMocks(); // Comment out the following two lines for testing event mocks instead of real data from server, only for UI debugging var consumer = Task.Run(() => { foreach (var sensorStatus in _sensorStatusQ.GetConsumingEnumerable()) { CreateEvent(sensorStatus); EventsCollectionChanged?.Invoke(this, new EventsChangedEventArgs(_events)); } }); _sensorServer.StartServer(Rate.Challenging); _sensorServer.OnSensorStatusEvent += SensorServer_OnSensorStatusEvent; StartEventsTimer(); }
public void RemoveEvent(Event @event) { _events.Remove(@event); EventsCollectionChanged?.Invoke(this, new EventsChangedEventArgs(_events)); }
public void Reset() { _events.Clear(); EventsCollectionChanged?.Invoke(this, new EventsChangedEventArgs(_events)); }