/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Actions/Open/OpenTerminalFromSidebarAction.cs
37 строк
1 KB
Yair
Feature: Respect default terminal from Windows Settings
30 апр 2026, 01:32
30 апр 2026, 01:32
c512727
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. namespace Files.App.Actions { [GeneratedRichCommand] internal sealed partial class OpenTerminalFromSidebarAction : OpenTerminalAction { private ISidebarContext SidebarContext { get; } = Ioc.Default.GetRequiredService<ISidebarContext>(); public override string Label => Strings.OpenTerminal.GetLocalizedResource(); public override string Description => Strings.OpenTerminalDescription.GetLocalizedResource(); public override bool IsExecutable => SidebarContext.IsItemRightClicked && SidebarContext.RightClickedItem is not null && SidebarContext.RightClickedItem.MenuOptions.ShowShellItems && !SidebarContext.RightClickedItem.MenuOptions.ShowEmptyRecycleBin; public override bool IsAccessibleGlobally => false; public override HotKey HotKey => HotKey.None; protected override string[] GetPaths() { if (SidebarContext.IsItemRightClicked && SidebarContext.RightClickedItem is not null) return [SidebarContext.RightClickedItem.Path]; return []; } } }