private void SecuritySensor_OnMouseDown(object sender, MouseButtonEventArgs e) { if (ReadOnly) { return; } StateChangedCommand?.Execute(SensorState); }
private void Sensor_OnMouseDown(object sender, MouseButtonEventArgs e) { if (OnlyOutput) { return; } var state = GetSensorState(SensorStateString); if (state == SensorState.Alert) { SensorStateString = GetSensorStateString(SensorState.Ok); } else if (state == SensorState.Ok) { SensorStateString = GetSensorStateString(SensorState.Alert); } StateChangedCommand?.Execute(GetSensorState(SensorStateString)); }