// GAME private void TurnOffAllSwitches() { foreach (Switch @switch in this.switches) { Domoticz.UseSwitch(@switch, SwitchActionEnum.Off); } }
private void GoToRoom(Switch @switch) { // Check of de verstopper zich nog kan verstoppen, zo niet wordt er een bericht gestuurd en wordt de code verder niet uitgevoerd. if (!this.canHide) { MessageBox.Show("Je kan je niet meer verder verstoppen! De tijd is namelijk afgelopen.", "Stop met verstoppen!"); return; } // Huidige switch uitzetten if (this.currentSwitch != null) { Domoticz.UseSwitch(this.currentSwitch, SwitchActionEnum.Off); } // Nieuwe switch aanzetten Domoticz.UseSwitch(@switch, SwitchActionEnum.On); Domoticz.SendLogMessageToDomoticz("[HIDING] To: " + @switch.idx); this.currentSwitch = @switch; }