From 3163ab24ec842c0a35d8b273c7e15966e1f802e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 10:01:17 -0400 Subject: [PATCH 1/4] Bump MSTest.TestAdapter from 3.10.3 to 3.10.4 (#17538) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index f33fdcc2f3d4..8e0fe1b261f9 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -56,7 +56,7 @@ - + From d45ca74dac451f76be0d22271fbe4aa499047045 Mon Sep 17 00:00:00 2001 From: 0x5BFA <62196528+0x5bfa@users.noreply.github.com> Date: Thu, 4 Sep 2025 23:35:14 +0900 Subject: [PATCH 2/4] Code Quality: Generate ICommandManager, CommandManager and CommandCodes from [GeneratedRichCommand] (#17536) --- .../Compress/CompressIntoArchiveAction.cs | 1 + .../Compress/CompressIntoSevenZipAction.cs | 1 + .../Compress/CompressIntoZipAction.cs | 1 + .../Archives/Decompress/DecompressArchive.cs | 5 +- .../Decompress/DecompressArchiveHere.cs | 5 +- .../Decompress/DecompressArchiveHereSmart.cs | 5 +- .../DecompressArchiveToChildFolderAction.cs | 1 + .../Background/SetAsAppBackgroundAction.cs | 1 + .../SetAsLockscreenBackgroundAction.cs | 1 + .../SetAsSlideshowBackgroundAction.cs | 1 + .../SetAsWallpaperBackgroundAction.cs | 1 + .../ImageManipulation/RotateLeftAction.cs | 1 + .../ImageManipulation/RotateRightAction.cs | 1 + .../Install/InstallCertificateAction.cs | 1 + .../Content/Install/InstallFontAction.cs | 1 + .../Content/Install/InstallInfDriverAction.cs | 1 + .../Actions/Content/PlayAllAction.cs | 1 + .../PreviewPopup/LaunchPreviewPopupAction.cs | 1 + .../Actions/Content/RefreshItemsAction.cs | 1 + .../Actions/Content/Run/RunAsAdminAction.cs | 1 + .../Content/Run/RunAsAnotherUserAction.cs | 1 + .../Content/Run/RunWithPowershellAction.cs | 1 + .../Content/Selection/ClearSelectionAction.cs | 1 + .../Selection/InvertSelectionAction.cs | 1 + .../Content/Selection/SelectAllAction.cs | 1 + .../Content/Selection/ToggleSelectAction.cs | 1 + .../Actions/Content/Share/ShareItemAction.cs | 1 + .../Content/Tags/OpenAllTaggedActions.cs | 5 +- src/Files.App/Actions/Display/GroupAction.cs | 26 ++ src/Files.App/Actions/Display/LayoutAction.cs | 8 + src/Files.App/Actions/Display/SortAction.cs | 13 + .../SortFilesAndFoldersTogetherAction.cs | 1 + .../Actions/Display/SortFilesFirstAction.cs | 1 + .../Actions/Display/SortFoldersFirstAction.cs | 1 + .../Actions/FileSystem/AddItemAction.cs | 1 + .../Actions/FileSystem/CopyItemPathAction.cs | 1 + .../CopyItemPathWithQuotesAction.cs | 1 + .../Actions/FileSystem/CopyPathAction.cs | 1 + .../FileSystem/CopyPathWithQuotesAction.cs | 1 + .../CreateAlternateDataStreamAction.cs | 1 + .../Actions/FileSystem/CreateFolderAction.cs | 1 + .../CreateFolderWithSelectionAction.cs | 1 + .../FileSystem/CreateShortcutAction.cs | 1 + .../CreateShortcutFromDialogAction.cs | 1 + .../Actions/FileSystem/DeleteItemAction.cs | 1 + .../FileSystem/DeleteItemPermanentlyAction.cs | 1 + .../FileSystem/EmptyRecycleBinAction.cs | 1 + .../Actions/FileSystem/FlattenFolderAction.cs | 1 + .../Actions/FileSystem/FormatDriveAction.cs | 1 + .../FileSystem/FormatDriveFromHomeAction.cs | 1 + .../FormatDriveFromSidebarAction.cs | 1 + .../FileSystem/OpenFileLocationAction.cs | 1 + .../Actions/FileSystem/OpenItemAction.cs | 3 + .../Actions/FileSystem/PasteItemAction.cs | 1 + .../FileSystem/PasteItemAsShortcutAction.cs | 1 + .../FileSystem/PasteItemToSelectionAction.cs | 1 + .../Actions/FileSystem/RenameAction.cs | 1 + .../FileSystem/RestoreAllRecycleBinAction.cs | 1 + .../FileSystem/RestoreRecycleBinAction.cs | 1 + .../FileSystem/Transfer/CopyItemAction.cs | 1 + .../FileSystem/Transfer/CutItemAction.cs | 1 + src/Files.App/Actions/Git/GitCloneAction.cs | 1 + src/Files.App/Actions/Git/GitFetchAction.cs | 1 + src/Files.App/Actions/Git/GitInitAction.cs | 1 + src/Files.App/Actions/Git/GitPullAction.cs | 1 + src/Files.App/Actions/Git/GitPushAction.cs | 1 + src/Files.App/Actions/Git/GitSyncAction.cs | 1 + .../Actions/Global/EditPathAction.cs | 1 + .../Global/EnterCompactOverlayAction.cs | 1 + .../Global/ExitCompactOverlayAction.cs | 1 + .../Actions/Global/OpenHelpAction.cs | 1 + src/Files.App/Actions/Global/RedoAction.cs | 1 + src/Files.App/Actions/Global/SearchAction.cs | 1 + .../Global/ToggleCompactOverlayAction.cs | 1 + .../Actions/Global/ToggleFullScreenAction.cs | 1 + src/Files.App/Actions/Global/UndoAction.cs | 1 + .../ArrangePanesHorizontallyAction.cs | 1 + .../ArrangePanesVerticallyAction.cs | 1 + .../Navigation/CloseActivePaneAction.cs | 1 + .../Actions/Navigation/CloseAllTabsAction.cs | 1 + .../Navigation/CloseOtherTabsCurrentAction.cs | 1 + .../CloseOtherTabsSelectedAction.cs | 1 + .../Navigation/CloseSelectedTabAction.cs | 1 + .../CloseTabsToTheLeftCurrentAction.cs | 1 + .../CloseTabsToTheLeftSelectedAction.cs | 1 + .../CloseTabsToTheRightCurrentAction.cs | 1 + .../CloseTabsToTheRightSelectedAction.cs | 1 + .../Navigation/DuplicateCurrentTabAction.cs | 1 + .../Navigation/DuplicateSelectedTabAction.cs | 1 + .../Actions/Navigation/FocusOtherPane.cs | 1 + .../Actions/Navigation/NavigateBackAction.cs | 1 + .../Navigation/NavigateForwardAction.cs | 1 + .../Actions/Navigation/NavigateHomeAction.cs | 1 + .../Actions/Navigation/NavigateUpAction.cs | 1 + .../Actions/Navigation/NewTabAction.cs | 1 + .../Actions/Navigation/NewWindowAction.cs | 1 + .../Actions/Navigation/NextTabAction.cs | 1 + .../OpenInNewPane/OpenInNewPaneAction.cs | 1 + .../OpenInNewPaneFromHomeAction.cs | 1 + .../OpenInNewPaneFromSidebarAction.cs | 1 + .../OpenInNewTab/OpenInNewTabAction.cs | 1 + .../OpenInNewTabFromHomeAction.cs | 1 + .../OpenInNewTabFromSidebarAction.cs | 1 + .../OpenInNewWindow/OpenInNewWindowAction.cs | 1 + .../OpenInNewWindowFromHomeAction.cs | 1 + .../OpenInNewWindowFromSidebarAction.cs | 1 + .../Actions/Navigation/PreviousTabAction.cs | 1 + .../Navigation/ReopenClosedTabAction.cs | 1 + .../Navigation/SplitPaneHorizontallyAction.cs | 1 + .../Navigation/SplitPaneVerticallyAction.cs | 1 + .../Actions/Open/EditInNotepadAction.cs | 1 + .../Open/OpenClassicPropertiesAction.cs | 1 + .../Actions/Open/OpenCommandPaletteAction.cs | 1 + src/Files.App/Actions/Open/OpenInIDEAction.cs | 1 + .../Actions/Open/OpenLogFileAction.cs | 1 + .../Actions/Open/OpenLogFileLocationAction.cs | 1 + .../Actions/Open/OpenPropertiesAction.cs | 1 + .../Actions/Open/OpenReleaseNotesAction.cs | 1 + .../Actions/Open/OpenRepoInIDEAction.cs | 1 + .../Actions/Open/OpenSettingsAction.cs | 1 + .../Actions/Open/OpenSettingsFileAction.cs | 1 + .../Actions/Open/OpenStorageSenseAction.cs | 1 + .../Open/OpenStorageSenseFromHomeAction.cs | 1 + .../Open/OpenStorageSenseFromSidebarAction.cs | 1 + .../Actions/Open/OpenTerminalAction.cs | 1 + .../Actions/Open/OpenTerminalAsAdminAction.cs | 1 + .../Open/OpenTerminalFromHomeAction.cs | 1 + .../Open/OpenTerminalFromSidebarAction.cs | 1 + .../Actions/Show/ToggleDetailsPaneAction.cs | 1 + .../Show/ToggleDotFilesSettingAction.cs | 1 + .../Actions/Show/ToggleDualPaneAction.cs | 1 + .../Actions/Show/ToggleFilterHeaderAction.cs | 1 + .../Actions/Show/ToggleInfoPaneAction.cs | 1 + .../Actions/Show/TogglePreviewPaneAction.cs | 1 + .../Actions/Show/ToggleShelfPaneAction.cs | 1 + .../Show/ToggleShowFileExtensionsAction.cs | 1 + .../Show/ToggleShowHiddenItemsAction.cs | 1 + .../Actions/Show/ToggleToolbarAction.cs | 1 + .../Sidebar/PinFolderToSidebarAction.cs | 1 + .../Sidebar/UnpinFolderToSidebarAction.cs | 1 + .../Actions/Start/PinToStartAction.cs | 1 + .../Actions/Start/UnpinFromStartAction.cs | 1 + .../Data/Commands/Manager/CommandCodes.cs | 248 ----------- .../Data/Commands/Manager/CommandManager.cs | 385 ------------------ .../Data/Commands/Manager/ICommandManager.cs | 227 ----------- .../ContentPageContextFlyoutFactory.cs | 12 +- .../Data/Items/WidgetFileTagsContainerItem.cs | 2 +- src/Files.App/UserControls/StatusBar.xaml | 20 +- .../UserControls/SidebarViewModel.cs | 12 +- .../Widgets/DrivesWidgetViewModel.cs | 12 +- .../Widgets/FileTagsWidgetViewModel.cs | 12 +- .../NetworkLocationsWidgetViewModel.cs | 12 +- .../Widgets/QuickAccessWidgetViewModel.cs | 12 +- .../Generators/CommandManagerGenerator.cs | 130 ++++++ .../GeneratedRichCommandAttribute.cs | 9 + 155 files changed, 382 insertions(+), 915 deletions(-) delete mode 100644 src/Files.App/Data/Commands/Manager/CommandCodes.cs delete mode 100644 src/Files.App/Data/Commands/Manager/ICommandManager.cs create mode 100644 src/Files.Core.SourceGenerator/Generators/CommandManagerGenerator.cs create mode 100644 src/Files.Shared/Attributes/GeneratedRichCommandAttribute.cs diff --git a/src/Files.App/Actions/Content/Archives/Compress/CompressIntoArchiveAction.cs b/src/Files.App/Actions/Content/Archives/Compress/CompressIntoArchiveAction.cs index 43bb27483122..303e25bf99f6 100644 --- a/src/Files.App/Actions/Content/Archives/Compress/CompressIntoArchiveAction.cs +++ b/src/Files.App/Actions/Content/Archives/Compress/CompressIntoArchiveAction.cs @@ -7,6 +7,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CompressIntoArchiveAction : BaseCompressArchiveAction { public override string Label diff --git a/src/Files.App/Actions/Content/Archives/Compress/CompressIntoSevenZipAction.cs b/src/Files.App/Actions/Content/Archives/Compress/CompressIntoSevenZipAction.cs index db527502d93a..9ebbc821163d 100644 --- a/src/Files.App/Actions/Content/Archives/Compress/CompressIntoSevenZipAction.cs +++ b/src/Files.App/Actions/Content/Archives/Compress/CompressIntoSevenZipAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CompressIntoSevenZipAction : BaseCompressArchiveAction { public override string Label diff --git a/src/Files.App/Actions/Content/Archives/Compress/CompressIntoZipAction.cs b/src/Files.App/Actions/Content/Archives/Compress/CompressIntoZipAction.cs index f02c376ad7ac..d5ba7951d08a 100644 --- a/src/Files.App/Actions/Content/Archives/Compress/CompressIntoZipAction.cs +++ b/src/Files.App/Actions/Content/Archives/Compress/CompressIntoZipAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CompressIntoZipAction : BaseCompressArchiveAction { public override string Label diff --git a/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchive.cs b/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchive.cs index ecff3a898fed..3cbfbea3b828 100644 --- a/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchive.cs +++ b/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchive.cs @@ -11,7 +11,8 @@ namespace Files.App.Actions { - internal sealed partial class DecompressArchive : BaseDecompressArchiveAction + [GeneratedRichCommand] + internal sealed partial class DecompressArchiveAction : BaseDecompressArchiveAction { public override string Label => Strings.ExtractFiles.GetLocalizedResource(); @@ -22,7 +23,7 @@ public override string Description public override HotKey HotKey => new(Keys.E, KeyModifiers.Ctrl); - public DecompressArchive() + public DecompressArchiveAction() { } diff --git a/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveHere.cs b/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveHere.cs index dd4046364ed7..37169a3723d2 100644 --- a/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveHere.cs +++ b/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveHere.cs @@ -3,7 +3,8 @@ namespace Files.App.Actions { - internal sealed partial class DecompressArchiveHere : BaseDecompressArchiveAction + [GeneratedRichCommand] + internal sealed partial class DecompressArchiveHereAction : BaseDecompressArchiveAction { public override string Label => Strings.ExtractHere.GetLocalizedResource(); @@ -11,7 +12,7 @@ public override string Label public override string Description => Strings.DecompressArchiveHereDescription.GetLocalizedFormatResource(context.SelectedItems.Count); - public DecompressArchiveHere() + public DecompressArchiveHereAction() { } diff --git a/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveHereSmart.cs b/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveHereSmart.cs index 20f049351877..c886c0caf25e 100644 --- a/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveHereSmart.cs +++ b/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveHereSmart.cs @@ -3,7 +3,8 @@ namespace Files.App.Actions { - internal sealed partial class DecompressArchiveHereSmart : BaseDecompressArchiveAction + [GeneratedRichCommand] + internal sealed partial class DecompressArchiveHereSmartAction : BaseDecompressArchiveAction { public override string Label => Strings.ExtractHereSmart.GetLocalizedResource(); @@ -14,7 +15,7 @@ public override string Description public override HotKey HotKey => new(Keys.E, KeyModifiers.CtrlShift); - public DecompressArchiveHereSmart() + public DecompressArchiveHereSmartAction() { } diff --git a/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveToChildFolderAction.cs b/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveToChildFolderAction.cs index 7b0ce80f8601..b4a561bf0ed6 100644 --- a/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveToChildFolderAction.cs +++ b/src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveToChildFolderAction.cs @@ -9,6 +9,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class DecompressArchiveToChildFolderAction : BaseDecompressArchiveAction { public override string Label diff --git a/src/Files.App/Actions/Content/Background/SetAsAppBackgroundAction.cs b/src/Files.App/Actions/Content/Background/SetAsAppBackgroundAction.cs index 775f405fb3ce..802860e60321 100644 --- a/src/Files.App/Actions/Content/Background/SetAsAppBackgroundAction.cs +++ b/src/Files.App/Actions/Content/Background/SetAsAppBackgroundAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class SetAsAppBackgroundAction : BaseSetAsAction { private readonly IAppearanceSettingsService AppearanceSettingsService = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Content/Background/SetAsLockscreenBackgroundAction.cs b/src/Files.App/Actions/Content/Background/SetAsLockscreenBackgroundAction.cs index 79b6e48868b4..22eb03b4f711 100644 --- a/src/Files.App/Actions/Content/Background/SetAsLockscreenBackgroundAction.cs +++ b/src/Files.App/Actions/Content/Background/SetAsLockscreenBackgroundAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class SetAsLockscreenBackgroundAction : BaseSetAsAction { private readonly IWindowsWallpaperService WindowsWallpaperService = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Content/Background/SetAsSlideshowBackgroundAction.cs b/src/Files.App/Actions/Content/Background/SetAsSlideshowBackgroundAction.cs index f98ea84becad..f65608c12560 100644 --- a/src/Files.App/Actions/Content/Background/SetAsSlideshowBackgroundAction.cs +++ b/src/Files.App/Actions/Content/Background/SetAsSlideshowBackgroundAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class SetAsSlideshowBackgroundAction : BaseSetAsAction { private readonly IWindowsWallpaperService WindowsWallpaperService = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Content/Background/SetAsWallpaperBackgroundAction.cs b/src/Files.App/Actions/Content/Background/SetAsWallpaperBackgroundAction.cs index b8c23e4294df..de89cfca1dfb 100644 --- a/src/Files.App/Actions/Content/Background/SetAsWallpaperBackgroundAction.cs +++ b/src/Files.App/Actions/Content/Background/SetAsWallpaperBackgroundAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class SetAsWallpaperBackgroundAction : BaseSetAsAction { public override string Label diff --git a/src/Files.App/Actions/Content/ImageManipulation/RotateLeftAction.cs b/src/Files.App/Actions/Content/ImageManipulation/RotateLeftAction.cs index 1ed0a07fde26..9415b6210545 100644 --- a/src/Files.App/Actions/Content/ImageManipulation/RotateLeftAction.cs +++ b/src/Files.App/Actions/Content/ImageManipulation/RotateLeftAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class RotateLeftAction : BaseRotateAction { public override string Label diff --git a/src/Files.App/Actions/Content/ImageManipulation/RotateRightAction.cs b/src/Files.App/Actions/Content/ImageManipulation/RotateRightAction.cs index 51e05988624f..a4116d2bc353 100644 --- a/src/Files.App/Actions/Content/ImageManipulation/RotateRightAction.cs +++ b/src/Files.App/Actions/Content/ImageManipulation/RotateRightAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class RotateRightAction : BaseRotateAction { public override string Label diff --git a/src/Files.App/Actions/Content/Install/InstallCertificateAction.cs b/src/Files.App/Actions/Content/Install/InstallCertificateAction.cs index 1c9c966d81e8..216a3e96f540 100644 --- a/src/Files.App/Actions/Content/Install/InstallCertificateAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallCertificateAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class InstallCertificateAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Content/Install/InstallFontAction.cs b/src/Files.App/Actions/Content/Install/InstallFontAction.cs index 8e5dfd453481..a403acb95cef 100644 --- a/src/Files.App/Actions/Content/Install/InstallFontAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallFontAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class InstallFontAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs index 766b6b8df25f..4c7b2fe45d3c 100644 --- a/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class InstallInfDriverAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Content/PlayAllAction.cs b/src/Files.App/Actions/Content/PlayAllAction.cs index ee455cb5414d..9da7f48f2548 100644 --- a/src/Files.App/Actions/Content/PlayAllAction.cs +++ b/src/Files.App/Actions/Content/PlayAllAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class PlayAllAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Content/PreviewPopup/LaunchPreviewPopupAction.cs b/src/Files.App/Actions/Content/PreviewPopup/LaunchPreviewPopupAction.cs index ece2f77c629f..72eba5e78798 100644 --- a/src/Files.App/Actions/Content/PreviewPopup/LaunchPreviewPopupAction.cs +++ b/src/Files.App/Actions/Content/PreviewPopup/LaunchPreviewPopupAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class LaunchPreviewPopupAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Content/RefreshItemsAction.cs b/src/Files.App/Actions/Content/RefreshItemsAction.cs index a52fa26e08b9..5db81a9cbe6b 100644 --- a/src/Files.App/Actions/Content/RefreshItemsAction.cs +++ b/src/Files.App/Actions/Content/RefreshItemsAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class RefreshItemsAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Content/Run/RunAsAdminAction.cs b/src/Files.App/Actions/Content/Run/RunAsAdminAction.cs index 32990f25011b..d1455da0b17f 100644 --- a/src/Files.App/Actions/Content/Run/RunAsAdminAction.cs +++ b/src/Files.App/Actions/Content/Run/RunAsAdminAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class RunAsAdminAction : BaseRunAsAction { private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Content/Run/RunAsAnotherUserAction.cs b/src/Files.App/Actions/Content/Run/RunAsAnotherUserAction.cs index 8314ef6cab42..cfd92f995871 100644 --- a/src/Files.App/Actions/Content/Run/RunAsAnotherUserAction.cs +++ b/src/Files.App/Actions/Content/Run/RunAsAnotherUserAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class RunAsAnotherUserAction : BaseRunAsAction { private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Content/Run/RunWithPowershellAction.cs b/src/Files.App/Actions/Content/Run/RunWithPowershellAction.cs index 6e964eef36e6..9ea1cb1764c2 100644 --- a/src/Files.App/Actions/Content/Run/RunWithPowershellAction.cs +++ b/src/Files.App/Actions/Content/Run/RunWithPowershellAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class RunWithPowershellAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Content/Selection/ClearSelectionAction.cs b/src/Files.App/Actions/Content/Selection/ClearSelectionAction.cs index 30ad883f98f2..db77c0178f54 100644 --- a/src/Files.App/Actions/Content/Selection/ClearSelectionAction.cs +++ b/src/Files.App/Actions/Content/Selection/ClearSelectionAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class ClearSelectionAction : IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Content/Selection/InvertSelectionAction.cs b/src/Files.App/Actions/Content/Selection/InvertSelectionAction.cs index d3bd0c95bfd2..8c87083c9a0f 100644 --- a/src/Files.App/Actions/Content/Selection/InvertSelectionAction.cs +++ b/src/Files.App/Actions/Content/Selection/InvertSelectionAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class InvertSelectionAction : IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Content/Selection/SelectAllAction.cs b/src/Files.App/Actions/Content/Selection/SelectAllAction.cs index 0dac1beab3ad..c4a93ca420be 100644 --- a/src/Files.App/Actions/Content/Selection/SelectAllAction.cs +++ b/src/Files.App/Actions/Content/Selection/SelectAllAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class SelectAllAction : IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Content/Selection/ToggleSelectAction.cs b/src/Files.App/Actions/Content/Selection/ToggleSelectAction.cs index 41475710d0b1..840fefb9a609 100644 --- a/src/Files.App/Actions/Content/Selection/ToggleSelectAction.cs +++ b/src/Files.App/Actions/Content/Selection/ToggleSelectAction.cs @@ -6,6 +6,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class ToggleSelectAction : IAction { public string Label diff --git a/src/Files.App/Actions/Content/Share/ShareItemAction.cs b/src/Files.App/Actions/Content/Share/ShareItemAction.cs index b3e39370396b..b9ce075d1815 100644 --- a/src/Files.App/Actions/Content/Share/ShareItemAction.cs +++ b/src/Files.App/Actions/Content/Share/ShareItemAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ShareItemAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Content/Tags/OpenAllTaggedActions.cs b/src/Files.App/Actions/Content/Tags/OpenAllTaggedActions.cs index 16e6fe0c5b4f..a3312f0d2eb8 100644 --- a/src/Files.App/Actions/Content/Tags/OpenAllTaggedActions.cs +++ b/src/Files.App/Actions/Content/Tags/OpenAllTaggedActions.cs @@ -3,7 +3,8 @@ namespace Files.App.Actions { - sealed partial class OpenAllTaggedActions : ObservableObject, IAction + [GeneratedRichCommand] + sealed partial class OpenAllTaggedAction : ObservableObject, IAction { private readonly IContentPageContext _pageContext; @@ -22,7 +23,7 @@ public RichGlyph Glyph _pageContext.ShellPage is not null && _tagsContext.TaggedItems.Any(); - public OpenAllTaggedActions() + public OpenAllTaggedAction() { _pageContext = Ioc.Default.GetRequiredService(); _tagsContext = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Display/GroupAction.cs b/src/Files.App/Actions/Display/GroupAction.cs index cbef7d7dbecd..9132ecbb75bd 100644 --- a/src/Files.App/Actions/Display/GroupAction.cs +++ b/src/Files.App/Actions/Display/GroupAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class GroupByNoneAction : GroupByAction { protected override GroupOption GroupOption @@ -15,6 +16,7 @@ public override string Description => Strings.GroupByNoneDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupByNameAction : GroupByAction { protected override GroupOption GroupOption @@ -27,6 +29,7 @@ public override string Description => Strings.GroupByNameDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupByDateModifiedAction : GroupByAction { protected override GroupOption GroupOption @@ -39,6 +42,7 @@ public override string Description => Strings.GroupByDateModifiedDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupByDateCreatedAction : GroupByAction { protected override GroupOption GroupOption @@ -51,6 +55,7 @@ public override string Description => Strings.GroupByDateCreatedDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupBySizeAction : GroupByAction { protected override GroupOption GroupOption @@ -63,6 +68,7 @@ public override string Description => Strings.GroupBySizeDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupByTypeAction : GroupByAction { protected override GroupOption GroupOption @@ -75,6 +81,7 @@ public override string Description => Strings.GroupByTypeDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupBySyncStatusAction : GroupByAction { protected override GroupOption GroupOption @@ -90,6 +97,7 @@ protected override bool GetIsExecutable(ContentPageTypes pageType) => pageType is ContentPageTypes.CloudDrive; } + [GeneratedRichCommand] internal sealed partial class GroupByTagAction : GroupByAction { protected override GroupOption GroupOption @@ -102,6 +110,7 @@ public override string Description => Strings.GroupByTagDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupByOriginalFolderAction : GroupByAction { protected override GroupOption GroupOption @@ -117,6 +126,7 @@ protected override bool GetIsExecutable(ContentPageTypes pageType) => pageType is ContentPageTypes.RecycleBin; } + [GeneratedRichCommand] internal sealed partial class GroupByDateDeletedAction : GroupByAction { protected override GroupOption GroupOption @@ -132,6 +142,7 @@ protected override bool GetIsExecutable(ContentPageTypes pageType) => pageType is ContentPageTypes.RecycleBin; } + [GeneratedRichCommand] internal sealed partial class GroupByFolderPathAction : GroupByAction { protected override GroupOption GroupOption @@ -200,6 +211,7 @@ private void DisplayContext_PropertyChanged(object? sender, PropertyChangedEvent } } + [GeneratedRichCommand] internal sealed partial class GroupByDateModifiedYearAction : GroupByDateAction { protected override GroupOption GroupOption @@ -215,6 +227,7 @@ public override string Description => Strings.GroupByDateModifiedYearDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupByDateModifiedMonthAction : GroupByDateAction { protected override GroupOption GroupOption @@ -230,6 +243,7 @@ public override string Description => Strings.GroupByDateModifiedMonthDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupByDateModifiedDayAction : GroupByDateAction { protected override GroupOption GroupOption @@ -245,6 +259,7 @@ public override string Description => Strings.GroupByDateModifiedDayDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupByDateCreatedYearAction : GroupByDateAction { protected override GroupOption GroupOption @@ -260,6 +275,7 @@ public override string Description => Strings.GroupByDateCreatedYearDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupByDateCreatedMonthAction : GroupByDateAction { protected override GroupOption GroupOption @@ -275,6 +291,7 @@ public override string Description => Strings.GroupByDateCreatedMonthDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupByDateCreatedDayAction : GroupByDateAction { protected override GroupOption GroupOption @@ -290,6 +307,7 @@ public override string Description => Strings.GroupByDateCreatedDayDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class GroupByDateDeletedYearAction : GroupByDateAction { protected override GroupOption GroupOption @@ -308,6 +326,7 @@ protected override bool GetIsExecutable(ContentPageTypes pageType) => pageType is ContentPageTypes.RecycleBin; } + [GeneratedRichCommand] internal sealed partial class GroupByDateDeletedMonthAction : GroupByDateAction { protected override GroupOption GroupOption @@ -326,6 +345,7 @@ protected override bool GetIsExecutable(ContentPageTypes pageType) => pageType is ContentPageTypes.RecycleBin; } + [GeneratedRichCommand] internal sealed partial class GroupByDateDeletedDayAction : GroupByDateAction { protected override GroupOption GroupOption @@ -401,6 +421,7 @@ private void DisplayContext_PropertyChanged(object? sender, PropertyChangedEvent } } + [GeneratedRichCommand] internal sealed partial class GroupAscendingAction : ObservableObject, IToggleAction { private readonly IDisplayPageContext context; @@ -446,6 +467,7 @@ private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e) } } + [GeneratedRichCommand] internal sealed partial class GroupDescendingAction : ObservableObject, IToggleAction { private readonly IDisplayPageContext context; @@ -491,6 +513,7 @@ private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e) } } + [GeneratedRichCommand] internal sealed class ToggleGroupDirectionAction : IAction { private readonly IDisplayPageContext context; @@ -515,6 +538,7 @@ public Task ExecuteAsync(object? parameter = null) } } + [GeneratedRichCommand] internal sealed partial class GroupByYearAction : ObservableObject, IToggleAction { private readonly IDisplayPageContext context; @@ -560,6 +584,7 @@ private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e) } } + [GeneratedRichCommand] internal sealed partial class GroupByMonthAction : ObservableObject, IToggleAction { private readonly IDisplayPageContext context; @@ -605,6 +630,7 @@ private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e) } } + [GeneratedRichCommand] internal sealed class ToggleGroupByDateUnitAction : IAction { private readonly IDisplayPageContext context; diff --git a/src/Files.App/Actions/Display/LayoutAction.cs b/src/Files.App/Actions/Display/LayoutAction.cs index 1d26b8fc72cb..9d7f5a52b815 100644 --- a/src/Files.App/Actions/Display/LayoutAction.cs +++ b/src/Files.App/Actions/Display/LayoutAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class LayoutDetailsAction : ToggleLayoutAction { protected override LayoutTypes LayoutType @@ -21,6 +22,7 @@ public override HotKey HotKey => new(Keys.Number1, KeyModifiers.CtrlShift); } + [GeneratedRichCommand] internal sealed partial class LayoutListAction : ToggleLayoutAction { protected override LayoutTypes LayoutType @@ -39,6 +41,7 @@ public override HotKey HotKey => new(Keys.Number2, KeyModifiers.CtrlShift); } + [GeneratedRichCommand] internal sealed partial class LayoutCardsAction : ToggleLayoutAction { protected override LayoutTypes LayoutType @@ -57,6 +60,7 @@ public override HotKey HotKey => new(Keys.Number3, KeyModifiers.CtrlShift); } + [GeneratedRichCommand] internal sealed partial class LayoutGridAction : ToggleLayoutAction { protected override LayoutTypes LayoutType @@ -75,6 +79,7 @@ public override HotKey HotKey => new(Keys.Number4, KeyModifiers.CtrlShift); } + [GeneratedRichCommand] internal sealed partial class LayoutColumnsAction : ToggleLayoutAction { protected override LayoutTypes LayoutType @@ -93,6 +98,7 @@ public override HotKey HotKey => new(Keys.Number5, KeyModifiers.CtrlShift); } + [GeneratedRichCommand] internal sealed partial class LayoutAdaptiveAction : ToggleLayoutAction { protected override LayoutTypes LayoutType @@ -168,6 +174,7 @@ protected virtual void OnContextChanged(string propertyName) } } + [GeneratedRichCommand] internal sealed partial class LayoutDecreaseSizeAction : ObservableObject, IAction { private static readonly IUserSettingsService UserSettingsService = Ioc.Default.GetRequiredService(); @@ -256,6 +263,7 @@ public Task ExecuteAsync(object? parameter = null) } } + [GeneratedRichCommand] internal sealed partial class LayoutIncreaseSizeAction : ObservableObject, IAction { private static readonly IUserSettingsService UserSettingsService = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Display/SortAction.cs b/src/Files.App/Actions/Display/SortAction.cs index 702b4cc1e01d..3d94760c4591 100644 --- a/src/Files.App/Actions/Display/SortAction.cs +++ b/src/Files.App/Actions/Display/SortAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class SortByNameAction : SortByAction { protected override SortOption SortOption @@ -15,6 +16,7 @@ public override string Description => Strings.SortByNameDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class SortByDateModifiedAction : SortByAction { protected override SortOption SortOption @@ -27,6 +29,7 @@ public override string Description => Strings.SortByDateModifiedDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class SortByDateCreatedAction : SortByAction { protected override SortOption SortOption @@ -39,6 +42,7 @@ public override string Description => Strings.SortByDateCreatedDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class SortBySizeAction : SortByAction { protected override SortOption SortOption @@ -51,6 +55,7 @@ public override string Description => Strings.SortBySizeDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class SortByTypeAction : SortByAction { protected override SortOption SortOption @@ -63,6 +68,7 @@ public override string Description => Strings.SortByTypeDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class SortBySyncStatusAction : SortByAction { protected override SortOption SortOption @@ -78,6 +84,7 @@ protected override bool GetIsExecutable(ContentPageTypes pageType) => pageType is ContentPageTypes.CloudDrive; } + [GeneratedRichCommand] internal sealed partial class SortByTagAction : SortByAction { protected override SortOption SortOption @@ -90,6 +97,7 @@ public override string Description => Strings.SortByTagDescription.GetLocalizedResource(); } + [GeneratedRichCommand] internal sealed partial class SortByPathAction : SortByAction { protected override SortOption SortOption @@ -105,6 +113,7 @@ protected override bool GetIsExecutable(ContentPageTypes pageType) => pageType is ContentPageTypes.SearchResults; } + [GeneratedRichCommand] internal sealed partial class SortByOriginalFolderAction : SortByAction { protected override SortOption SortOption @@ -120,6 +129,7 @@ protected override bool GetIsExecutable(ContentPageTypes pageType) => pageType is ContentPageTypes.RecycleBin; } + [GeneratedRichCommand] internal sealed partial class SortByDateDeletedAction : SortByAction { protected override SortOption SortOption @@ -185,6 +195,7 @@ private void DisplayContext_PropertyChanged(object? sender, PropertyChangedEvent } } + [GeneratedRichCommand] internal sealed partial class SortAscendingAction : ObservableObject, IToggleAction { private readonly IDisplayPageContext context; @@ -220,6 +231,7 @@ private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e) } } + [GeneratedRichCommand] internal sealed partial class SortDescendingAction : ObservableObject, IToggleAction { private readonly IDisplayPageContext context; @@ -255,6 +267,7 @@ private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e) } } + [GeneratedRichCommand] internal sealed class ToggleSortDirectionAction : IAction { private readonly IDisplayPageContext context; diff --git a/src/Files.App/Actions/Display/SortFilesAndFoldersTogetherAction.cs b/src/Files.App/Actions/Display/SortFilesAndFoldersTogetherAction.cs index da9e133f30c2..f7f9885468d2 100644 --- a/src/Files.App/Actions/Display/SortFilesAndFoldersTogetherAction.cs +++ b/src/Files.App/Actions/Display/SortFilesAndFoldersTogetherAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class SortFilesAndFoldersTogetherAction : ObservableObject, IToggleAction { private readonly IDisplayPageContext context; diff --git a/src/Files.App/Actions/Display/SortFilesFirstAction.cs b/src/Files.App/Actions/Display/SortFilesFirstAction.cs index 6ea001074766..75ee3fbecd23 100644 --- a/src/Files.App/Actions/Display/SortFilesFirstAction.cs +++ b/src/Files.App/Actions/Display/SortFilesFirstAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class SortFilesFirstAction : ObservableObject, IToggleAction { private readonly IDisplayPageContext context; diff --git a/src/Files.App/Actions/Display/SortFoldersFirstAction.cs b/src/Files.App/Actions/Display/SortFoldersFirstAction.cs index 128f4560f984..ee33df722a83 100644 --- a/src/Files.App/Actions/Display/SortFoldersFirstAction.cs +++ b/src/Files.App/Actions/Display/SortFoldersFirstAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class SortFoldersFirstAction : ObservableObject, IToggleAction { private readonly IDisplayPageContext context; diff --git a/src/Files.App/Actions/FileSystem/AddItemAction.cs b/src/Files.App/Actions/FileSystem/AddItemAction.cs index ed5acade9663..86dd9d5deda1 100644 --- a/src/Files.App/Actions/FileSystem/AddItemAction.cs +++ b/src/Files.App/Actions/FileSystem/AddItemAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class AddItemAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/CopyItemPathAction.cs b/src/Files.App/Actions/FileSystem/CopyItemPathAction.cs index 722ba833d745..a4b6931cdbb6 100644 --- a/src/Files.App/Actions/FileSystem/CopyItemPathAction.cs +++ b/src/Files.App/Actions/FileSystem/CopyItemPathAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class CopyItemPathAction : IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/CopyItemPathWithQuotesAction.cs b/src/Files.App/Actions/FileSystem/CopyItemPathWithQuotesAction.cs index e0cb04ac135f..eda8e00bf5e7 100644 --- a/src/Files.App/Actions/FileSystem/CopyItemPathWithQuotesAction.cs +++ b/src/Files.App/Actions/FileSystem/CopyItemPathWithQuotesAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class CopyItemPathWithQuotesAction : IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/CopyPathAction.cs b/src/Files.App/Actions/FileSystem/CopyPathAction.cs index de8ceac777dd..386378f947f2 100644 --- a/src/Files.App/Actions/FileSystem/CopyPathAction.cs +++ b/src/Files.App/Actions/FileSystem/CopyPathAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class CopyPathAction : IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/CopyPathWithQuotesAction.cs b/src/Files.App/Actions/FileSystem/CopyPathWithQuotesAction.cs index db4d0d15880f..2efe1ee4404f 100644 --- a/src/Files.App/Actions/FileSystem/CopyPathWithQuotesAction.cs +++ b/src/Files.App/Actions/FileSystem/CopyPathWithQuotesAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class CopyPathWithQuotesAction : IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/CreateAlternateDataStreamAction.cs b/src/Files.App/Actions/FileSystem/CreateAlternateDataStreamAction.cs index c12a16cf2378..a637c3f80b23 100644 --- a/src/Files.App/Actions/FileSystem/CreateAlternateDataStreamAction.cs +++ b/src/Files.App/Actions/FileSystem/CreateAlternateDataStreamAction.cs @@ -6,6 +6,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CreateAlternateDataStreamAction : BaseUIAction, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/CreateFolderAction.cs b/src/Files.App/Actions/FileSystem/CreateFolderAction.cs index 2bf96c06f44d..b4f268d68c15 100644 --- a/src/Files.App/Actions/FileSystem/CreateFolderAction.cs +++ b/src/Files.App/Actions/FileSystem/CreateFolderAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CreateFolderAction : BaseUIAction, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/CreateFolderWithSelectionAction.cs b/src/Files.App/Actions/FileSystem/CreateFolderWithSelectionAction.cs index b567de61bebb..930a72295de8 100644 --- a/src/Files.App/Actions/FileSystem/CreateFolderWithSelectionAction.cs +++ b/src/Files.App/Actions/FileSystem/CreateFolderWithSelectionAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CreateFolderWithSelectionAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/CreateShortcutAction.cs b/src/Files.App/Actions/FileSystem/CreateShortcutAction.cs index a39ca5e8481e..632d6d2cb919 100644 --- a/src/Files.App/Actions/FileSystem/CreateShortcutAction.cs +++ b/src/Files.App/Actions/FileSystem/CreateShortcutAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CreateShortcutAction : BaseUIAction, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/CreateShortcutFromDialogAction.cs b/src/Files.App/Actions/FileSystem/CreateShortcutFromDialogAction.cs index ed4c1ef6bb0b..3024287e7ae6 100644 --- a/src/Files.App/Actions/FileSystem/CreateShortcutFromDialogAction.cs +++ b/src/Files.App/Actions/FileSystem/CreateShortcutFromDialogAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CreateShortcutFromDialogAction : BaseUIAction, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/DeleteItemAction.cs b/src/Files.App/Actions/FileSystem/DeleteItemAction.cs index 6c6dee5aee55..e89f36327f05 100644 --- a/src/Files.App/Actions/FileSystem/DeleteItemAction.cs +++ b/src/Files.App/Actions/FileSystem/DeleteItemAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class DeleteItemAction : BaseDeleteAction, IAction { public string Label diff --git a/src/Files.App/Actions/FileSystem/DeleteItemPermanentlyAction.cs b/src/Files.App/Actions/FileSystem/DeleteItemPermanentlyAction.cs index 98530e19cad0..a7536fa726d2 100644 --- a/src/Files.App/Actions/FileSystem/DeleteItemPermanentlyAction.cs +++ b/src/Files.App/Actions/FileSystem/DeleteItemPermanentlyAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class DeleteItemPermanentlyAction : BaseDeleteAction, IAction { public string Label diff --git a/src/Files.App/Actions/FileSystem/EmptyRecycleBinAction.cs b/src/Files.App/Actions/FileSystem/EmptyRecycleBinAction.cs index f15eec857040..cd833be3d9bd 100644 --- a/src/Files.App/Actions/FileSystem/EmptyRecycleBinAction.cs +++ b/src/Files.App/Actions/FileSystem/EmptyRecycleBinAction.cs @@ -6,6 +6,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class EmptyRecycleBinAction : BaseUIAction, IAction { private readonly IStorageTrashBinService StorageTrashBinService = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/FileSystem/FlattenFolderAction.cs b/src/Files.App/Actions/FileSystem/FlattenFolderAction.cs index b975c2b74768..73409a6218b8 100644 --- a/src/Files.App/Actions/FileSystem/FlattenFolderAction.cs +++ b/src/Files.App/Actions/FileSystem/FlattenFolderAction.cs @@ -9,6 +9,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class FlattenFolderAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/FormatDriveAction.cs b/src/Files.App/Actions/FileSystem/FormatDriveAction.cs index a0c269b05607..514d4c100b3f 100644 --- a/src/Files.App/Actions/FileSystem/FormatDriveAction.cs +++ b/src/Files.App/Actions/FileSystem/FormatDriveAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal partial class FormatDriveAction : ObservableObject, IAction { private readonly IContentPageContext context = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/FileSystem/FormatDriveFromHomeAction.cs b/src/Files.App/Actions/FileSystem/FormatDriveFromHomeAction.cs index d15a67720666..4811d0c928b7 100644 --- a/src/Files.App/Actions/FileSystem/FormatDriveFromHomeAction.cs +++ b/src/Files.App/Actions/FileSystem/FormatDriveFromHomeAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class FormatDriveFromHomeAction : FormatDriveAction { private IHomePageContext HomePageContext { get; } = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/FileSystem/FormatDriveFromSidebarAction.cs b/src/Files.App/Actions/FileSystem/FormatDriveFromSidebarAction.cs index 6dbd267dae79..a223421b8323 100644 --- a/src/Files.App/Actions/FileSystem/FormatDriveFromSidebarAction.cs +++ b/src/Files.App/Actions/FileSystem/FormatDriveFromSidebarAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class FormatDriveFromSidebarAction : FormatDriveAction { private ISidebarContext SidebarContext { get; } = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/FileSystem/OpenFileLocationAction.cs b/src/Files.App/Actions/FileSystem/OpenFileLocationAction.cs index 319f26827153..dd3649cb2352 100644 --- a/src/Files.App/Actions/FileSystem/OpenFileLocationAction.cs +++ b/src/Files.App/Actions/FileSystem/OpenFileLocationAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenFileLocationAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/OpenItemAction.cs b/src/Files.App/Actions/FileSystem/OpenItemAction.cs index 87519b842cda..8d9d6bb3aab3 100644 --- a/src/Files.App/Actions/FileSystem/OpenItemAction.cs +++ b/src/Files.App/Actions/FileSystem/OpenItemAction.cs @@ -6,6 +6,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenItemAction : ObservableObject, IAction { private readonly IContentPageContext context; @@ -50,6 +51,7 @@ private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e) } } + [GeneratedRichCommand] internal sealed partial class OpenItemWithApplicationPickerAction : ObservableObject, IAction { private readonly IContentPageContext context; @@ -91,6 +93,7 @@ private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e) } } + [GeneratedRichCommand] internal sealed partial class OpenParentFolderAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/PasteItemAction.cs b/src/Files.App/Actions/FileSystem/PasteItemAction.cs index 147e0d0293d4..cd034bcb502d 100644 --- a/src/Files.App/Actions/FileSystem/PasteItemAction.cs +++ b/src/Files.App/Actions/FileSystem/PasteItemAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class PasteItemAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/PasteItemAsShortcutAction.cs b/src/Files.App/Actions/FileSystem/PasteItemAsShortcutAction.cs index 798df1e6d748..2a0c5b622570 100644 --- a/src/Files.App/Actions/FileSystem/PasteItemAsShortcutAction.cs +++ b/src/Files.App/Actions/FileSystem/PasteItemAsShortcutAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class PasteItemAsShortcutAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs b/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs index c37664b9733a..c0133f5d0fff 100644 --- a/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs +++ b/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class PasteItemToSelectionAction : BaseUIAction, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/RenameAction.cs b/src/Files.App/Actions/FileSystem/RenameAction.cs index 03126a953100..a6c4821e9076 100644 --- a/src/Files.App/Actions/FileSystem/RenameAction.cs +++ b/src/Files.App/Actions/FileSystem/RenameAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class RenameAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/RestoreAllRecycleBinAction.cs b/src/Files.App/Actions/FileSystem/RestoreAllRecycleBinAction.cs index 4c87b4007759..464450b0bd48 100644 --- a/src/Files.App/Actions/FileSystem/RestoreAllRecycleBinAction.cs +++ b/src/Files.App/Actions/FileSystem/RestoreAllRecycleBinAction.cs @@ -6,6 +6,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class RestoreAllRecycleBinAction : BaseUIAction, IAction { private readonly IStorageTrashBinService StorageTrashBinService = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/FileSystem/RestoreRecycleBinAction.cs b/src/Files.App/Actions/FileSystem/RestoreRecycleBinAction.cs index 9745abaad457..dd1ff368800d 100644 --- a/src/Files.App/Actions/FileSystem/RestoreRecycleBinAction.cs +++ b/src/Files.App/Actions/FileSystem/RestoreRecycleBinAction.cs @@ -7,6 +7,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class RestoreRecycleBinAction : BaseUIAction, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/FileSystem/Transfer/CopyItemAction.cs b/src/Files.App/Actions/FileSystem/Transfer/CopyItemAction.cs index 6e8c90167cab..29992603ffbb 100644 --- a/src/Files.App/Actions/FileSystem/Transfer/CopyItemAction.cs +++ b/src/Files.App/Actions/FileSystem/Transfer/CopyItemAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CopyItemAction : BaseTransferItemAction, IAction { public string Label diff --git a/src/Files.App/Actions/FileSystem/Transfer/CutItemAction.cs b/src/Files.App/Actions/FileSystem/Transfer/CutItemAction.cs index fd9008a4bcd5..bb8a42f583c1 100644 --- a/src/Files.App/Actions/FileSystem/Transfer/CutItemAction.cs +++ b/src/Files.App/Actions/FileSystem/Transfer/CutItemAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CutItemAction : BaseTransferItemAction, IAction { public string Label diff --git a/src/Files.App/Actions/Git/GitCloneAction.cs b/src/Files.App/Actions/Git/GitCloneAction.cs index f5e879203fdd..991425afcfde 100644 --- a/src/Files.App/Actions/Git/GitCloneAction.cs +++ b/src/Files.App/Actions/Git/GitCloneAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class GitCloneAction : ObservableObject, IAction { private readonly IContentPageContext pageContext = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Git/GitFetchAction.cs b/src/Files.App/Actions/Git/GitFetchAction.cs index dc0a3842ef50..26e84936f9d8 100644 --- a/src/Files.App/Actions/Git/GitFetchAction.cs +++ b/src/Files.App/Actions/Git/GitFetchAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class GitFetchAction : ObservableObject, IAction { private readonly IContentPageContext _context; diff --git a/src/Files.App/Actions/Git/GitInitAction.cs b/src/Files.App/Actions/Git/GitInitAction.cs index 11f323948793..25124f099b90 100644 --- a/src/Files.App/Actions/Git/GitInitAction.cs +++ b/src/Files.App/Actions/Git/GitInitAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] sealed partial class GitInitAction : ObservableObject, IAction { private readonly IContentPageContext _context; diff --git a/src/Files.App/Actions/Git/GitPullAction.cs b/src/Files.App/Actions/Git/GitPullAction.cs index a82c36606a70..b63e2b340e50 100644 --- a/src/Files.App/Actions/Git/GitPullAction.cs +++ b/src/Files.App/Actions/Git/GitPullAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class GitPullAction : ObservableObject, IAction { private readonly IContentPageContext _context; diff --git a/src/Files.App/Actions/Git/GitPushAction.cs b/src/Files.App/Actions/Git/GitPushAction.cs index 79c3150f1dfa..190e7a8c01c2 100644 --- a/src/Files.App/Actions/Git/GitPushAction.cs +++ b/src/Files.App/Actions/Git/GitPushAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class GitPushAction : ObservableObject, IAction { private readonly IContentPageContext _context; diff --git a/src/Files.App/Actions/Git/GitSyncAction.cs b/src/Files.App/Actions/Git/GitSyncAction.cs index d33da75b58b6..327fc1d8a67f 100644 --- a/src/Files.App/Actions/Git/GitSyncAction.cs +++ b/src/Files.App/Actions/Git/GitSyncAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class GitSyncAction : ObservableObject, IAction { private readonly IContentPageContext _context; diff --git a/src/Files.App/Actions/Global/EditPathAction.cs b/src/Files.App/Actions/Global/EditPathAction.cs index 302c9d0f9b30..f2edf7b79247 100644 --- a/src/Files.App/Actions/Global/EditPathAction.cs +++ b/src/Files.App/Actions/Global/EditPathAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class EditPathAction : IAction { private readonly IContentPageContext context = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Global/EnterCompactOverlayAction.cs b/src/Files.App/Actions/Global/EnterCompactOverlayAction.cs index 572a16de17d8..5c5452c423c4 100644 --- a/src/Files.App/Actions/Global/EnterCompactOverlayAction.cs +++ b/src/Files.App/Actions/Global/EnterCompactOverlayAction.cs @@ -6,6 +6,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class EnterCompactOverlayAction : ObservableObject, IAction { private readonly IWindowContext windowContext; diff --git a/src/Files.App/Actions/Global/ExitCompactOverlayAction.cs b/src/Files.App/Actions/Global/ExitCompactOverlayAction.cs index a14505d5b6ac..9c4801ccb56c 100644 --- a/src/Files.App/Actions/Global/ExitCompactOverlayAction.cs +++ b/src/Files.App/Actions/Global/ExitCompactOverlayAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ExitCompactOverlayAction : ObservableObject, IAction { private readonly IWindowContext windowContext; diff --git a/src/Files.App/Actions/Global/OpenHelpAction.cs b/src/Files.App/Actions/Global/OpenHelpAction.cs index a94c4c4fca49..86ca49ead1a1 100644 --- a/src/Files.App/Actions/Global/OpenHelpAction.cs +++ b/src/Files.App/Actions/Global/OpenHelpAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class OpenHelpAction : IAction { public string Label diff --git a/src/Files.App/Actions/Global/RedoAction.cs b/src/Files.App/Actions/Global/RedoAction.cs index 834def9fc0f8..8a13a12ac43b 100644 --- a/src/Files.App/Actions/Global/RedoAction.cs +++ b/src/Files.App/Actions/Global/RedoAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class RedoAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Global/SearchAction.cs b/src/Files.App/Actions/Global/SearchAction.cs index 446a301695a4..619fd9f998e0 100644 --- a/src/Files.App/Actions/Global/SearchAction.cs +++ b/src/Files.App/Actions/Global/SearchAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class SearchAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Global/ToggleCompactOverlayAction.cs b/src/Files.App/Actions/Global/ToggleCompactOverlayAction.cs index bba978af95b9..dbaad6b4a481 100644 --- a/src/Files.App/Actions/Global/ToggleCompactOverlayAction.cs +++ b/src/Files.App/Actions/Global/ToggleCompactOverlayAction.cs @@ -6,6 +6,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ToggleCompactOverlayAction : ObservableObject, IToggleAction { private readonly IWindowContext windowContext; diff --git a/src/Files.App/Actions/Global/ToggleFullScreenAction.cs b/src/Files.App/Actions/Global/ToggleFullScreenAction.cs index 735f14c0eacc..d8db386c0097 100644 --- a/src/Files.App/Actions/Global/ToggleFullScreenAction.cs +++ b/src/Files.App/Actions/Global/ToggleFullScreenAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class ToggleFullScreenAction : IToggleAction { public string Label diff --git a/src/Files.App/Actions/Global/UndoAction.cs b/src/Files.App/Actions/Global/UndoAction.cs index ea464ce1de7b..c5e0706d843d 100644 --- a/src/Files.App/Actions/Global/UndoAction.cs +++ b/src/Files.App/Actions/Global/UndoAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class UndoAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Navigation/ArrangePanesHorizontallyAction.cs b/src/Files.App/Actions/Navigation/ArrangePanesHorizontallyAction.cs index 7651851893ef..99bc17db570b 100644 --- a/src/Files.App/Actions/Navigation/ArrangePanesHorizontallyAction.cs +++ b/src/Files.App/Actions/Navigation/ArrangePanesHorizontallyAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ArrangePanesHorizontallyAction : ObservableObject, IToggleAction { private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Navigation/ArrangePanesVerticallyAction.cs b/src/Files.App/Actions/Navigation/ArrangePanesVerticallyAction.cs index 264f1291afe2..bc855fe6bc70 100644 --- a/src/Files.App/Actions/Navigation/ArrangePanesVerticallyAction.cs +++ b/src/Files.App/Actions/Navigation/ArrangePanesVerticallyAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ArrangePanesVerticallyAction : ObservableObject, IToggleAction { private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Navigation/CloseActivePaneAction.cs b/src/Files.App/Actions/Navigation/CloseActivePaneAction.cs index 3cb9ba926031..379f848856d3 100644 --- a/src/Files.App/Actions/Navigation/CloseActivePaneAction.cs +++ b/src/Files.App/Actions/Navigation/CloseActivePaneAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CloseActivePaneAction : ObservableObject, IAction { private IContentPageContext ContentPageContext { get; } = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Navigation/CloseAllTabsAction.cs b/src/Files.App/Actions/Navigation/CloseAllTabsAction.cs index 49f80dbc6ce5..36b4f4ddf3bc 100644 --- a/src/Files.App/Actions/Navigation/CloseAllTabsAction.cs +++ b/src/Files.App/Actions/Navigation/CloseAllTabsAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CloseAllTabsAction : CloseTabBaseAction { public override string Label diff --git a/src/Files.App/Actions/Navigation/CloseOtherTabsCurrentAction.cs b/src/Files.App/Actions/Navigation/CloseOtherTabsCurrentAction.cs index 3b1367157378..b051a2164835 100644 --- a/src/Files.App/Actions/Navigation/CloseOtherTabsCurrentAction.cs +++ b/src/Files.App/Actions/Navigation/CloseOtherTabsCurrentAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CloseOtherTabsCurrentAction : CloseTabBaseAction { public override string Label diff --git a/src/Files.App/Actions/Navigation/CloseOtherTabsSelectedAction.cs b/src/Files.App/Actions/Navigation/CloseOtherTabsSelectedAction.cs index 54ab2c7644ea..efa757d56554 100644 --- a/src/Files.App/Actions/Navigation/CloseOtherTabsSelectedAction.cs +++ b/src/Files.App/Actions/Navigation/CloseOtherTabsSelectedAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CloseOtherTabsSelectedAction : CloseTabBaseAction { public override string Label diff --git a/src/Files.App/Actions/Navigation/CloseSelectedTabAction.cs b/src/Files.App/Actions/Navigation/CloseSelectedTabAction.cs index 19fb4b6cfaf3..8463ae9b19e2 100644 --- a/src/Files.App/Actions/Navigation/CloseSelectedTabAction.cs +++ b/src/Files.App/Actions/Navigation/CloseSelectedTabAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CloseSelectedTabAction : CloseTabBaseAction { public override string Label diff --git a/src/Files.App/Actions/Navigation/CloseTabsToTheLeftCurrentAction.cs b/src/Files.App/Actions/Navigation/CloseTabsToTheLeftCurrentAction.cs index 94ba69a0536b..78632c896a9c 100644 --- a/src/Files.App/Actions/Navigation/CloseTabsToTheLeftCurrentAction.cs +++ b/src/Files.App/Actions/Navigation/CloseTabsToTheLeftCurrentAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CloseTabsToTheLeftCurrentAction : CloseTabBaseAction { public override string Label diff --git a/src/Files.App/Actions/Navigation/CloseTabsToTheLeftSelectedAction.cs b/src/Files.App/Actions/Navigation/CloseTabsToTheLeftSelectedAction.cs index dad492651c29..4ca4e35a9fa4 100644 --- a/src/Files.App/Actions/Navigation/CloseTabsToTheLeftSelectedAction.cs +++ b/src/Files.App/Actions/Navigation/CloseTabsToTheLeftSelectedAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CloseTabsToTheLeftSelectedAction : CloseTabBaseAction { public override string Label diff --git a/src/Files.App/Actions/Navigation/CloseTabsToTheRightCurrentAction.cs b/src/Files.App/Actions/Navigation/CloseTabsToTheRightCurrentAction.cs index c72dcfdadff0..951ad2c2812e 100644 --- a/src/Files.App/Actions/Navigation/CloseTabsToTheRightCurrentAction.cs +++ b/src/Files.App/Actions/Navigation/CloseTabsToTheRightCurrentAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CloseTabsToTheRightCurrentAction : CloseTabBaseAction { public override string Label diff --git a/src/Files.App/Actions/Navigation/CloseTabsToTheRightSelectedAction.cs b/src/Files.App/Actions/Navigation/CloseTabsToTheRightSelectedAction.cs index 4e8569149ced..a49b56b93d8d 100644 --- a/src/Files.App/Actions/Navigation/CloseTabsToTheRightSelectedAction.cs +++ b/src/Files.App/Actions/Navigation/CloseTabsToTheRightSelectedAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class CloseTabsToTheRightSelectedAction : CloseTabBaseAction { public override string Label diff --git a/src/Files.App/Actions/Navigation/DuplicateCurrentTabAction.cs b/src/Files.App/Actions/Navigation/DuplicateCurrentTabAction.cs index d874d56ab984..9c5c51fc2a57 100644 --- a/src/Files.App/Actions/Navigation/DuplicateCurrentTabAction.cs +++ b/src/Files.App/Actions/Navigation/DuplicateCurrentTabAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class DuplicateCurrentTabAction : IAction { private readonly IMultitaskingContext context; diff --git a/src/Files.App/Actions/Navigation/DuplicateSelectedTabAction.cs b/src/Files.App/Actions/Navigation/DuplicateSelectedTabAction.cs index 34b674b5efa8..b0102f15f1e0 100644 --- a/src/Files.App/Actions/Navigation/DuplicateSelectedTabAction.cs +++ b/src/Files.App/Actions/Navigation/DuplicateSelectedTabAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class DuplicateSelectedTabAction : ObservableObject, IAction { private readonly IMultitaskingContext context; diff --git a/src/Files.App/Actions/Navigation/FocusOtherPane.cs b/src/Files.App/Actions/Navigation/FocusOtherPane.cs index 668c374b1dc6..937aa1e8bacd 100644 --- a/src/Files.App/Actions/Navigation/FocusOtherPane.cs +++ b/src/Files.App/Actions/Navigation/FocusOtherPane.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class FocusOtherPaneAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Navigation/NavigateBackAction.cs b/src/Files.App/Actions/Navigation/NavigateBackAction.cs index 1f1c2fe4d3bb..1adcbe627616 100644 --- a/src/Files.App/Actions/Navigation/NavigateBackAction.cs +++ b/src/Files.App/Actions/Navigation/NavigateBackAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class NavigateBackAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Navigation/NavigateForwardAction.cs b/src/Files.App/Actions/Navigation/NavigateForwardAction.cs index ac0f666c93da..729a1deca780 100644 --- a/src/Files.App/Actions/Navigation/NavigateForwardAction.cs +++ b/src/Files.App/Actions/Navigation/NavigateForwardAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class NavigateForwardAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Navigation/NavigateHomeAction.cs b/src/Files.App/Actions/Navigation/NavigateHomeAction.cs index e457512440b0..cb49894d2380 100644 --- a/src/Files.App/Actions/Navigation/NavigateHomeAction.cs +++ b/src/Files.App/Actions/Navigation/NavigateHomeAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class NavigateHomeAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Navigation/NavigateUpAction.cs b/src/Files.App/Actions/Navigation/NavigateUpAction.cs index a5da20fad4a7..f14a8ed3c82d 100644 --- a/src/Files.App/Actions/Navigation/NavigateUpAction.cs +++ b/src/Files.App/Actions/Navigation/NavigateUpAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class NavigateUpAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Navigation/NewTabAction.cs b/src/Files.App/Actions/Navigation/NewTabAction.cs index a40b57f1c7de..70e568b66fa1 100644 --- a/src/Files.App/Actions/Navigation/NewTabAction.cs +++ b/src/Files.App/Actions/Navigation/NewTabAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class NewTabAction : IAction { public string Label diff --git a/src/Files.App/Actions/Navigation/NewWindowAction.cs b/src/Files.App/Actions/Navigation/NewWindowAction.cs index 3deed8ae645e..c4ba340f6776 100644 --- a/src/Files.App/Actions/Navigation/NewWindowAction.cs +++ b/src/Files.App/Actions/Navigation/NewWindowAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class NewWindowAction : IAction { public string Label diff --git a/src/Files.App/Actions/Navigation/NextTabAction.cs b/src/Files.App/Actions/Navigation/NextTabAction.cs index b533d4d3cc22..f8e47394eab4 100644 --- a/src/Files.App/Actions/Navigation/NextTabAction.cs +++ b/src/Files.App/Actions/Navigation/NextTabAction.cs @@ -6,6 +6,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class NextTabAction : ObservableObject, IAction { private readonly IMultitaskingContext multitaskingContext; diff --git a/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneAction.cs b/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneAction.cs index 4935f12a3694..ddb604db588d 100644 --- a/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneAction.cs +++ b/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenInNewPaneAction : BaseOpenInNewPaneAction { } diff --git a/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneFromHomeAction.cs b/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneFromHomeAction.cs index 90123bc1ec46..84a3bceecc47 100644 --- a/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneFromHomeAction.cs +++ b/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneFromHomeAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenInNewPaneFromHomeAction : BaseOpenInNewPaneAction { public override bool IsExecutable => diff --git a/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneFromSidebarAction.cs b/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneFromSidebarAction.cs index a1feb4033803..2eccb829566a 100644 --- a/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneFromSidebarAction.cs +++ b/src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneFromSidebarAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenInNewPaneFromSidebarAction : BaseOpenInNewPaneAction { public override bool IsExecutable => diff --git a/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabAction.cs b/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabAction.cs index b9e8c086d80f..6811dd928031 100644 --- a/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabAction.cs +++ b/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenInNewTabAction : BaseOpenInNewTabAction { } diff --git a/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabFromHomeAction.cs b/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabFromHomeAction.cs index c81c353bda27..b68c5eca6c30 100644 --- a/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabFromHomeAction.cs +++ b/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabFromHomeAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenInNewTabFromHomeAction : BaseOpenInNewTabAction { public override bool IsExecutable => diff --git a/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabFromSidebarAction.cs b/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabFromSidebarAction.cs index 5c0acfcecdeb..e9bf87960abe 100644 --- a/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabFromSidebarAction.cs +++ b/src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabFromSidebarAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenInNewTabFromSidebarAction : BaseOpenInNewTabAction { public override bool IsExecutable => diff --git a/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowAction.cs b/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowAction.cs index 9f29a92a2522..1a50cc9cea7e 100644 --- a/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowAction.cs +++ b/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenInNewWindowAction : BaseOpenInNewWindowAction { } diff --git a/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowFromHomeAction.cs b/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowFromHomeAction.cs index b6cad4d7176b..2e3625f43020 100644 --- a/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowFromHomeAction.cs +++ b/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowFromHomeAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenInNewWindowFromHomeAction : BaseOpenInNewWindowAction { public override HotKey HotKey diff --git a/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowFromSidebarAction.cs b/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowFromSidebarAction.cs index 4844fbd46296..9bb54c1b2090 100644 --- a/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowFromSidebarAction.cs +++ b/src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowFromSidebarAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenInNewWindowFromSidebarAction : BaseOpenInNewWindowAction { public override HotKey HotKey diff --git a/src/Files.App/Actions/Navigation/PreviousTabAction.cs b/src/Files.App/Actions/Navigation/PreviousTabAction.cs index dbbb49ec4882..5ce5e459e028 100644 --- a/src/Files.App/Actions/Navigation/PreviousTabAction.cs +++ b/src/Files.App/Actions/Navigation/PreviousTabAction.cs @@ -6,6 +6,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class PreviousTabAction : ObservableObject, IAction { private readonly IMultitaskingContext multitaskingContext; diff --git a/src/Files.App/Actions/Navigation/ReopenClosedTabAction.cs b/src/Files.App/Actions/Navigation/ReopenClosedTabAction.cs index 2be7e45b532b..5903e8e4c4f5 100644 --- a/src/Files.App/Actions/Navigation/ReopenClosedTabAction.cs +++ b/src/Files.App/Actions/Navigation/ReopenClosedTabAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ReopenClosedTabAction : ObservableObject, IAction { private readonly IMultitaskingContext context; diff --git a/src/Files.App/Actions/Navigation/SplitPaneHorizontallyAction.cs b/src/Files.App/Actions/Navigation/SplitPaneHorizontallyAction.cs index 58d72fb8b711..6dfb0ac6daca 100644 --- a/src/Files.App/Actions/Navigation/SplitPaneHorizontallyAction.cs +++ b/src/Files.App/Actions/Navigation/SplitPaneHorizontallyAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class SplitPaneHorizontallyAction : ObservableObject, IAction { private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Navigation/SplitPaneVerticallyAction.cs b/src/Files.App/Actions/Navigation/SplitPaneVerticallyAction.cs index 599b4353734e..49e4a4cde7dd 100644 --- a/src/Files.App/Actions/Navigation/SplitPaneVerticallyAction.cs +++ b/src/Files.App/Actions/Navigation/SplitPaneVerticallyAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class SplitPaneVerticallyAction : ObservableObject, IAction { private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Open/EditInNotepadAction.cs b/src/Files.App/Actions/Open/EditInNotepadAction.cs index fe39f2dae1e3..042283120e4d 100644 --- a/src/Files.App/Actions/Open/EditInNotepadAction.cs +++ b/src/Files.App/Actions/Open/EditInNotepadAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class EditInNotepadAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Open/OpenClassicPropertiesAction.cs b/src/Files.App/Actions/Open/OpenClassicPropertiesAction.cs index 5a8640e4d381..d3d3c40a9964 100644 --- a/src/Files.App/Actions/Open/OpenClassicPropertiesAction.cs +++ b/src/Files.App/Actions/Open/OpenClassicPropertiesAction.cs @@ -7,6 +7,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenClassicPropertiesAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Open/OpenCommandPaletteAction.cs b/src/Files.App/Actions/Open/OpenCommandPaletteAction.cs index e39b27161a7a..c8f468d74555 100644 --- a/src/Files.App/Actions/Open/OpenCommandPaletteAction.cs +++ b/src/Files.App/Actions/Open/OpenCommandPaletteAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class OpenCommandPaletteAction : IAction { private readonly IContentPageContext _context; diff --git a/src/Files.App/Actions/Open/OpenInIDEAction.cs b/src/Files.App/Actions/Open/OpenInIDEAction.cs index e8962a3273b6..ae96df56b042 100644 --- a/src/Files.App/Actions/Open/OpenInIDEAction.cs +++ b/src/Files.App/Actions/Open/OpenInIDEAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenInIDEAction : ObservableObject, IAction { private readonly IDevToolsSettingsService _devToolsSettingsService; diff --git a/src/Files.App/Actions/Open/OpenLogFileAction.cs b/src/Files.App/Actions/Open/OpenLogFileAction.cs index cab05e52f36f..d11628fe3028 100644 --- a/src/Files.App/Actions/Open/OpenLogFileAction.cs +++ b/src/Files.App/Actions/Open/OpenLogFileAction.cs @@ -9,6 +9,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenLogFileAction : IAction { public string Label diff --git a/src/Files.App/Actions/Open/OpenLogFileLocationAction.cs b/src/Files.App/Actions/Open/OpenLogFileLocationAction.cs index 60dd1d85cc9d..e12d85231d51 100644 --- a/src/Files.App/Actions/Open/OpenLogFileLocationAction.cs +++ b/src/Files.App/Actions/Open/OpenLogFileLocationAction.cs @@ -6,6 +6,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenLogFileLocationAction : IAction { public string Label diff --git a/src/Files.App/Actions/Open/OpenPropertiesAction.cs b/src/Files.App/Actions/Open/OpenPropertiesAction.cs index 2cc4247eb02b..968993902b76 100644 --- a/src/Files.App/Actions/Open/OpenPropertiesAction.cs +++ b/src/Files.App/Actions/Open/OpenPropertiesAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenPropertiesAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Open/OpenReleaseNotesAction.cs b/src/Files.App/Actions/Open/OpenReleaseNotesAction.cs index 7e2fc918e536..a409001df525 100644 --- a/src/Files.App/Actions/Open/OpenReleaseNotesAction.cs +++ b/src/Files.App/Actions/Open/OpenReleaseNotesAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenReleaseNotesAction : ObservableObject, IAction { private readonly IContentPageContext context = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Open/OpenRepoInIDEAction.cs b/src/Files.App/Actions/Open/OpenRepoInIDEAction.cs index c4c3d5514f30..e575dd5f64f5 100644 --- a/src/Files.App/Actions/Open/OpenRepoInIDEAction.cs +++ b/src/Files.App/Actions/Open/OpenRepoInIDEAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenRepoInIDEAction : ObservableObject, IAction { private readonly IDevToolsSettingsService _devToolsSettingsService; diff --git a/src/Files.App/Actions/Open/OpenSettingsAction.cs b/src/Files.App/Actions/Open/OpenSettingsAction.cs index 1278f0560df6..29c59c09c035 100644 --- a/src/Files.App/Actions/Open/OpenSettingsAction.cs +++ b/src/Files.App/Actions/Open/OpenSettingsAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenSettingsAction : BaseUIAction, IAction { private readonly IDialogService dialogService = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Open/OpenSettingsFileAction.cs b/src/Files.App/Actions/Open/OpenSettingsFileAction.cs index efdf25854d43..753e0f345495 100644 --- a/src/Files.App/Actions/Open/OpenSettingsFileAction.cs +++ b/src/Files.App/Actions/Open/OpenSettingsFileAction.cs @@ -9,6 +9,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenSettingsFileAction : IAction { public string Label diff --git a/src/Files.App/Actions/Open/OpenStorageSenseAction.cs b/src/Files.App/Actions/Open/OpenStorageSenseAction.cs index 76cb0ccba062..a420c9f410e4 100644 --- a/src/Files.App/Actions/Open/OpenStorageSenseAction.cs +++ b/src/Files.App/Actions/Open/OpenStorageSenseAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal partial class OpenStorageSenseAction : ObservableObject, IAction { private readonly IContentPageContext context = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Open/OpenStorageSenseFromHomeAction.cs b/src/Files.App/Actions/Open/OpenStorageSenseFromHomeAction.cs index c53306aafb26..212dc08a42d7 100644 --- a/src/Files.App/Actions/Open/OpenStorageSenseFromHomeAction.cs +++ b/src/Files.App/Actions/Open/OpenStorageSenseFromHomeAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenStorageSenseFromHomeAction : OpenStorageSenseAction { private IHomePageContext HomePageContext { get; } = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Open/OpenStorageSenseFromSidebarAction.cs b/src/Files.App/Actions/Open/OpenStorageSenseFromSidebarAction.cs index 4901ab49db72..0f5f5e0f98c0 100644 --- a/src/Files.App/Actions/Open/OpenStorageSenseFromSidebarAction.cs +++ b/src/Files.App/Actions/Open/OpenStorageSenseFromSidebarAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenStorageSenseFromSidebarAction : OpenStorageSenseAction { private ISidebarContext SidebarContext { get; } = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Open/OpenTerminalAction.cs b/src/Files.App/Actions/Open/OpenTerminalAction.cs index 208c24705b4a..59c147b99487 100644 --- a/src/Files.App/Actions/Open/OpenTerminalAction.cs +++ b/src/Files.App/Actions/Open/OpenTerminalAction.cs @@ -6,6 +6,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal partial class OpenTerminalAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Open/OpenTerminalAsAdminAction.cs b/src/Files.App/Actions/Open/OpenTerminalAsAdminAction.cs index 160f00f26230..0d00ce8f364a 100644 --- a/src/Files.App/Actions/Open/OpenTerminalAsAdminAction.cs +++ b/src/Files.App/Actions/Open/OpenTerminalAsAdminAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenTerminalAsAdminAction : OpenTerminalAction { public override string Label diff --git a/src/Files.App/Actions/Open/OpenTerminalFromHomeAction.cs b/src/Files.App/Actions/Open/OpenTerminalFromHomeAction.cs index 066d508ff23e..e67c074c4d4b 100644 --- a/src/Files.App/Actions/Open/OpenTerminalFromHomeAction.cs +++ b/src/Files.App/Actions/Open/OpenTerminalFromHomeAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenTerminalFromHomeAction : OpenTerminalAction { private IHomePageContext HomePageContext { get; } = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Open/OpenTerminalFromSidebarAction.cs b/src/Files.App/Actions/Open/OpenTerminalFromSidebarAction.cs index 91e7a29f1f1b..1f8664c6861a 100644 --- a/src/Files.App/Actions/Open/OpenTerminalFromSidebarAction.cs +++ b/src/Files.App/Actions/Open/OpenTerminalFromSidebarAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class OpenTerminalFromSidebarAction : OpenTerminalAction { private ISidebarContext SidebarContext { get; } = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Show/ToggleDetailsPaneAction.cs b/src/Files.App/Actions/Show/ToggleDetailsPaneAction.cs index cd292c1a4b26..de5070ff1b28 100644 --- a/src/Files.App/Actions/Show/ToggleDetailsPaneAction.cs +++ b/src/Files.App/Actions/Show/ToggleDetailsPaneAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ToggleDetailsPaneAction : ObservableObject, IAction { private readonly InfoPaneViewModel infoPaneViewModel = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Show/ToggleDotFilesSettingAction.cs b/src/Files.App/Actions/Show/ToggleDotFilesSettingAction.cs index 7b6a5a108131..3f0ad7cd3115 100644 --- a/src/Files.App/Actions/Show/ToggleDotFilesSettingAction.cs +++ b/src/Files.App/Actions/Show/ToggleDotFilesSettingAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ToggleDotFilesSettingAction : ObservableObject, IToggleAction { private readonly IFoldersSettingsService FoldersSettingsService; diff --git a/src/Files.App/Actions/Show/ToggleDualPaneAction.cs b/src/Files.App/Actions/Show/ToggleDualPaneAction.cs index 42f20add4a58..87c63ef5ed09 100644 --- a/src/Files.App/Actions/Show/ToggleDualPaneAction.cs +++ b/src/Files.App/Actions/Show/ToggleDualPaneAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ToggleDualPaneAction : ObservableObject, IToggleAction { private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Show/ToggleFilterHeaderAction.cs b/src/Files.App/Actions/Show/ToggleFilterHeaderAction.cs index b71b055e6ea1..81eefb22ca32 100644 --- a/src/Files.App/Actions/Show/ToggleFilterHeaderAction.cs +++ b/src/Files.App/Actions/Show/ToggleFilterHeaderAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ToggleFilterHeaderAction : ObservableObject, IToggleAction { private readonly IGeneralSettingsService generalSettingsService = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Show/ToggleInfoPaneAction.cs b/src/Files.App/Actions/Show/ToggleInfoPaneAction.cs index e073fbae5f14..90625149fff4 100644 --- a/src/Files.App/Actions/Show/ToggleInfoPaneAction.cs +++ b/src/Files.App/Actions/Show/ToggleInfoPaneAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ToggleInfoPaneAction : ObservableObject, IToggleAction { private readonly InfoPaneViewModel viewModel; diff --git a/src/Files.App/Actions/Show/TogglePreviewPaneAction.cs b/src/Files.App/Actions/Show/TogglePreviewPaneAction.cs index 19feb74c862a..f903adc177ce 100644 --- a/src/Files.App/Actions/Show/TogglePreviewPaneAction.cs +++ b/src/Files.App/Actions/Show/TogglePreviewPaneAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class TogglePreviewPaneAction : ObservableObject, IAction { private readonly InfoPaneViewModel infoPaneViewModel = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Show/ToggleShelfPaneAction.cs b/src/Files.App/Actions/Show/ToggleShelfPaneAction.cs index 93242351c900..99c1ea1bf2fc 100644 --- a/src/Files.App/Actions/Show/ToggleShelfPaneAction.cs +++ b/src/Files.App/Actions/Show/ToggleShelfPaneAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ToggleShelfPaneAction : ObservableObject, IToggleAction { private readonly IGeneralSettingsService generalSettingsService = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Show/ToggleShowFileExtensionsAction.cs b/src/Files.App/Actions/Show/ToggleShowFileExtensionsAction.cs index dcc1e3f83929..1598bbfe15fb 100644 --- a/src/Files.App/Actions/Show/ToggleShowFileExtensionsAction.cs +++ b/src/Files.App/Actions/Show/ToggleShowFileExtensionsAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ToggleShowFileExtensionsAction : ObservableObject, IToggleAction { private readonly IFoldersSettingsService settings; diff --git a/src/Files.App/Actions/Show/ToggleShowHiddenItemsAction.cs b/src/Files.App/Actions/Show/ToggleShowHiddenItemsAction.cs index 3aea4b3c8351..642a074d0d74 100644 --- a/src/Files.App/Actions/Show/ToggleShowHiddenItemsAction.cs +++ b/src/Files.App/Actions/Show/ToggleShowHiddenItemsAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ToggleShowHiddenItemsAction : ObservableObject, IToggleAction { private readonly IFoldersSettingsService settings; diff --git a/src/Files.App/Actions/Show/ToggleToolbarAction.cs b/src/Files.App/Actions/Show/ToggleToolbarAction.cs index b7cab99b8ba6..f3048f021295 100644 --- a/src/Files.App/Actions/Show/ToggleToolbarAction.cs +++ b/src/Files.App/Actions/Show/ToggleToolbarAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class ToggleToolbarAction : ObservableObject, IToggleAction { private IAppearanceSettingsService AppearanceSettingsService { get; } = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Sidebar/PinFolderToSidebarAction.cs b/src/Files.App/Actions/Sidebar/PinFolderToSidebarAction.cs index 5b7625d38835..c4df6940932c 100644 --- a/src/Files.App/Actions/Sidebar/PinFolderToSidebarAction.cs +++ b/src/Files.App/Actions/Sidebar/PinFolderToSidebarAction.cs @@ -5,6 +5,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class PinFolderToSidebarAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Sidebar/UnpinFolderToSidebarAction.cs b/src/Files.App/Actions/Sidebar/UnpinFolderToSidebarAction.cs index 75f41329ca3c..aaac3db0d9a8 100644 --- a/src/Files.App/Actions/Sidebar/UnpinFolderToSidebarAction.cs +++ b/src/Files.App/Actions/Sidebar/UnpinFolderToSidebarAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed partial class UnpinFolderFromSidebarAction : ObservableObject, IAction { private readonly IContentPageContext context; diff --git a/src/Files.App/Actions/Start/PinToStartAction.cs b/src/Files.App/Actions/Start/PinToStartAction.cs index 8051b0208f98..407403e4780e 100644 --- a/src/Files.App/Actions/Start/PinToStartAction.cs +++ b/src/Files.App/Actions/Start/PinToStartAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class PinToStartAction : IAction { private IStorageService StorageService { get; } = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Actions/Start/UnpinFromStartAction.cs b/src/Files.App/Actions/Start/UnpinFromStartAction.cs index 85f12d70b84e..567b4145a48c 100644 --- a/src/Files.App/Actions/Start/UnpinFromStartAction.cs +++ b/src/Files.App/Actions/Start/UnpinFromStartAction.cs @@ -3,6 +3,7 @@ namespace Files.App.Actions { + [GeneratedRichCommand] internal sealed class UnpinFromStartAction : IAction { private IStorageService StorageService { get; } = Ioc.Default.GetRequiredService(); diff --git a/src/Files.App/Data/Commands/Manager/CommandCodes.cs b/src/Files.App/Data/Commands/Manager/CommandCodes.cs deleted file mode 100644 index 90231de49183..000000000000 --- a/src/Files.App/Data/Commands/Manager/CommandCodes.cs +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) Files Community -// Licensed under the MIT License. - -namespace Files.App.Data.Commands -{ - public enum CommandCodes - { - None, - - // Global - OpenHelp, - ToggleFullScreen, - EnterCompactOverlay, - ExitCompactOverlay, - ToggleCompactOverlay, - Search, - EditPath, - Redo, - Undo, - - // Show - ToggleShowHiddenItems, - ToggleDotFilesSetting, - ToggleShowFileExtensions, - TogglePreviewPane, - ToggleDetailsPane, - ToggleInfoPane, - ToggleToolbar, - ToggleShelfPane, - ToggleFilterHeader, - ToggleDualPane, - - // File System - CopyItem, - CopyItemPath, - CopyPath, - CopyItemPathWithQuotes, - CopyPathWithQuotes, - CutItem, - PasteItem, - PasteItemAsShortcut, - PasteItemToSelection, - DeleteItem, - DeleteItemPermanently, - CreateFolder, - CreateFolderWithSelection, - AddItem, - CreateAlternateDataStream, - CreateShortcut, - CreateShortcutFromDialog, - EmptyRecycleBin, - FormatDrive, - FormatDriveFromHome, - FormatDriveFromSidebar, - RestoreRecycleBin, - RestoreAllRecycleBin, - OpenItem, - OpenItemWithApplicationPicker, - OpenParentFolder, - OpenFileLocation, - RefreshItems, - Rename, - - // Selection - SelectAll, - InvertSelection, - ClearSelection, - ToggleSelect, - - // Share - ShareItem, - - // Start - PinToStart, - UnpinFromStart, - - // Sidebar - PinFolderToSidebar, - UnpinFolderFromSidebar, - - // Backgrounds - SetAsWallpaperBackground, - SetAsSlideshowBackground, - SetAsLockscreenBackground, - SetAsAppBackground, - - // Install - InstallFont, - InstallInfDriver, - InstallCertificate, - - // Run - RunAsAdmin, - RunAsAnotherUser, - RunWithPowershell, - - // Preview Popup - LaunchPreviewPopup, - - // Archives - CompressIntoArchive, - CompressIntoSevenZip, - CompressIntoZip, - DecompressArchive, - DecompressArchiveHere, - DecompressArchiveHereSmart, - DecompressArchiveToChildFolder, - - // Folders - FlattenFolder, - - // Image Manipulation - RotateLeft, - RotateRight, - - // Open - OpenInIDE, - OpenRepoInIDE, - OpenProperties, - OpenReleaseNotes, - OpenClassicProperties, - OpenSettings, - OpenSettingsFile, - OpenStorageSense, - OpenStorageSenseFromHome, - OpenStorageSenseFromSidebar, - OpenTerminal, - OpenTerminalAsAdmin, - OpenTerminalFromSidebar, - OpenTerminalFromHome, - OpenCommandPalette, - EditInNotepad, - OpenLogFile, - OpenLogFileLocation, - - // Layout - LayoutDecreaseSize, - LayoutIncreaseSize, - LayoutDetails, - LayoutList, - LayoutCards, - LayoutGrid, - LayoutColumns, - LayoutAdaptive, - - // Sort by - SortByName, - SortByDateModified, - SortByDateCreated, - SortBySize, - SortByType, - SortBySyncStatus, - SortByTag, - SortByPath, - SortByOriginalFolder, - SortByDateDeleted, - SortAscending, - SortDescending, - ToggleSortDirection, - SortFoldersFirst, - SortFilesFirst, - SortFilesAndFoldersTogether, - - // Group by - GroupByNone, - GroupByName, - GroupByDateModified, - GroupByDateCreated, - GroupBySize, - GroupByType, - GroupBySyncStatus, - GroupByTag, - GroupByOriginalFolder, - GroupByDateDeleted, - GroupByFolderPath, - GroupByDateModifiedYear, - GroupByDateModifiedMonth, - GroupByDateModifiedDay, - GroupByDateCreatedYear, - GroupByDateCreatedMonth, - GroupByDateCreatedDay, - GroupByDateDeletedYear, - GroupByDateDeletedMonth, - GroupByDateDeletedDay, - GroupAscending, - GroupDescending, - ToggleGroupDirection, - GroupByYear, - GroupByMonth, - ToggleGroupByDateUnit, - - // Navigation - NewWindow, - NewTab, - NavigateBack, - NavigateForward, - NavigateUp, - NavigateHome, - - // Other - DuplicateCurrentTab, - DuplicateSelectedTab, - CloseTabsToTheLeftCurrent, - CloseTabsToTheLeftSelected, - CloseTabsToTheRightCurrent, - CloseTabsToTheRightSelected, - CloseOtherTabsCurrent, - CloseOtherTabsSelected, - ReopenClosedTab, - PreviousTab, - NextTab, - CloseSelectedTab, - CloseAllTabs, - - // Shell Panes - CloseActivePane, - FocusOtherPane, - SplitPaneVertically, - SplitPaneHorizontally, - ArrangePanesVertically, - ArrangePanesHorizontally, - - // OpenInNew - OpenInNewPane, - OpenInNewPaneFromHome, - OpenInNewPaneFromSidebar, - OpenInNewTab, - OpenInNewTabFromHome, - OpenInNewTabFromSidebar, - OpenInNewWindow, - OpenInNewWindowFromHome, - OpenInNewWindowFromSidebar, - - // Play - PlayAll, - - // Git - GitClone, - GitFetch, - GitInit, - GitPull, - GitPush, - GitSync, - - // Tags - OpenAllTaggedItems, - } -} diff --git a/src/Files.App/Data/Commands/Manager/CommandManager.cs b/src/Files.App/Data/Commands/Manager/CommandManager.cs index e0d337b25c25..8335cead2fa8 100644 --- a/src/Files.App/Data/Commands/Manager/CommandManager.cs +++ b/src/Files.App/Data/Commands/Manager/CommandManager.cs @@ -16,7 +16,6 @@ internal sealed partial class CommandManager : ICommandManager // Fields - private readonly FrozenDictionary commands; private ImmutableDictionary _allKeyBindings = new Dictionary().ToImmutableDictionary(); public IRichCommand this[CommandCodes code] => commands.TryGetValue(code, out var command) ? command : None; @@ -39,198 +38,6 @@ public IRichCommand this[HotKey hotKey] : _allKeyBindings.TryGetValue(hotKey with { IsVisible = false }, out command) ? command : None; - #region Commands - public IRichCommand None => commands[CommandCodes.None]; - public IRichCommand OpenHelp => commands[CommandCodes.OpenHelp]; - public IRichCommand ToggleFullScreen => commands[CommandCodes.ToggleFullScreen]; - public IRichCommand EnterCompactOverlay => commands[CommandCodes.EnterCompactOverlay]; - public IRichCommand ExitCompactOverlay => commands[CommandCodes.ExitCompactOverlay]; - public IRichCommand ToggleCompactOverlay => commands[CommandCodes.ToggleCompactOverlay]; - public IRichCommand Search => commands[CommandCodes.Search]; - public IRichCommand EditPath => commands[CommandCodes.EditPath]; - public IRichCommand Redo => commands[CommandCodes.Redo]; - public IRichCommand Undo => commands[CommandCodes.Undo]; - public IRichCommand ToggleShowHiddenItems => commands[CommandCodes.ToggleShowHiddenItems]; - public IRichCommand ToggleDotFilesSetting => commands[CommandCodes.ToggleDotFilesSetting]; - public IRichCommand ToggleShowFileExtensions => commands[CommandCodes.ToggleShowFileExtensions]; - public IRichCommand TogglePreviewPane => commands[CommandCodes.TogglePreviewPane]; - public IRichCommand ToggleDetailsPane => commands[CommandCodes.ToggleDetailsPane]; - public IRichCommand ToggleInfoPane => commands[CommandCodes.ToggleInfoPane]; - public IRichCommand ToggleToolbar => commands[CommandCodes.ToggleToolbar]; - public IRichCommand ToggleShelfPane => commands[CommandCodes.ToggleShelfPane]; - public IRichCommand ToggleFilterHeader => commands[CommandCodes.ToggleFilterHeader]; - public IRichCommand ToggleDualPane => commands[CommandCodes.ToggleDualPane]; - public IRichCommand SelectAll => commands[CommandCodes.SelectAll]; - public IRichCommand InvertSelection => commands[CommandCodes.InvertSelection]; - public IRichCommand ClearSelection => commands[CommandCodes.ClearSelection]; - public IRichCommand ToggleSelect => commands[CommandCodes.ToggleSelect]; - public IRichCommand ShareItem => commands[CommandCodes.ShareItem]; - public IRichCommand EmptyRecycleBin => commands[CommandCodes.EmptyRecycleBin]; - public IRichCommand RestoreRecycleBin => commands[CommandCodes.RestoreRecycleBin]; - public IRichCommand RestoreAllRecycleBin => commands[CommandCodes.RestoreAllRecycleBin]; - public IRichCommand RefreshItems => commands[CommandCodes.RefreshItems]; - public IRichCommand Rename => commands[CommandCodes.Rename]; - public IRichCommand CreateAlternateDataStream => commands[CommandCodes.CreateAlternateDataStream]; - public IRichCommand CreateShortcut => commands[CommandCodes.CreateShortcut]; - public IRichCommand CreateShortcutFromDialog => commands[CommandCodes.CreateShortcutFromDialog]; - public IRichCommand CreateFolder => commands[CommandCodes.CreateFolder]; - public IRichCommand CreateFolderWithSelection => commands[CommandCodes.CreateFolderWithSelection]; - public IRichCommand AddItem => commands[CommandCodes.AddItem]; - public IRichCommand PinToStart => commands[CommandCodes.PinToStart]; - public IRichCommand UnpinFromStart => commands[CommandCodes.UnpinFromStart]; - public IRichCommand PinFolderToSidebar => commands[CommandCodes.PinFolderToSidebar]; - public IRichCommand UnpinFolderFromSidebar => commands[CommandCodes.UnpinFolderFromSidebar]; - public IRichCommand SetAsWallpaperBackground => commands[CommandCodes.SetAsWallpaperBackground]; - public IRichCommand SetAsSlideshowBackground => commands[CommandCodes.SetAsSlideshowBackground]; - public IRichCommand SetAsLockscreenBackground => commands[CommandCodes.SetAsLockscreenBackground]; - public IRichCommand SetAsAppBackground => commands[CommandCodes.SetAsAppBackground]; - public IRichCommand CopyItem => commands[CommandCodes.CopyItem]; - public IRichCommand CopyItemPath => commands[CommandCodes.CopyItemPath]; - public IRichCommand CopyPath => commands[CommandCodes.CopyPath]; - public IRichCommand CopyItemPathWithQuotes => commands[CommandCodes.CopyItemPathWithQuotes]; - public IRichCommand CopyPathWithQuotes => commands[CommandCodes.CopyPathWithQuotes]; - public IRichCommand CutItem => commands[CommandCodes.CutItem]; - public IRichCommand PasteItem => commands[CommandCodes.PasteItem]; - public IRichCommand PasteItemAsShortcut => commands[CommandCodes.PasteItemAsShortcut]; - public IRichCommand PasteItemToSelection => commands[CommandCodes.PasteItemToSelection]; - public IRichCommand DeleteItem => commands[CommandCodes.DeleteItem]; - public IRichCommand DeleteItemPermanently => commands[CommandCodes.DeleteItemPermanently]; - public IRichCommand InstallFont => commands[CommandCodes.InstallFont]; - public IRichCommand InstallInfDriver => commands[CommandCodes.InstallInfDriver]; - public IRichCommand InstallCertificate => commands[CommandCodes.InstallCertificate]; - public IRichCommand RunAsAdmin => commands[CommandCodes.RunAsAdmin]; - public IRichCommand RunAsAnotherUser => commands[CommandCodes.RunAsAnotherUser]; - public IRichCommand RunWithPowershell => commands[CommandCodes.RunWithPowershell]; - public IRichCommand LaunchPreviewPopup => commands[CommandCodes.LaunchPreviewPopup]; - public IRichCommand CompressIntoArchive => commands[CommandCodes.CompressIntoArchive]; - public IRichCommand CompressIntoSevenZip => commands[CommandCodes.CompressIntoSevenZip]; - public IRichCommand CompressIntoZip => commands[CommandCodes.CompressIntoZip]; - public IRichCommand DecompressArchive => commands[CommandCodes.DecompressArchive]; - public IRichCommand DecompressArchiveHere => commands[CommandCodes.DecompressArchiveHere]; - public IRichCommand DecompressArchiveHereSmart => commands[CommandCodes.DecompressArchiveHereSmart]; - public IRichCommand DecompressArchiveToChildFolder => commands[CommandCodes.DecompressArchiveToChildFolder]; - public IRichCommand FlattenFolder => commands[CommandCodes.FlattenFolder]; - public IRichCommand RotateLeft => commands[CommandCodes.RotateLeft]; - public IRichCommand RotateRight => commands[CommandCodes.RotateRight]; - public IRichCommand OpenItem => commands[CommandCodes.OpenItem]; - public IRichCommand OpenItemWithApplicationPicker => commands[CommandCodes.OpenItemWithApplicationPicker]; - public IRichCommand OpenParentFolder => commands[CommandCodes.OpenParentFolder]; - public IRichCommand OpenInVSCode => commands[CommandCodes.OpenInIDE]; - public IRichCommand OpenRepoInVSCode => commands[CommandCodes.OpenRepoInIDE]; - public IRichCommand OpenProperties => commands[CommandCodes.OpenProperties]; - public IRichCommand OpenReleaseNotes => commands[CommandCodes.OpenReleaseNotes]; - public IRichCommand OpenClassicProperties => commands[CommandCodes.OpenClassicProperties]; - public IRichCommand OpenStorageSense => commands[CommandCodes.OpenStorageSense]; - public IRichCommand OpenStorageSenseFromHome => commands[CommandCodes.OpenStorageSenseFromHome]; - public IRichCommand OpenStorageSenseFromSidebar => commands[CommandCodes.OpenStorageSenseFromSidebar]; - public IRichCommand OpenSettings => commands[CommandCodes.OpenSettings]; - public IRichCommand OpenSettingsFile => commands[CommandCodes.OpenSettingsFile]; - public IRichCommand OpenTerminal => commands[CommandCodes.OpenTerminal]; - public IRichCommand OpenTerminalAsAdmin => commands[CommandCodes.OpenTerminalAsAdmin]; - public IRichCommand OpenTerminalFromSidebar => commands[CommandCodes.OpenTerminalFromSidebar]; - public IRichCommand OpenTerminalFromHome => commands[CommandCodes.OpenTerminalFromHome]; - public IRichCommand OpenCommandPalette => commands[CommandCodes.OpenCommandPalette]; - public IRichCommand EditInNotepad => commands[CommandCodes.EditInNotepad]; - public IRichCommand OpenLogFile => commands[CommandCodes.OpenLogFile]; - public IRichCommand OpenLogFileLocation => commands[CommandCodes.OpenLogFileLocation]; - public IRichCommand LayoutDecreaseSize => commands[CommandCodes.LayoutDecreaseSize]; - public IRichCommand LayoutIncreaseSize => commands[CommandCodes.LayoutIncreaseSize]; - public IRichCommand LayoutDetails => commands[CommandCodes.LayoutDetails]; - public IRichCommand LayoutList => commands[CommandCodes.LayoutList]; - public IRichCommand LayoutCards => commands[CommandCodes.LayoutCards]; - public IRichCommand LayoutGrid => commands[CommandCodes.LayoutGrid]; - public IRichCommand LayoutColumns => commands[CommandCodes.LayoutColumns]; - public IRichCommand LayoutAdaptive => commands[CommandCodes.LayoutAdaptive]; - public IRichCommand SortByName => commands[CommandCodes.SortByName]; - public IRichCommand SortByDateModified => commands[CommandCodes.SortByDateModified]; - public IRichCommand SortByDateCreated => commands[CommandCodes.SortByDateCreated]; - public IRichCommand SortBySize => commands[CommandCodes.SortBySize]; - public IRichCommand SortByType => commands[CommandCodes.SortByType]; - public IRichCommand SortBySyncStatus => commands[CommandCodes.SortBySyncStatus]; - public IRichCommand SortByTag => commands[CommandCodes.SortByTag]; - public IRichCommand SortByPath => commands[CommandCodes.SortByPath]; - public IRichCommand SortByOriginalFolder => commands[CommandCodes.SortByOriginalFolder]; - public IRichCommand SortByDateDeleted => commands[CommandCodes.SortByDateDeleted]; - public IRichCommand SortAscending => commands[CommandCodes.SortAscending]; - public IRichCommand SortDescending => commands[CommandCodes.SortDescending]; - public IRichCommand ToggleSortDirection => commands[CommandCodes.ToggleSortDirection]; - public IRichCommand SortFoldersFirst => commands[CommandCodes.SortFoldersFirst]; - public IRichCommand SortFilesFirst => commands[CommandCodes.SortFilesFirst]; - public IRichCommand SortFilesAndFoldersTogether => commands[CommandCodes.SortFilesAndFoldersTogether]; - public IRichCommand GroupByNone => commands[CommandCodes.GroupByNone]; - public IRichCommand GroupByName => commands[CommandCodes.GroupByName]; - public IRichCommand GroupByDateModified => commands[CommandCodes.GroupByDateModified]; - public IRichCommand GroupByDateCreated => commands[CommandCodes.GroupByDateCreated]; - public IRichCommand GroupBySize => commands[CommandCodes.GroupBySize]; - public IRichCommand GroupByType => commands[CommandCodes.GroupByType]; - public IRichCommand GroupBySyncStatus => commands[CommandCodes.GroupBySyncStatus]; - public IRichCommand GroupByTag => commands[CommandCodes.GroupByTag]; - public IRichCommand GroupByOriginalFolder => commands[CommandCodes.GroupByOriginalFolder]; - public IRichCommand GroupByDateDeleted => commands[CommandCodes.GroupByDateDeleted]; - public IRichCommand GroupByFolderPath => commands[CommandCodes.GroupByFolderPath]; - public IRichCommand GroupByDateModifiedYear => commands[CommandCodes.GroupByDateModifiedYear]; - public IRichCommand GroupByDateModifiedMonth => commands[CommandCodes.GroupByDateModifiedMonth]; - public IRichCommand GroupByDateModifiedDay => commands[CommandCodes.GroupByDateModifiedDay]; - public IRichCommand GroupByDateCreatedYear => commands[CommandCodes.GroupByDateCreatedYear]; - public IRichCommand GroupByDateCreatedMonth => commands[CommandCodes.GroupByDateCreatedMonth]; - public IRichCommand GroupByDateCreatedDay => commands[CommandCodes.GroupByDateCreatedDay]; - public IRichCommand GroupByDateDeletedYear => commands[CommandCodes.GroupByDateDeletedYear]; - public IRichCommand GroupByDateDeletedMonth => commands[CommandCodes.GroupByDateDeletedMonth]; - public IRichCommand GroupByDateDeletedDay => commands[CommandCodes.GroupByDateDeletedDay]; - public IRichCommand GroupAscending => commands[CommandCodes.GroupAscending]; - public IRichCommand GroupDescending => commands[CommandCodes.GroupDescending]; - public IRichCommand ToggleGroupDirection => commands[CommandCodes.ToggleGroupDirection]; - public IRichCommand GroupByYear => commands[CommandCodes.GroupByYear]; - public IRichCommand GroupByMonth => commands[CommandCodes.GroupByMonth]; - public IRichCommand ToggleGroupByDateUnit => commands[CommandCodes.ToggleGroupByDateUnit]; - public IRichCommand NewWindow => commands[CommandCodes.NewWindow]; - public IRichCommand NewTab => commands[CommandCodes.NewTab]; - public IRichCommand FormatDrive => commands[CommandCodes.FormatDrive]; - public IRichCommand FormatDriveFromHome => commands[CommandCodes.FormatDriveFromHome]; - public IRichCommand FormatDriveFromSidebar => commands[CommandCodes.FormatDriveFromSidebar]; - public IRichCommand NavigateBack => commands[CommandCodes.NavigateBack]; - public IRichCommand NavigateForward => commands[CommandCodes.NavigateForward]; - public IRichCommand NavigateUp => commands[CommandCodes.NavigateUp]; - public IRichCommand NavigateHome => commands[CommandCodes.NavigateHome]; - public IRichCommand DuplicateCurrentTab => commands[CommandCodes.DuplicateCurrentTab]; - public IRichCommand DuplicateSelectedTab => commands[CommandCodes.DuplicateSelectedTab]; - public IRichCommand CloseTabsToTheLeftCurrent => commands[CommandCodes.CloseTabsToTheLeftCurrent]; - public IRichCommand CloseTabsToTheLeftSelected => commands[CommandCodes.CloseTabsToTheLeftSelected]; - public IRichCommand CloseTabsToTheRightCurrent => commands[CommandCodes.CloseTabsToTheRightCurrent]; - public IRichCommand CloseTabsToTheRightSelected => commands[CommandCodes.CloseTabsToTheRightSelected]; - public IRichCommand CloseOtherTabsCurrent => commands[CommandCodes.CloseOtherTabsCurrent]; - public IRichCommand CloseOtherTabsSelected => commands[CommandCodes.CloseOtherTabsSelected]; - public IRichCommand CloseAllTabs => commands[CommandCodes.CloseAllTabs]; - public IRichCommand OpenInNewPaneAction => commands[CommandCodes.OpenInNewPane]; - public IRichCommand OpenInNewPaneFromHomeAction => commands[CommandCodes.OpenInNewPaneFromHome]; - public IRichCommand OpenInNewPaneFromSidebarAction => commands[CommandCodes.OpenInNewPaneFromSidebar]; - public IRichCommand OpenInNewTabAction => commands[CommandCodes.OpenInNewTab]; - public IRichCommand OpenInNewTabFromHomeAction => commands[CommandCodes.OpenInNewTabFromHome]; - public IRichCommand OpenInNewTabFromSidebarAction => commands[CommandCodes.OpenInNewTabFromSidebar]; - public IRichCommand OpenInNewWindowAction => commands[CommandCodes.OpenInNewWindow]; - public IRichCommand OpenInNewWindowFromHomeAction => commands[CommandCodes.OpenInNewWindowFromHome]; - public IRichCommand OpenInNewWindowFromSidebarAction => commands[CommandCodes.OpenInNewWindowFromSidebar]; - public IRichCommand ReopenClosedTab => commands[CommandCodes.ReopenClosedTab]; - public IRichCommand PreviousTab => commands[CommandCodes.PreviousTab]; - public IRichCommand NextTab => commands[CommandCodes.NextTab]; - public IRichCommand CloseSelectedTab => commands[CommandCodes.CloseSelectedTab]; - public IRichCommand CloseActivePane => commands[CommandCodes.CloseActivePane]; - public IRichCommand FocusOtherPane => commands[CommandCodes.FocusOtherPane]; - public IRichCommand SplitPaneVertically => commands[CommandCodes.SplitPaneVertically]; - public IRichCommand SplitPaneHorizontally => commands[CommandCodes.SplitPaneHorizontally]; - public IRichCommand ArrangePanesVertically => commands[CommandCodes.ArrangePanesVertically]; - public IRichCommand ArrangePanesHorizontally => commands[CommandCodes.ArrangePanesHorizontally]; - public IRichCommand OpenFileLocation => commands[CommandCodes.OpenFileLocation]; - public IRichCommand PlayAll => commands[CommandCodes.PlayAll]; - public IRichCommand GitClone => commands[CommandCodes.GitClone]; - public IRichCommand GitFetch => commands[CommandCodes.GitFetch]; - public IRichCommand GitInit => commands[CommandCodes.GitInit]; - public IRichCommand GitPull => commands[CommandCodes.GitPull]; - public IRichCommand GitPush => commands[CommandCodes.GitPush]; - public IRichCommand GitSync => commands[CommandCodes.GitSync]; - public IRichCommand OpenAllTaggedItems => commands[CommandCodes.OpenAllTaggedItems]; - #endregion - public CommandManager() { commands = CreateActions() @@ -249,198 +56,6 @@ public CommandManager() public IEnumerator GetEnumerator() => (commands.Values as IEnumerable).GetEnumerator(); - private static Dictionary CreateActions() => new() - { - [CommandCodes.OpenHelp] = new OpenHelpAction(), - [CommandCodes.ToggleFullScreen] = new ToggleFullScreenAction(), - [CommandCodes.EnterCompactOverlay] = new EnterCompactOverlayAction(), - [CommandCodes.ExitCompactOverlay] = new ExitCompactOverlayAction(), - [CommandCodes.ToggleCompactOverlay] = new ToggleCompactOverlayAction(), - [CommandCodes.Search] = new SearchAction(), - [CommandCodes.EditPath] = new EditPathAction(), - [CommandCodes.Redo] = new RedoAction(), - [CommandCodes.Undo] = new UndoAction(), - [CommandCodes.ToggleShowHiddenItems] = new ToggleShowHiddenItemsAction(), - [CommandCodes.ToggleDotFilesSetting] = new ToggleDotFilesSettingAction(), - [CommandCodes.ToggleShowFileExtensions] = new ToggleShowFileExtensionsAction(), - [CommandCodes.TogglePreviewPane] = new TogglePreviewPaneAction(), - [CommandCodes.ToggleDetailsPane] = new ToggleDetailsPaneAction(), - [CommandCodes.ToggleInfoPane] = new ToggleInfoPaneAction(), - [CommandCodes.ToggleToolbar] = new ToggleToolbarAction(), - [CommandCodes.ToggleShelfPane] = new ToggleShelfPaneAction(), - [CommandCodes.ToggleFilterHeader] = new ToggleFilterHeaderAction(), - [CommandCodes.ToggleDualPane] = new ToggleDualPaneAction(), - [CommandCodes.SelectAll] = new SelectAllAction(), - [CommandCodes.InvertSelection] = new InvertSelectionAction(), - [CommandCodes.ClearSelection] = new ClearSelectionAction(), - [CommandCodes.ToggleSelect] = new ToggleSelectAction(), - [CommandCodes.ShareItem] = new ShareItemAction(), - [CommandCodes.EmptyRecycleBin] = new EmptyRecycleBinAction(), - [CommandCodes.RestoreRecycleBin] = new RestoreRecycleBinAction(), - [CommandCodes.RestoreAllRecycleBin] = new RestoreAllRecycleBinAction(), - [CommandCodes.RefreshItems] = new RefreshItemsAction(), - [CommandCodes.Rename] = new RenameAction(), - [CommandCodes.CreateAlternateDataStream] = new CreateAlternateDataStreamAction(), - [CommandCodes.CreateShortcut] = new CreateShortcutAction(), - [CommandCodes.CreateShortcutFromDialog] = new CreateShortcutFromDialogAction(), - [CommandCodes.CreateFolder] = new CreateFolderAction(), - [CommandCodes.CreateFolderWithSelection] = new CreateFolderWithSelectionAction(), - [CommandCodes.AddItem] = new AddItemAction(), - [CommandCodes.PinToStart] = new PinToStartAction(), - [CommandCodes.UnpinFromStart] = new UnpinFromStartAction(), - [CommandCodes.PinFolderToSidebar] = new PinFolderToSidebarAction(), - [CommandCodes.UnpinFolderFromSidebar] = new UnpinFolderFromSidebarAction(), - [CommandCodes.SetAsWallpaperBackground] = new SetAsWallpaperBackgroundAction(), - [CommandCodes.SetAsSlideshowBackground] = new SetAsSlideshowBackgroundAction(), - [CommandCodes.SetAsLockscreenBackground] = new SetAsLockscreenBackgroundAction(), - [CommandCodes.SetAsAppBackground] = new SetAsAppBackgroundAction(), - [CommandCodes.CopyItem] = new CopyItemAction(), - [CommandCodes.CopyItemPath] = new CopyItemPathAction(), - [CommandCodes.CopyPath] = new CopyPathAction(), - [CommandCodes.CopyItemPathWithQuotes] = new CopyItemPathWithQuotesAction(), - [CommandCodes.CopyPathWithQuotes] = new CopyPathWithQuotesAction(), - [CommandCodes.CutItem] = new CutItemAction(), - [CommandCodes.PasteItem] = new PasteItemAction(), - [CommandCodes.PasteItemAsShortcut] = new PasteItemAsShortcutAction(), - [CommandCodes.PasteItemToSelection] = new PasteItemToSelectionAction(), - [CommandCodes.DeleteItem] = new DeleteItemAction(), - [CommandCodes.DeleteItemPermanently] = new DeleteItemPermanentlyAction(), - [CommandCodes.InstallFont] = new InstallFontAction(), - [CommandCodes.InstallInfDriver] = new InstallInfDriverAction(), - [CommandCodes.InstallCertificate] = new InstallCertificateAction(), - [CommandCodes.RunAsAdmin] = new RunAsAdminAction(), - [CommandCodes.RunAsAnotherUser] = new RunAsAnotherUserAction(), - [CommandCodes.RunWithPowershell] = new RunWithPowershellAction(), - [CommandCodes.LaunchPreviewPopup] = new LaunchPreviewPopupAction(), - [CommandCodes.CompressIntoArchive] = new CompressIntoArchiveAction(), - [CommandCodes.CompressIntoSevenZip] = new CompressIntoSevenZipAction(), - [CommandCodes.CompressIntoZip] = new CompressIntoZipAction(), - [CommandCodes.DecompressArchive] = new DecompressArchive(), - [CommandCodes.DecompressArchiveHere] = new DecompressArchiveHere(), - [CommandCodes.DecompressArchiveHereSmart] = new DecompressArchiveHereSmart(), - [CommandCodes.DecompressArchiveToChildFolder] = new DecompressArchiveToChildFolderAction(), - [CommandCodes.FlattenFolder] = new FlattenFolderAction(), - [CommandCodes.RotateLeft] = new RotateLeftAction(), - [CommandCodes.RotateRight] = new RotateRightAction(), - [CommandCodes.OpenItem] = new OpenItemAction(), - [CommandCodes.OpenItemWithApplicationPicker] = new OpenItemWithApplicationPickerAction(), - [CommandCodes.OpenParentFolder] = new OpenParentFolderAction(), - [CommandCodes.OpenInIDE] = new OpenInIDEAction(), - [CommandCodes.OpenRepoInIDE] = new OpenRepoInIDEAction(), - [CommandCodes.OpenProperties] = new OpenPropertiesAction(), - [CommandCodes.OpenReleaseNotes] = new OpenReleaseNotesAction(), - [CommandCodes.OpenClassicProperties] = new OpenClassicPropertiesAction(), - [CommandCodes.OpenStorageSense] = new OpenStorageSenseAction(), - [CommandCodes.OpenStorageSenseFromHome] = new OpenStorageSenseFromHomeAction(), - [CommandCodes.OpenStorageSenseFromSidebar] = new OpenStorageSenseFromSidebarAction(), - [CommandCodes.OpenSettings] = new OpenSettingsAction(), - [CommandCodes.OpenSettingsFile] = new OpenSettingsFileAction(), - [CommandCodes.OpenTerminal] = new OpenTerminalAction(), - [CommandCodes.OpenTerminalAsAdmin] = new OpenTerminalAsAdminAction(), - [CommandCodes.OpenTerminalFromSidebar] = new OpenTerminalFromSidebarAction(), - [CommandCodes.OpenTerminalFromHome] = new OpenTerminalFromHomeAction(), - [CommandCodes.OpenCommandPalette] = new OpenCommandPaletteAction(), - [CommandCodes.EditInNotepad] = new EditInNotepadAction(), - [CommandCodes.OpenLogFile] = new OpenLogFileAction(), - [CommandCodes.OpenLogFileLocation] = new OpenLogFileLocationAction(), - [CommandCodes.LayoutDecreaseSize] = new LayoutDecreaseSizeAction(), - [CommandCodes.LayoutIncreaseSize] = new LayoutIncreaseSizeAction(), - [CommandCodes.LayoutDetails] = new LayoutDetailsAction(), - [CommandCodes.LayoutList] = new LayoutListAction(), - [CommandCodes.LayoutCards] = new LayoutCardsAction(), - [CommandCodes.LayoutGrid] = new LayoutGridAction(), - [CommandCodes.LayoutColumns] = new LayoutColumnsAction(), - [CommandCodes.LayoutAdaptive] = new LayoutAdaptiveAction(), - [CommandCodes.SortByName] = new SortByNameAction(), - [CommandCodes.SortByDateModified] = new SortByDateModifiedAction(), - [CommandCodes.SortByDateCreated] = new SortByDateCreatedAction(), - [CommandCodes.SortBySize] = new SortBySizeAction(), - [CommandCodes.SortByType] = new SortByTypeAction(), - [CommandCodes.SortBySyncStatus] = new SortBySyncStatusAction(), - [CommandCodes.SortByTag] = new SortByTagAction(), - [CommandCodes.SortByPath] = new SortByPathAction(), - [CommandCodes.SortByOriginalFolder] = new SortByOriginalFolderAction(), - [CommandCodes.SortByDateDeleted] = new SortByDateDeletedAction(), - [CommandCodes.SortAscending] = new SortAscendingAction(), - [CommandCodes.SortDescending] = new SortDescendingAction(), - [CommandCodes.ToggleSortDirection] = new ToggleSortDirectionAction(), - [CommandCodes.SortFoldersFirst] = new SortFoldersFirstAction(), - [CommandCodes.SortFilesFirst] = new SortFilesFirstAction(), - [CommandCodes.SortFilesAndFoldersTogether] = new SortFilesAndFoldersTogetherAction(), - [CommandCodes.GroupByNone] = new GroupByNoneAction(), - [CommandCodes.GroupByName] = new GroupByNameAction(), - [CommandCodes.GroupByDateModified] = new GroupByDateModifiedAction(), - [CommandCodes.GroupByDateCreated] = new GroupByDateCreatedAction(), - [CommandCodes.GroupBySize] = new GroupBySizeAction(), - [CommandCodes.GroupByType] = new GroupByTypeAction(), - [CommandCodes.GroupBySyncStatus] = new GroupBySyncStatusAction(), - [CommandCodes.GroupByTag] = new GroupByTagAction(), - [CommandCodes.GroupByOriginalFolder] = new GroupByOriginalFolderAction(), - [CommandCodes.GroupByDateDeleted] = new GroupByDateDeletedAction(), - [CommandCodes.GroupByFolderPath] = new GroupByFolderPathAction(), - [CommandCodes.GroupByDateModifiedYear] = new GroupByDateModifiedYearAction(), - [CommandCodes.GroupByDateModifiedMonth] = new GroupByDateModifiedMonthAction(), - [CommandCodes.GroupByDateModifiedDay] = new GroupByDateModifiedDayAction(), - [CommandCodes.GroupByDateCreatedYear] = new GroupByDateCreatedYearAction(), - [CommandCodes.GroupByDateCreatedMonth] = new GroupByDateCreatedMonthAction(), - [CommandCodes.GroupByDateCreatedDay] = new GroupByDateCreatedDayAction(), - [CommandCodes.GroupByDateDeletedYear] = new GroupByDateDeletedYearAction(), - [CommandCodes.GroupByDateDeletedMonth] = new GroupByDateDeletedMonthAction(), - [CommandCodes.GroupByDateDeletedDay] = new GroupByDateDeletedDayAction(), - [CommandCodes.GroupAscending] = new GroupAscendingAction(), - [CommandCodes.GroupDescending] = new GroupDescendingAction(), - [CommandCodes.ToggleGroupDirection] = new ToggleGroupDirectionAction(), - [CommandCodes.GroupByYear] = new GroupByYearAction(), - [CommandCodes.GroupByMonth] = new GroupByMonthAction(), - [CommandCodes.ToggleGroupByDateUnit] = new ToggleGroupByDateUnitAction(), - [CommandCodes.NewWindow] = new NewWindowAction(), - [CommandCodes.NewTab] = new NewTabAction(), - [CommandCodes.FormatDrive] = new FormatDriveAction(), - [CommandCodes.FormatDriveFromHome] = new FormatDriveFromHomeAction(), - [CommandCodes.FormatDriveFromSidebar] = new FormatDriveFromSidebarAction(), - [CommandCodes.NavigateBack] = new NavigateBackAction(), - [CommandCodes.NavigateForward] = new NavigateForwardAction(), - [CommandCodes.NavigateUp] = new NavigateUpAction(), - [CommandCodes.NavigateHome] = new NavigateHomeAction(), - [CommandCodes.DuplicateCurrentTab] = new DuplicateCurrentTabAction(), - [CommandCodes.DuplicateSelectedTab] = new DuplicateSelectedTabAction(), - [CommandCodes.CloseTabsToTheLeftCurrent] = new CloseTabsToTheLeftCurrentAction(), - [CommandCodes.CloseTabsToTheLeftSelected] = new CloseTabsToTheLeftSelectedAction(), - [CommandCodes.CloseTabsToTheRightCurrent] = new CloseTabsToTheRightCurrentAction(), - [CommandCodes.CloseTabsToTheRightSelected] = new CloseTabsToTheRightSelectedAction(), - [CommandCodes.CloseOtherTabsCurrent] = new CloseOtherTabsCurrentAction(), - [CommandCodes.CloseOtherTabsSelected] = new CloseOtherTabsSelectedAction(), - [CommandCodes.CloseAllTabs] = new CloseAllTabsAction(), - [CommandCodes.OpenInNewPane] = new OpenInNewPaneAction(), - [CommandCodes.OpenInNewPaneFromHome] = new OpenInNewPaneFromHomeAction(), - [CommandCodes.OpenInNewPaneFromSidebar] = new OpenInNewPaneFromSidebarAction(), - [CommandCodes.OpenInNewTab] = new OpenInNewTabAction(), - [CommandCodes.OpenInNewTabFromHome] = new OpenInNewTabFromHomeAction(), - [CommandCodes.OpenInNewTabFromSidebar] = new OpenInNewTabFromSidebarAction(), - [CommandCodes.OpenInNewWindow] = new OpenInNewWindowAction(), - [CommandCodes.OpenInNewWindowFromHome] = new OpenInNewWindowFromHomeAction(), - [CommandCodes.OpenInNewWindowFromSidebar] = new OpenInNewWindowFromSidebarAction(), - [CommandCodes.ReopenClosedTab] = new ReopenClosedTabAction(), - [CommandCodes.PreviousTab] = new PreviousTabAction(), - [CommandCodes.NextTab] = new NextTabAction(), - [CommandCodes.CloseSelectedTab] = new CloseSelectedTabAction(), - [CommandCodes.CloseActivePane] = new CloseActivePaneAction(), - [CommandCodes.FocusOtherPane] = new FocusOtherPaneAction(), - [CommandCodes.SplitPaneVertically] = new SplitPaneVerticallyAction(), - [CommandCodes.SplitPaneHorizontally] = new SplitPaneHorizontallyAction(), - [CommandCodes.ArrangePanesVertically] = new ArrangePanesVerticallyAction(), - [CommandCodes.ArrangePanesHorizontally] = new ArrangePanesHorizontallyAction(), - [CommandCodes.OpenFileLocation] = new OpenFileLocationAction(), - [CommandCodes.PlayAll] = new PlayAllAction(), - [CommandCodes.GitClone] = new GitCloneAction(), - [CommandCodes.GitFetch] = new GitFetchAction(), - [CommandCodes.GitInit] = new GitInitAction(), - [CommandCodes.GitPull] = new GitPullAction(), - [CommandCodes.GitPush] = new GitPushAction(), - [CommandCodes.GitSync] = new GitSyncAction(), - [CommandCodes.OpenAllTaggedItems] = new OpenAllTaggedActions(), - }; - /// /// Replaces default key binding collection with customized one(s) if exists. /// diff --git a/src/Files.App/Data/Commands/Manager/ICommandManager.cs b/src/Files.App/Data/Commands/Manager/ICommandManager.cs deleted file mode 100644 index dd0e34dfd6a5..000000000000 --- a/src/Files.App/Data/Commands/Manager/ICommandManager.cs +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Files Community -// Licensed under the MIT License. - -namespace Files.App.Data.Commands -{ - /// - /// Represents a collection of and provides manager classes. - /// - public interface ICommandManager : IEnumerable - { - IRichCommand this[CommandCodes code] { get; } - IRichCommand this[string code] { get; } - IRichCommand this[HotKey customHotKey] { get; } - - IRichCommand None { get; } - - IRichCommand OpenHelp { get; } - IRichCommand ToggleFullScreen { get; } - IRichCommand EnterCompactOverlay { get; } - IRichCommand ExitCompactOverlay { get; } - IRichCommand ToggleCompactOverlay { get; } - IRichCommand Search { get; } - IRichCommand EditPath { get; } - IRichCommand Redo { get; } - IRichCommand Undo { get; } - - IRichCommand ToggleShowHiddenItems { get; } - IRichCommand ToggleDotFilesSetting { get; } - IRichCommand ToggleShowFileExtensions { get; } - IRichCommand TogglePreviewPane { get; } - IRichCommand ToggleDetailsPane { get; } - IRichCommand ToggleInfoPane { get; } - IRichCommand ToggleToolbar { get; } - IRichCommand ToggleShelfPane { get; } - IRichCommand ToggleFilterHeader { get; } - IRichCommand ToggleDualPane { get; } - - IRichCommand CopyItem { get; } - IRichCommand CopyItemPath { get; } - IRichCommand CopyPath { get; } - IRichCommand CopyItemPathWithQuotes { get; } - IRichCommand CopyPathWithQuotes { get; } - IRichCommand CutItem { get; } - IRichCommand PasteItem { get; } - IRichCommand PasteItemAsShortcut { get; } - IRichCommand PasteItemToSelection { get; } - IRichCommand DeleteItem { get; } - IRichCommand DeleteItemPermanently { get; } - IRichCommand SelectAll { get; } - IRichCommand InvertSelection { get; } - IRichCommand ClearSelection { get; } - IRichCommand ToggleSelect { get; } - IRichCommand ShareItem { get; } - IRichCommand CreateFolder { get; } - IRichCommand CreateFolderWithSelection { get; } - IRichCommand AddItem { get; } - IRichCommand CreateAlternateDataStream { get; } - IRichCommand CreateShortcut { get; } - IRichCommand CreateShortcutFromDialog { get; } - IRichCommand EmptyRecycleBin { get; } - IRichCommand RestoreRecycleBin { get; } - IRichCommand RestoreAllRecycleBin { get; } - IRichCommand FormatDrive { get; } - IRichCommand FormatDriveFromHome { get; } - IRichCommand FormatDriveFromSidebar { get; } - IRichCommand OpenItem { get; } - IRichCommand OpenItemWithApplicationPicker { get; } - IRichCommand OpenParentFolder { get; } - IRichCommand OpenFileLocation { get; } - IRichCommand RefreshItems { get; } - IRichCommand Rename { get; } - - IRichCommand PinToStart { get; } - IRichCommand UnpinFromStart { get; } - IRichCommand PinFolderToSidebar { get; } - IRichCommand UnpinFolderFromSidebar { get; } - - IRichCommand SetAsWallpaperBackground { get; } - IRichCommand SetAsSlideshowBackground { get; } - IRichCommand SetAsLockscreenBackground { get; } - IRichCommand SetAsAppBackground { get; } - - IRichCommand InstallFont { get; } - IRichCommand InstallInfDriver { get; } - IRichCommand InstallCertificate { get; } - - IRichCommand RunAsAdmin { get; } - IRichCommand RunAsAnotherUser { get; } - IRichCommand RunWithPowershell { get; } - - IRichCommand LaunchPreviewPopup { get; } - - IRichCommand CompressIntoArchive { get; } - IRichCommand CompressIntoSevenZip { get; } - IRichCommand CompressIntoZip { get; } - IRichCommand DecompressArchive { get; } - IRichCommand DecompressArchiveHere { get; } - IRichCommand DecompressArchiveHereSmart { get; } - IRichCommand DecompressArchiveToChildFolder { get; } - - IRichCommand FlattenFolder { get; } - - IRichCommand RotateLeft { get; } - IRichCommand RotateRight { get; } - - IRichCommand OpenInVSCode { get; } - IRichCommand OpenRepoInVSCode { get; } - IRichCommand OpenProperties { get; } - IRichCommand OpenReleaseNotes { get; } - IRichCommand OpenClassicProperties { get; } - IRichCommand OpenStorageSense { get; } - IRichCommand OpenStorageSenseFromHome { get; } - IRichCommand OpenStorageSenseFromSidebar { get; } - IRichCommand OpenSettings { get; } - IRichCommand OpenSettingsFile { get; } - IRichCommand OpenTerminal { get; } - IRichCommand OpenTerminalAsAdmin { get; } - IRichCommand OpenTerminalFromSidebar { get; } - IRichCommand OpenTerminalFromHome { get; } - IRichCommand OpenCommandPalette { get; } - IRichCommand EditInNotepad { get; } - IRichCommand OpenLogFile { get; } - IRichCommand OpenLogFileLocation { get; } - - IRichCommand LayoutDecreaseSize { get; } - IRichCommand LayoutIncreaseSize { get; } - IRichCommand LayoutDetails { get; } - IRichCommand LayoutList { get; } - IRichCommand LayoutCards { get; } - IRichCommand LayoutGrid { get; } - IRichCommand LayoutColumns { get; } - IRichCommand LayoutAdaptive { get; } - - IRichCommand SortByName { get; } - IRichCommand SortByDateModified { get; } - IRichCommand SortByDateCreated { get; } - IRichCommand SortBySize { get; } - IRichCommand SortByType { get; } - IRichCommand SortBySyncStatus { get; } - IRichCommand SortByTag { get; } - IRichCommand SortByPath { get; } - IRichCommand SortByOriginalFolder { get; } - IRichCommand SortByDateDeleted { get; } - IRichCommand SortAscending { get; } - IRichCommand SortDescending { get; } - IRichCommand ToggleSortDirection { get; } - IRichCommand SortFoldersFirst { get; } - IRichCommand SortFilesFirst { get; } - IRichCommand SortFilesAndFoldersTogether { get; } - - IRichCommand GroupByNone { get; } - IRichCommand GroupByName { get; } - IRichCommand GroupByDateModified { get; } - IRichCommand GroupByDateCreated { get; } - IRichCommand GroupBySize { get; } - IRichCommand GroupByType { get; } - IRichCommand GroupBySyncStatus { get; } - IRichCommand GroupByTag { get; } - IRichCommand GroupByOriginalFolder { get; } - IRichCommand GroupByDateDeleted { get; } - IRichCommand GroupByFolderPath { get; } - IRichCommand GroupByDateModifiedYear { get; } - IRichCommand GroupByDateModifiedMonth { get; } - IRichCommand GroupByDateModifiedDay { get; } - IRichCommand GroupByDateCreatedYear { get; } - IRichCommand GroupByDateCreatedMonth { get; } - IRichCommand GroupByDateCreatedDay { get; } - IRichCommand GroupByDateDeletedYear { get; } - IRichCommand GroupByDateDeletedMonth { get; } - IRichCommand GroupByDateDeletedDay { get; } - IRichCommand GroupAscending { get; } - IRichCommand GroupDescending { get; } - IRichCommand ToggleGroupDirection { get; } - IRichCommand GroupByYear { get; } - IRichCommand GroupByMonth { get; } - IRichCommand ToggleGroupByDateUnit { get; } - - IRichCommand NewWindow { get; } - IRichCommand NewTab { get; } - IRichCommand NavigateBack { get; } - IRichCommand NavigateForward { get; } - IRichCommand NavigateUp { get; } - IRichCommand NavigateHome { get; } - - IRichCommand DuplicateCurrentTab { get; } - IRichCommand DuplicateSelectedTab { get; } - IRichCommand CloseTabsToTheLeftCurrent { get; } - IRichCommand CloseTabsToTheLeftSelected { get; } - IRichCommand CloseTabsToTheRightCurrent { get; } - IRichCommand CloseTabsToTheRightSelected { get; } - IRichCommand CloseOtherTabsCurrent { get; } - IRichCommand CloseOtherTabsSelected { get; } - IRichCommand ReopenClosedTab { get; } - IRichCommand PreviousTab { get; } - IRichCommand NextTab { get; } - IRichCommand CloseSelectedTab { get; } - IRichCommand CloseAllTabs { get; } - - IRichCommand CloseActivePane { get; } - IRichCommand FocusOtherPane { get; } - IRichCommand SplitPaneVertically { get; } - IRichCommand SplitPaneHorizontally { get; } - IRichCommand ArrangePanesVertically { get; } - IRichCommand ArrangePanesHorizontally { get; } - - IRichCommand OpenInNewPaneAction { get; } - IRichCommand OpenInNewPaneFromHomeAction { get; } - IRichCommand OpenInNewPaneFromSidebarAction { get; } - IRichCommand OpenInNewTabAction { get; } - IRichCommand OpenInNewTabFromHomeAction { get; } - IRichCommand OpenInNewTabFromSidebarAction { get; } - IRichCommand OpenInNewWindowAction { get; } - IRichCommand OpenInNewWindowFromHomeAction { get; } - IRichCommand OpenInNewWindowFromSidebarAction { get; } - - IRichCommand PlayAll { get; } - - IRichCommand GitClone { get; } - IRichCommand GitFetch { get; } - IRichCommand GitInit { get; } - IRichCommand GitPull { get; } - IRichCommand GitPush { get; } - IRichCommand GitSync { get; } - - IRichCommand OpenAllTaggedItems { get; } - } -} diff --git a/src/Files.App/Data/Factories/ContentPageContextFlyoutFactory.cs b/src/Files.App/Data/Factories/ContentPageContextFlyoutFactory.cs index cf4531b71e2c..f0947f14af60 100644 --- a/src/Files.App/Data/Factories/ContentPageContextFlyoutFactory.cs +++ b/src/Files.App/Data/Factories/ContentPageContextFlyoutFactory.cs @@ -407,17 +407,17 @@ public static List GetBaseItemMenuItems( ShowItem = itemsSelected && showOpenItemWith }, new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenFileLocation).Build(), - new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewTabAction) + new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewTab) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && Commands.OpenInNewTabAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && Commands.OpenInNewTab.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewWindowAction) + new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewWindow) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && Commands.OpenInNewWindowAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && Commands.OpenInNewWindow.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewPaneAction) + new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewPane) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && Commands.OpenInNewPaneAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && Commands.OpenInNewPane.IsExecutable }.Build(), new ContextMenuFlyoutItemViewModel() { diff --git a/src/Files.App/Data/Items/WidgetFileTagsContainerItem.cs b/src/Files.App/Data/Items/WidgetFileTagsContainerItem.cs index ed31af9d06f2..e16229539ce1 100644 --- a/src/Files.App/Data/Items/WidgetFileTagsContainerItem.cs +++ b/src/Files.App/Data/Items/WidgetFileTagsContainerItem.cs @@ -75,7 +75,7 @@ private Task OpenAll() { SelectedTagChanged?.Invoke(this, new(Tags.Select(tag => (tag.Path, tag.IsFolder)))); - return Commands.OpenAllTaggedItems.ExecuteAsync(); + return Commands.OpenAllTagged.ExecuteAsync(); } } } diff --git a/src/Files.App/UserControls/StatusBar.xaml b/src/Files.App/UserControls/StatusBar.xaml index c924b89a1f5d..95d7f9e32fde 100644 --- a/src/Files.App/UserControls/StatusBar.xaml +++ b/src/Files.App/UserControls/StatusBar.xaml @@ -111,17 +111,17 @@ + x:Name="OpenFolderInIDEButton" + Command="{x:Bind Commands.OpenInIDE}" + KeyboardAcceleratorTextOverride="{x:Bind Commands.OpenInIDE.HotKeys, Mode=OneWay}" + Text="{x:Bind Commands.OpenInIDE.Label, Mode=OneWay}" + ToolTipService.ToolTip="{x:Bind Commands.OpenInIDE.LabelWithHotKey, Mode=OneWay}" /> diff --git a/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs b/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs index 31698a3a9c46..6c07f8ea1d20 100644 --- a/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs +++ b/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs @@ -977,17 +977,17 @@ private List GetLocationItemMenuItems(INavigatio { IsVisible = options.ShowEmptyRecycleBin, }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewTabFromSidebarAction) + new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewTabFromSidebar) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && Commands.OpenInNewTabFromSidebarAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && Commands.OpenInNewTabFromSidebar.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewWindowFromSidebarAction) + new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewWindowFromSidebar) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && Commands.OpenInNewWindowFromSidebarAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && Commands.OpenInNewWindowFromSidebar.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewPaneFromSidebarAction) + new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenInNewPaneFromSidebar) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && Commands.OpenInNewPaneFromSidebarAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && Commands.OpenInNewPaneFromSidebar.IsExecutable }.Build(), new ContextMenuFlyoutItemViewModel() { diff --git a/src/Files.App/ViewModels/UserControls/Widgets/DrivesWidgetViewModel.cs b/src/Files.App/ViewModels/UserControls/Widgets/DrivesWidgetViewModel.cs index 1e64bb52ad53..f223f6c85d1f 100644 --- a/src/Files.App/ViewModels/UserControls/Widgets/DrivesWidgetViewModel.cs +++ b/src/Files.App/ViewModels/UserControls/Widgets/DrivesWidgetViewModel.cs @@ -96,17 +96,17 @@ public override List GetItemMenuItems(WidgetCard return new List() { - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewTabFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewTabFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && CommandManager.OpenInNewTabFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && CommandManager.OpenInNewTabFromHome.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewWindowFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewWindowFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && CommandManager.OpenInNewWindowFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && CommandManager.OpenInNewWindowFromHome.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewPaneFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewPaneFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && CommandManager.OpenInNewPaneFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && CommandManager.OpenInNewPaneFromHome.IsExecutable }.Build(), new() { diff --git a/src/Files.App/ViewModels/UserControls/Widgets/FileTagsWidgetViewModel.cs b/src/Files.App/ViewModels/UserControls/Widgets/FileTagsWidgetViewModel.cs index a70de3d98b9c..dc8435e3d6a4 100644 --- a/src/Files.App/ViewModels/UserControls/Widgets/FileTagsWidgetViewModel.cs +++ b/src/Files.App/ViewModels/UserControls/Widgets/FileTagsWidgetViewModel.cs @@ -94,17 +94,17 @@ public override List GetItemMenuItems(WidgetCard { return new List() { - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewTabFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewTabFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && CommandManager.OpenInNewTabFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && CommandManager.OpenInNewTabFromHome.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewWindowFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewWindowFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && CommandManager.OpenInNewWindowFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && CommandManager.OpenInNewWindowFromHome.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewPaneFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewPaneFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && CommandManager.OpenInNewPaneFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && CommandManager.OpenInNewPaneFromHome.IsExecutable }.Build(), new() { diff --git a/src/Files.App/ViewModels/UserControls/Widgets/NetworkLocationsWidgetViewModel.cs b/src/Files.App/ViewModels/UserControls/Widgets/NetworkLocationsWidgetViewModel.cs index 17995df491f3..639c0afd69f4 100644 --- a/src/Files.App/ViewModels/UserControls/Widgets/NetworkLocationsWidgetViewModel.cs +++ b/src/Files.App/ViewModels/UserControls/Widgets/NetworkLocationsWidgetViewModel.cs @@ -101,17 +101,17 @@ public override List GetItemMenuItems(WidgetCard return new List() { - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewTabFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewTabFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && CommandManager.OpenInNewTabFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && CommandManager.OpenInNewTabFromHome.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewWindowFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewWindowFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && CommandManager.OpenInNewWindowFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && CommandManager.OpenInNewWindowFromHome.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewPaneFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewPaneFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && CommandManager.OpenInNewPaneFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && CommandManager.OpenInNewPaneFromHome.IsExecutable }.Build(), new() { diff --git a/src/Files.App/ViewModels/UserControls/Widgets/QuickAccessWidgetViewModel.cs b/src/Files.App/ViewModels/UserControls/Widgets/QuickAccessWidgetViewModel.cs index 4e83dcadd5eb..27dfb423e185 100644 --- a/src/Files.App/ViewModels/UserControls/Widgets/QuickAccessWidgetViewModel.cs +++ b/src/Files.App/ViewModels/UserControls/Widgets/QuickAccessWidgetViewModel.cs @@ -92,17 +92,17 @@ public override List GetItemMenuItems(WidgetCard { return new List() { - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewTabFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewTabFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && CommandManager.OpenInNewTabFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewTab && CommandManager.OpenInNewTabFromHome.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewWindowFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewWindowFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && CommandManager.OpenInNewWindowFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewWindow && CommandManager.OpenInNewWindowFromHome.IsExecutable }.Build(), - new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewPaneFromHomeAction) + new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenInNewPaneFromHome) { - IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && CommandManager.OpenInNewPaneFromHomeAction.IsExecutable + IsVisible = UserSettingsService.GeneralSettingsService.ShowOpenInNewPane && CommandManager.OpenInNewPaneFromHome.IsExecutable }.Build(), new() { diff --git a/src/Files.Core.SourceGenerator/Generators/CommandManagerGenerator.cs b/src/Files.Core.SourceGenerator/Generators/CommandManagerGenerator.cs new file mode 100644 index 000000000000..645fd866d8bf --- /dev/null +++ b/src/Files.Core.SourceGenerator/Generators/CommandManagerGenerator.cs @@ -0,0 +1,130 @@ +// Copyright (c) Files Community +// Licensed under the MIT License. + +namespace Files.Core.SourceGenerator.Generators +{ + [Generator(LanguageNames.CSharp)] + internal sealed class CommandManagerGenerator : IIncrementalGenerator + { + public void Initialize(IncrementalGeneratorInitializationContext context) + { + var sources = context.SyntaxProvider.ForAttributeWithMetadataName( + "Files.Shared.Attributes.GeneratedRichCommandAttribute", + static (node, token) => true, + static (context, token) => context) + .Collect(); + + context.RegisterSourceOutput(sources, (context, sources) => + { + if (sources.Length is 0) + return; + + List commandNames = []; + foreach (var source in sources) + { + var typeSymbol = (INamedTypeSymbol)source.TargetSymbol; + var commandName = typeSymbol.Name; + + if (typeSymbol.Name.EndsWith("Action")) + commandName = typeSymbol.Name[..^"Action".Length]; + + commandNames.Add(commandName); + } + + commandNames.Sort(); + + string commandCodesEnum = GenerateCommandCodes(commandNames); + context.AddSource($"CommandCodes.g.cs", commandCodesEnum); + + string commandManagerInterface = GenerateICommandManager(commandNames); + context.AddSource($"ICommandManager.g.cs", commandManagerInterface); + + string commandManagerClass = GenerateCommandManager(commandNames); + context.AddSource($"CommandManager.g.cs", commandManagerClass); + }); + } + + private string GenerateCommandCodes(IEnumerable commandNames) + { + StringBuilder builder = new(); + builder.AppendLine($"// "); + builder.AppendLine($""); + builder.AppendLine($"namespace Files.App.Data.Commands;"); + builder.AppendLine($""); + builder.AppendLine($"public enum CommandCodes"); + builder.AppendLine($"{{"); + + builder.AppendLine($" None,"); + builder.AppendLine($""); + + foreach (var enumName in commandNames) + builder.AppendLine($" {enumName},"); + + builder.AppendLine($"}}"); + + return builder.ToString(); + } + + private string GenerateICommandManager(IEnumerable commandNames) + { + StringBuilder builder = new(); + builder.AppendLine($"// "); + builder.AppendLine($""); + builder.AppendLine($"namespace Files.App.Data.Commands;"); + builder.AppendLine($""); + builder.AppendLine($"public interface ICommandManager : IEnumerable"); + builder.AppendLine($"{{"); + + builder.AppendLine($" IRichCommand this[CommandCodes code] {{ get; }}"); + builder.AppendLine($" IRichCommand this[string code] {{ get; }}"); + builder.AppendLine($" IRichCommand this[HotKey customHotKey] {{ get; }}"); + + builder.AppendLine($""); + builder.AppendLine($" IRichCommand None {{ get; }}"); + builder.AppendLine($""); + + foreach (var commandName in commandNames) + builder.AppendLine($" IRichCommand {commandName} {{ get; }}"); + + builder.AppendLine($"}}"); + + return builder.ToString(); + } + + private string GenerateCommandManager(IEnumerable commandNames) + { + StringBuilder builder = new(); + builder.AppendLine($"// "); + builder.AppendLine($""); + builder.AppendLine($"using global::Files.App.Actions;"); + builder.AppendLine($"using global::System.Collections.Frozen;"); + builder.AppendLine($""); + builder.AppendLine($"namespace Files.App.Data.Commands;"); + builder.AppendLine($""); + builder.AppendLine($"internal sealed partial class CommandManager"); + builder.AppendLine($"{{"); + + builder.AppendLine($" private readonly FrozenDictionary commands;"); + builder.AppendLine($""); + + builder.AppendLine($" public IRichCommand None => commands[CommandCodes.None];"); + builder.AppendLine($""); + + foreach (var commandName in commandNames) + builder.AppendLine($" public IRichCommand {commandName} => commands[CommandCodes.{commandName}];"); + + builder.AppendLine($""); + builder.AppendLine($" private static Dictionary CreateActions() => new()"); + builder.AppendLine($" {{"); + + foreach (var commandName in commandNames) + builder.AppendLine($" [CommandCodes.{commandName}] = new {commandName}Action(),"); + + builder.AppendLine($" }};"); + + builder.AppendLine($"}}"); + + return builder.ToString(); + } + } +} diff --git a/src/Files.Shared/Attributes/GeneratedRichCommandAttribute.cs b/src/Files.Shared/Attributes/GeneratedRichCommandAttribute.cs new file mode 100644 index 000000000000..8fc44a4c30de --- /dev/null +++ b/src/Files.Shared/Attributes/GeneratedRichCommandAttribute.cs @@ -0,0 +1,9 @@ +using System; + +namespace Files.Shared.Attributes; + +[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] +public sealed class GeneratedRichCommandAttribute : Attribute +{ + public Type[]? AssociatedActions { get; set; } +} From 7ff47533f55ad548621c6dbd31421a406a134ea3 Mon Sep 17 00:00:00 2001 From: Yair <39923744+yaira2@users.noreply.github.com> Date: Thu, 4 Sep 2025 16:27:42 +0000 Subject: [PATCH 3/4] Code Quality: Refactor service initialization (#17529) --- .../Helpers/Application/AppLifecycleHelper.cs | 25 ++++++----- .../Utils/Cloud/CloudDrivesManager.cs | 42 +++++++++++-------- 2 files changed, 39 insertions(+), 28 deletions(-) diff --git a/src/Files.App/Helpers/Application/AppLifecycleHelper.cs b/src/Files.App/Helpers/Application/AppLifecycleHelper.cs index 9be8c4bd051f..06a7757d6cac 100644 --- a/src/Files.App/Helpers/Application/AppLifecycleHelper.cs +++ b/src/Files.App/Helpers/Application/AppLifecycleHelper.cs @@ -105,23 +105,26 @@ public static async Task InitializeAppComponentsAsync() // Start off a list of tasks we need to run before we can continue startup await Task.WhenAll( - OptionalTaskAsync(CloudDrivesManager.UpdateDrivesAsync(), generalSettingsService.ShowCloudDrivesSection), - App.LibraryManager.UpdateLibrariesAsync(), - OptionalTaskAsync(WSLDistroManager.UpdateDrivesAsync(), generalSettingsService.ShowWslSection), - OptionalTaskAsync(App.FileTagsManager.UpdateFileTagsAsync(), generalSettingsService.ShowFileTagsSection), App.QuickAccessManager.InitializeAsync() ); - await Task.WhenAll( - jumpListService.InitializeAsync(), - addItemService.InitializeAsync(), - ContextMenu.WarmUpQueryContextMenuAsync() - ); + // Start non-critical tasks without waiting for them to complete + _ = Task.Run(async () => + { + await Task.WhenAll( + OptionalTaskAsync(CloudDrivesManager.UpdateDrivesAsync(), generalSettingsService.ShowCloudDrivesSection), + App.LibraryManager.UpdateLibrariesAsync(), + OptionalTaskAsync(WSLDistroManager.UpdateDrivesAsync(), generalSettingsService.ShowWslSection), + OptionalTaskAsync(App.FileTagsManager.UpdateFileTagsAsync(), generalSettingsService.ShowFileTagsSection), + jumpListService.InitializeAsync(), + addItemService.InitializeAsync(), + ContextMenu.WarmUpQueryContextMenuAsync(), + CheckAppUpdate() + ); + }); FileTagsHelper.UpdateTagsDb(); - await CheckAppUpdate(); - static Task OptionalTaskAsync(Task task, bool condition) { if (condition) diff --git a/src/Files.App/Utils/Cloud/CloudDrivesManager.cs b/src/Files.App/Utils/Cloud/CloudDrivesManager.cs index c153be737873..8e845dd50ed8 100644 --- a/src/Files.App/Utils/Cloud/CloudDrivesManager.cs +++ b/src/Files.App/Utils/Cloud/CloudDrivesManager.cs @@ -11,12 +11,10 @@ namespace Files.App.Utils.Cloud public static class CloudDrivesManager { private static readonly ILogger _logger = Ioc.Default.GetRequiredService>(); - private static readonly ICloudDetector _detector = Ioc.Default.GetRequiredService(); - public static EventHandler DataChanged; - private static readonly List _Drives = []; + public static IReadOnlyList Drives { get @@ -72,6 +70,25 @@ public static async Task UpdateDrivesAsync() ShowProperties = true, }; + _ = LoadIconAsync(cloudProviderItem, provider); + lock (_Drives) + { + if (_Drives.Any(x => x.Path == cloudProviderItem.Path)) + continue; + + _Drives.Add(cloudProviderItem); + } + DataChanged?.Invoke( + SectionType.CloudDrives, + new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, cloudProviderItem) + ); + } + } + + private static async Task LoadIconAsync(DriveItem cloudProviderItem, ICloudProvider provider) + { + try + { var iconData = provider.IconData; if (iconData is null) @@ -92,20 +109,11 @@ public static async Task UpdateDrivesAsync() await MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(async () => cloudProviderItem.Icon = await iconData.ToBitmapAsync()); } - - lock (_Drives) - { - if (_Drives.Any(x => x.Path == cloudProviderItem.Path)) - continue; - - _Drives.Add(cloudProviderItem); - } - - DataChanged?.Invoke( - SectionType.CloudDrives, - new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, cloudProviderItem) - ); + } + catch (Exception ex) + { + _logger?.LogWarning(ex, "Failed to load icon for cloud provider \"{ProviderName}\"", provider.Name); } } } -} +} \ No newline at end of file From a6b39a9fca99436b3e39d30d026fc6139459248f Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 5 Sep 2025 01:28:09 +0900 Subject: [PATCH 4/4] Code Quality: Use Satori GC for x64 and arm64 package (#17487) --- Directory.Build.props | 4 +- src/Files.App (Package)/Files.Package.wapproj | 2 +- src/Files.App.Server/Files.App.Server.csproj | 1 + src/Files.App/Files.App.csproj | 3 +- src/Satori.targets | 44 +++++++++++++++++++ 5 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 src/Satori.targets diff --git a/Directory.Build.props b/Directory.Build.props index 1eaa9e68097e..0f438c001ceb 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,8 +1,8 @@ - + net9.0 - 10.0.22621.0 + 10.0.26100.0 10.0.19041.0 10.0.26100.67-preview $(TargetFrameworkVersion)-windows$(TargetWindowsVersion) diff --git a/src/Files.App (Package)/Files.Package.wapproj b/src/Files.App (Package)/Files.Package.wapproj index e403169454e7..eda9604694c9 100644 --- a/src/Files.App (Package)/Files.Package.wapproj +++ b/src/Files.App (Package)/Files.Package.wapproj @@ -2,7 +2,7 @@ 8f60fd8e-1921-47d6-97b0-d26d7b3a4999 - 10.0.22621.0 + 10.0.26100.0 10.0.19041.0 net9.0-windows$(TargetPlatformVersion);$(AssetTargetFallback) en-US diff --git a/src/Files.App.Server/Files.App.Server.csproj b/src/Files.App.Server/Files.App.Server.csproj index 5027427b35d6..a0a643b44e32 100644 --- a/src/Files.App.Server/Files.App.Server.csproj +++ b/src/Files.App.Server/Files.App.Server.csproj @@ -51,4 +51,5 @@ + diff --git a/src/Files.App/Files.App.csproj b/src/Files.App/Files.App.csproj index 6ed8fc5d9166..872cd58d1cd9 100644 --- a/src/Files.App/Files.App.csproj +++ b/src/Files.App/Files.App.csproj @@ -136,5 +136,6 @@ - + + diff --git a/src/Satori.targets b/src/Satori.targets new file mode 100644 index 000000000000..428a17355d99 --- /dev/null +++ b/src/Satori.targets @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + runtime + + + native + true + + + %(Filename)%(Extension) + $(RuntimeIdentifier) + true + Microsoft.NETCore.App.Runtime.win-x64 + 42.42.42.42424 + 42.42.42.42424 + + + +