/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/MouseUtils/MouseJump.Models/Display/DesktopInfo.cs
32 строки
1002 B
Michael Clayton
Ready for Review - [Mouse Jump] - port upstream WinUI3 code to Mouse Jump (microsoft#48290) (#48393)
07 авг 2026, 08:34
Не верифицирован
07 авг 2026, 08:34
e0010c5
Код
Авторство
О чём код?
// 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. using System.Collections.ObjectModel; using MouseJump.Models.Drawing; namespace MouseJump.Models.Display; /// <summary> /// Represents the entire desktop or virtual screen for a single logical device. /// </summary> public sealed record DesktopInfo { public DesktopInfo(IEnumerable<ScreenInfo> screens) { this.Screens = (screens ?? throw new ArgumentNullException(nameof(screens))).ToList().AsReadOnly(); } public ReadOnlyCollection<ScreenInfo> Screens { get; } public RectangleInfo GetCombinedDisplayArea() { return (this.Screens.Count == 0) ? throw new InvalidOperationException($"{nameof(GetCombinedDisplayArea)} requires one or more screens.") : RectangleInfo.Union(this.Screens.Select(screen => screen.DisplayArea)); } }