Esempio n. 1
0
        public ProcessEventTrigger(EventTriggersCollection eventTriggersCollection, Models.Models.Scheduling.Triggers.ProcessEventTrigger processEventTrigger)
            : base(processEventTrigger.Brightness, processEventTrigger.EffectName, processEventTrigger.Priority)
        {
            _eventTriggersCollection = eventTriggersCollection;
            _processName             = processEventTrigger.ProcessName;

            _processCheckTimer           = new Timer(UserSettings.Settings.ProcessResetIntervalInSeconds * 1000);
            _processCheckTimer.Elapsed  += CheckProcess;
            _processCheckTimer.AutoReset = true;
            _processCheckTimer.Start();
        }
Esempio n. 2
0
        public SpotifyEventTrigger(EventTriggersCollection eventTriggersCollection, Models.Models.Scheduling.Triggers.SpotifyEventTrigger spotifyEventTrigger)
            : base(spotifyEventTrigger.Brightness, spotifyEventTrigger.EffectName, spotifyEventTrigger.Priority)
        {
            _eventTriggersCollection = eventTriggersCollection;
            _playlistId = spotifyEventTrigger.PlaylistId;

            _playlistCheckTimer           = new Timer(_timerMilliseconds);
            _playlistCheckTimer.Elapsed  += CheckProcess;
            _playlistCheckTimer.AutoReset = true;
            _playlistCheckTimer.Start();
        }