Esempio n. 1
0
 /// <summary>
 /// Deletes the controller having the passed <see cref="Controller.Id"/> but only if it exists.
 /// Moreover, all associated LED resources will be removed.
 /// </summary>
 /// <param name="id"><see cref="Controller.Id"/> of the controller which should be deleted</param>
 public void DeleteController(int id)
 {
     if (_controllerStorage.HasControllerById(id))
     {
         _controllerStorage.DeleteController(id);
         //change LEDs
         _ledStorage.CleanLeds(id, 0);   //remove all LEDs
         _groupStorage.CleanLeds(id, 0); //remove all LEDs
     }
 }