Exemplo n.º 1
0
        public Orchestrator(Device device)
        {
            Device = device;

            ScheduleTimer            = new ScheduleTimer(this);
            PanelLayout              = new PanelLayout(Device);
            _eventTriggersCollection = new EventTriggersCollection(this);

            // Custom effect initialization must come after panel layout initialization as custom screen mirror effect needs the panel layout
            _customEffects = new CustomEffectsCollection(Device, this);

            if (device.OperationMode == OperationMode.Schedule)
            {
                ScheduleTimer.StartTimer();
            }
            else if (device.OperationMode == OperationMode.Manual)
            {
                Task.Run(() => ActivateEffect(Device.OverrideEffect, Device.OverrideBrightness));
            }
        }