private void RulesEngineSetLights(object sender, SetLightsEventArgs args) { if (SirenOfShameDevice.IsConnected) { SirenOfShameDevice.PlayLightPattern(args.LedPattern, args.TimeSpan); } }
private void RulesEngineSetAudio(object sender, SetAudioEventArgs args) { if (SirenOfShameDevice.IsConnected) { SirenOfShameDevice.PlayAudioPattern(args.AudioPattern, args.TimeSpan); } }
private void Init(IEnumerable <string> args) { try { FullScreen = true; _log = MyLogManager.GetLogger(typeof(App)); ProcessCommandLineArguments(args); if (_mockSoS) { SirenOfShameDevice = new MockSirenOfShameDevice(); } else { SirenOfShameDevice = new SirenOfShameDevice(); } } catch (Exception ex) { _log.Error(ex); throw; } }
private SirenService() { _device = new SirenOfShameDevice(); }