Ejemplo n.º 1
0
 public void AddressGoToSceneTest()
 {
     Controller.AddressGoToScene(Controller.AllLights[0], Controller.scenes[2]);
     //See if the unit was added to groups[16]
     Assert.Contains(Controller.AllLights[0], Controller._groups[16].GroupOfLights);
     //Check the ForcedLightLevel
     Assert.AreEqual(Controller._groups[16].GroupOfLights[0].ForcedLightlevel, Controller.scenes[2] / 100);
 }
Ejemplo n.º 2
0
 //sets every Units forced light level with the addresses in the _currentUnitIds List to the wanted scene
 private void AddressGoToScene(object sender, EventArgs e)
 {
     foreach (int index in _currentUnitIds)
     {
         LightingUnit CurrentUnit = DALIController.FindUnitWithAddress(index);
         DALIController.AddressGoToScene(CurrentUnit, DALIController.scenes[_buttons.IndexOf((Button)sender)]);
     }
     _currentUnitIds.Clear();
     SetUpFirstButtons();
 }