/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Actions/Content/Selection/InvertSelectionAction.cs
54 строки
1 KB
yair100
Feature: Added support for searching settings (#18429)
29 апр 2026, 02:14
Не верифицирован
29 апр 2026, 02:14
edbc016
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. namespace Files.App.Actions { [GeneratedRichCommand] internal sealed class InvertSelectionAction : IAction { private readonly IContentPageContext context; public string Label => Strings.InvertSelection.GetLocalizedResource(); public string Description => Strings.InvertSelectionDescription.GetLocalizedResource(); public ActionCategory Category => ActionCategory.Selection; public RichGlyph Glyph => new(themedIconStyle: "App.ThemedIcons.SelectInvert"); public bool IsExecutable { get { if (context.PageType is ContentPageTypes.Home) return false; if (!context.HasItem) return false; var page = context.ShellPage; if (page is null) return false; bool isRenaming = page.SlimContentPage?.IsRenamingItem ?? false; return !isRenaming; } } public InvertSelectionAction() { context = Ioc.Default.GetRequiredService<IContentPageContext>(); } public Task ExecuteAsync(object? parameter = null) { context?.ShellPage?.SlimContentPage?.ItemManipulationModel?.InvertSelection(); return Task.CompletedTask; } } }