예제 #1
0
        private async void Deo_DisplayEnhancementOverrideCapabilitiesChanged(DisplayEnhancementOverride sender, DisplayEnhancementOverrideCapabilitiesChangedEventArgs args)
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                supportedNitRange = args.Capabilities.GetSupportedNitRanges();

                brightnessPercentageSupportedStateTextBlock.Text = args.Capabilities.IsBrightnessControlSupported ? "Yes" : "No";
                brightnessNitsSupportedStateTextBlock.Text       = args.Capabilities.IsBrightnessNitsControlSupported ? "Yes" : "No";

                stackPanelComboBoxPercentage.Visibility          = args.Capabilities.IsBrightnessControlSupported ? Visibility.Visible : Visibility.Collapsed;
                textBlockPercentageBrightnessSettings.Visibility = args.Capabilities.IsBrightnessControlSupported ? Visibility.Collapsed : Visibility.Visible;

                stackPanelComboBoxNits.Visibility          = args.Capabilities.IsBrightnessNitsControlSupported ? Visibility.Visible : Visibility.Collapsed;
                textBlockNitsBrightnessSettings.Visibility = args.Capabilities.IsBrightnessNitsControlSupported ? Visibility.Collapsed: Visibility.Visible;

                if (supportedNitRange.Count >= 1)
                {
                    textBlockNitsInputError.Text = "Please enter a number between " + supportedNitRange[0].MinNits + " and " + supportedNitRange[supportedNitRange.Count - 1].MaxNits + ".";
                    nitsBrightnessSlider.Minimum = supportedNitRange[0].MinNits;
                    nitsBrightnessSlider.Maximum = supportedNitRange[supportedNitRange.Count - 1].MaxNits;
                }
                else
                {
                    textBlockNitsInputError.Text = "No nit ranges on nits system!";
                }
            });
        }
예제 #2
0
        private async void Deo_DisplayEnhancementOverrideCapabilitiesChanged(DisplayEnhancementOverride sender, DisplayEnhancementOverrideCapabilitiesChangedEventArgs args)
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                supportedNitRange = args.Capabilities.GetSupportedNitRanges();

                brightnessPercentageSupportedStateTextBlock.Text = args.Capabilities.IsBrightnessControlSupported ? "Yes" : "No";
                brightnessNitsSupportedStateTextBlock.Text       = args.Capabilities.IsBrightnessNitsControlSupported ? "Yes" : "No";

                stackPanelComboBoxPercentage.Visibility          = args.Capabilities.IsBrightnessControlSupported ? Visibility.Visible : Visibility.Collapsed;
                textBlockPercentageBrightnessSettings.Visibility = args.Capabilities.IsBrightnessControlSupported ? Visibility.Collapsed : Visibility.Visible;

                stackPanelNitsBrightness.Visibility        = args.Capabilities.IsBrightnessNitsControlSupported ? Visibility.Visible : Visibility.Collapsed;
                textBlockNitsBrightnessSettings.Visibility = args.Capabilities.IsBrightnessNitsControlSupported ? Visibility.Collapsed: Visibility.Visible;
            });
        }
예제 #3
0
 private void Deo_DisplayEnhancementOverrideCapabilitiesChanged(DisplayEnhancementOverride sender, DisplayEnhancementOverrideCapabilitiesChangedEventArgs args)
 {
     Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         BrightnessPercentageSupportedStateTextBlock.Text = args.Capabilities.IsBrightnessControlSupported ? "Yes" : "No";
         BrightnessNitsSupportedStateTextBlock.Text       = args.Capabilities.IsBrightnessNitsControlSupported ? "Yes" : "No";
     });
 }