Exemplo n.º 1
0
        /// <summary>
        /// Start the effect if possible
        /// </summary>
        private async Task TryStartEffect()
        {
            if (await _orchestrator.TrySetOperationMode(OperationMode.Event))
            {
                await _orchestrator.ActivateEffect(_effectName, _brightness);

                _isActive = true;
            }
        }
Exemplo n.º 2
0
        private async Task SelectedEffectChanged()
        {
            try
            {
                if (await _orchestrator.TrySetOperationMode(OperationMode.Manual, true, true))
                {
                    _device.ManualEffect     = _selectedEffect;
                    _device.ManualBrightness = Brightness;

                    await _orchestrator.ActivateEffect(_selectedEffect, Brightness);

                    UserSettings.Settings.SaveSettings();
                }
            }
            catch (Exception e)
            {
                _logger.Error(e, "Error during setting manual control");
                PopupCreator.Error(MainWindows.Resources.ManualControlError);
            }
        }