Exemple #1
0
 private void RulesEngineSetLights(object sender, SetLightsEventArgs args)
 {
     if (SirenOfShameDevice.IsConnected)
     {
         SirenOfShameDevice.PlayLightPattern(args.LedPattern, args.TimeSpan);
     }
 }
Exemple #2
0
 private void RulesEngineSetAudio(object sender, SetAudioEventArgs args)
 {
     if (SirenOfShameDevice.IsConnected)
     {
         SirenOfShameDevice.PlayAudioPattern(args.AudioPattern, args.TimeSpan);
     }
 }
Exemple #3
0
        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();
 }