/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/powerdisplay/PowerDisplay.Models/MouseWheelControlModeExtensions.cs
24 строки
956 B
moooyo
PowerDisplay: Adjust brightness by scrolling over the tray icon (#49446)
31 июл 2026, 11:21
Не верифицирован
31 июл 2026, 11:21
8f63402
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace PowerDisplay.Models; /// <summary> /// Provides validation helpers for <see cref="MouseWheelControlMode"/>. /// </summary> public static class MouseWheelControlModeExtensions { /// <summary> /// Returns a supported mode, or <see cref="MouseWheelControlMode.Disabled"/> for an /// unsupported persisted numeric value. /// </summary> /// <param name="mode">The persisted mode value.</param> /// <returns>A supported mode value.</returns> public static MouseWheelControlMode Normalize(this MouseWheelControlMode mode) => mode is MouseWheelControlMode.Disabled or MouseWheelControlMode.PrimaryDisplay or MouseWheelControlMode.AllDisplays ? mode : MouseWheelControlMode.Disabled; }