/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Actions/Navigation/CloseAllTabsAction.cs
38 строк
865 B
0x5BFA
Code Quality: Generate ICommandManager, CommandManager and CommandCodes from [GeneratedRichCommand] (#17536)
04 сен 2025, 17:35
Не верифицирован
04 сен 2025, 17:35
d45ca74
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. namespace Files.App.Actions { [GeneratedRichCommand] internal sealed partial class CloseAllTabsAction : CloseTabBaseAction { public override string Label => Strings.CloseAllTabs.GetLocalizedResource(); public override string Description => Strings.CloseAllTabsDescription.GetLocalizedResource(); public override HotKey HotKey => new(Keys.W, KeyModifiers.CtrlShift); public CloseAllTabsAction() { } protected override bool GetIsExecutable() { return context.Control is not null && context.TabCount > 0 && context.CurrentTabItem is not null; } public override Task ExecuteAsync(object? parameter = null) { if (context.Control is not null) MultitaskingTabsHelpers.CloseAllTabs(context.Control); return Task.CompletedTask; } } }