/// <summary> /// Called when [sensor status update]. /// </summary> /// <param name="sensorStatusData">The sensor status data.</param> private void OnDeviceStatusUpdate(ReceiverEvents.DeviceStatusUpdate e) { if (e.SensorId == this.Id) { switch (e.Status) { case ReceiverEvents.SensorDeviceStatus.LowBattery: if (BatteryLow == false) { BatteryLow = true; } break; case ReceiverEvents.SensorDeviceStatus.NotResponding: MeterColor = Brushes.Gray; IsActive = false; break; case ReceiverEvents.SensorDeviceStatus.HoguOk: case ReceiverEvents.SensorDeviceStatus.TargetOk: if (MeterColor == Brushes.Gray) { MeterColor = GetBrushColorForMeter(MeterType); IsActive = true; } break; } } }
public KickAndPunch( ReceiverEvents.DeviceRegistered deviceRegisteredEvent, ReceiverEvents.ButtonPressed buttonPressedEvent, ReceiverEvents.RegisterDevice registerDeviceRequest, ReceiverEvents.SensorHit deviceSensorHit, ReceiverEvents.DeviceStatusUpdate deviceStatusNotify, ApplicationEvents.ApplicationClosing appClosingEvent) { this.deviceRegisteredEvent = deviceRegisteredEvent; this.buttonPressedEvent = buttonPressedEvent; this.registerDeviceRequest = registerDeviceRequest; this.deviceSensorHit = deviceSensorHit; this.deviceStatusNotify = deviceStatusNotify; this.appClosingEvent = appClosingEvent; }
public KickAndPunch( ReceiverEvents.DeviceRegistered deviceRegisteredEvent, ReceiverEvents.ButtonPressed buttonPressedEvent, ReceiverEvents.RegisterDevice registerDeviceRequest, ReceiverEvents.SensorHit deviceSensorHit, ReceiverEvents.DeviceStatusUpdate deviceStatusNotify, ApplicationEvents.ApplicationClosing appClosingEvent) { this.deviceRegisteredEvent = deviceRegisteredEvent; this.buttonPressedEvent = buttonPressedEvent; this.registerDeviceRequest = registerDeviceRequest; this.deviceSensorHit = deviceSensorHit; this.deviceStatusNotify = deviceStatusNotify; this.appClosingEvent = appClosingEvent; }