/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneFromSidebarAction.cs
41 строка
1 KB
yair100
Feature: Improved 'Open in new pane' context menu (#18602)
17 июн 2026, 02:39
Не верифицирован
17 июн 2026, 02:39
4f15868
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. namespace Files.App.Actions { [GeneratedRichCommand] internal sealed partial class OpenInNewPaneFromSidebarAction : BaseOpenInNewPaneAction { public override bool IsExecutable => SidebarContext.IsItemRightClicked && SidebarContext.RightClickedItem is not null && SidebarContext.RightClickedItem.MenuOptions.IsLocationItem && ContentPageContext.IsMultiPaneAvailable && !ContentPageContext.IsMultiPaneActive; public override bool IsAccessibleGlobally => false; public override async Task ExecuteAsync(object? parameter = null) { if (SidebarContext.RightClickedItem is null) return; if (await DriveHelpers.CheckEmptyDrive(SidebarContext.RightClickedItem!.Path)) return; ContentPageContext.ShellPage!.PaneHolder?.OpenSecondaryPane(SidebarContext.RightClickedItem!.Path ?? string.Empty, parameter as ShellPaneArrangement? ?? ShellPaneArrangement.None); } protected override void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e) { switch (e.PropertyName) { case nameof(ISidebarContext.IsItemRightClicked): case nameof(ISidebarContext.RightClickedItem): OnPropertyChanged(nameof(IsExecutable)); break; } } } }