예제 #1
0
        private async void SetBrightnessScenario(DisplayBrightnessOverrideScenario scenario)
        {
            string scenarioText = "";

            switch (scenario)
            {
            case DisplayBrightnessOverrideScenario.FullBrightness:
                scenarioText = "Full Brightness";
                break;

            case DisplayBrightnessOverrideScenario.BarcodeReadingBrightness:
                scenarioText = "Barcode Brightness";
                break;

            case DisplayBrightnessOverrideScenario.IdleBrightness:
                scenarioText = "Idle Brightness";
                break;
            }

            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                brightnessSettingStateTextBlock.Text = scenarioText;
            });

            deo.BrightnessOverrideSettings = BrightnessOverrideSettings.CreateFromDisplayBrightnessOverrideScenario(scenario);
            CheckOverrideToggleEnableState();
        }
예제 #2
0
        private async void SetBrightnessNits(float nits)
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                brightnessSettingStateTextBlock.Text = nits + " nits";
            });

            deo.BrightnessOverrideSettings = BrightnessOverrideSettings.CreateFromNits(nits);
            CheckOverrideToggleEnableState();
        }
예제 #3
0
        private async void SetBrightnessPercentage(double level)
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                brightnessSettingStateTextBlock.Text = level + "%";
            });

            deo.BrightnessOverrideSettings = BrightnessOverrideSettings.CreateFromLevel(level / 100);
            CheckOverrideToggleEnableState();
        }