public SearchGameMenu() { InitializeComponent(); boxList.Add(pictureBox1); boxList.Add(pictureBox2); boxList.Add(pictureBox3); boxList.Add(pictureBox4); boxList.Add(pictureBox5); boxList.Add(pictureBox6); boxList.Add(pictureBox7); boxList.Add(pictureBox8); this.switches = Domoticz.GetSwitches(); this.CheckIfGameStarted(); }
public HideGameMenu(int playingTimeInSeconds) { InitializeComponent(); // Haal alle sensoren op via de Domoticz API. this.switches = Domoticz.GetSwitches(); // Doe alle switches uitzetten zodat deze niet al aanstaan voordat het spel begint. this.TurnOffAllSwitches(); // Stuur een bericht naar Domoticz dat het verstoppen begint, zo kan dit in de zoekapplicatie gekeken worden wanneer het spel begonnen is. Domoticz.SendLogMessageToDomoticz("[HIDING] Started: " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss") + ", Game length: " + playingTimeInSeconds + " seconds"); // Zet het aantal seconden van het spel naar de gespecificeerde tijd. this.secondsLeftInGame = playingTimeInSeconds; // De tijd wordt gestart this.StartGameTimer(); // Verder wordt ook aangezet dat de verstopper zich kan gaan verstoppen. this.canHide = true; }