Enum för DeviceStateControllerType.Nothing är nu lika med -1. Det går då inte initiera StateController till Nothing och OR:a in bitarna efter det. Jag tror att Nothing behöver ha värdet 0 för att det ska funka.
Följande kod funkar alltså inte som det är nu (men bör funka om Nothing = 0):
_device.StateControllers = DeviceStateControllerType.Nothing;
if (chkStateControllerSchedule.Checked)
_device.StateControllers |= DeviceStateControllerType.Schedule;
if (chkStateControllerScenario.Checked)
_device.StateControllers |= DeviceStateControllerType.Scenario;
if (chkStateControllerManually.Checked)
_device.StateControllers |= DeviceStateControllerType.ManualReq;
Server 3.0.0.1.