From 5cb2566ecf92dc26d88ef67ed511a88b17b34334 Mon Sep 17 00:00:00 2001 From: Marco Franzen Date: Wed, 22 Mar 2023 23:50:21 +0100 Subject: [PATCH 1/6] RichCommand InstallInfDriver --- .../Content/Install/InstallInfDriverAction.cs | 47 +++++++++++++++++++ src/Files.App/Commands/CommandCodes.cs | 3 ++ .../Commands/Manager/CommandManager.cs | 3 ++ .../Commands/Manager/ICommandManager.cs | 2 + .../BaseLayoutCommandImplementationModel.cs | 6 --- .../Interacts/BaseLayoutCommandsViewModel.cs | 3 -- .../IBaseLayoutCommandImplementationModel.cs | 2 - .../UserControls/InnerNavigationToolbar.xaml | 9 ++-- src/Files.App/ViewModels/ToolbarViewModel.cs | 3 -- src/Files.App/Views/BaseShellPage.cs | 1 - 10 files changed, 59 insertions(+), 20 deletions(-) create mode 100644 src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs diff --git a/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs new file mode 100644 index 000000000000..be64d284fbef --- /dev/null +++ b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs @@ -0,0 +1,47 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.DependencyInjection; +using Files.App.Commands; +using Files.App.Contexts; +using Files.App.Extensions; +using Files.App.Filesystem; +using Files.App.Shell; +using Files.Backend.Helpers; +using System.Threading.Tasks; + +namespace Files.App.Actions.Content.Install +{ + internal class InstallInfDriverAction : ObservableObject, IAction + { + private readonly IContentPageContext context = Ioc.Default.GetRequiredService(); + + public string Label => "Install".GetLocalizedResource(); + + public RichGlyph Glyph { get; } = new("\uE9F5"); + + public bool IsExecutable => context.SelectedItems.Count == 1 && + FileExtensionHelpers.IsInfFile(context.SelectedItems[0].FileExtension) && + context.PageType is not ContentPageTypes.RecycleBin; + + public InstallInfDriverAction() + { + context.PropertyChanged += Context_PropertyChanged; + } + + public async Task ExecuteAsync() + { + foreach (ListedItem selectedItem in context.SelectedItems) + await Win32API.InstallInf(selectedItem.ItemPath); + } + + public void Context_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e) + { + switch (e.PropertyName) + { + case nameof(IContentPageContext.SelectedItems): + case nameof(IContentPageContext.PageType): + OnPropertyChanged(nameof(IsExecutable)); + break; + } + } + } +} diff --git a/src/Files.App/Commands/CommandCodes.cs b/src/Files.App/Commands/CommandCodes.cs index 64296f03ffb8..765d0bcb0baa 100644 --- a/src/Files.App/Commands/CommandCodes.cs +++ b/src/Files.App/Commands/CommandCodes.cs @@ -48,6 +48,9 @@ public enum CommandCodes SetAsSlideshowBackground, SetAsLockscreenBackground, + // Install + InstallInfDriver, + // Run RunAsAdmin, RunAsAnotherUser, diff --git a/src/Files.App/Commands/Manager/CommandManager.cs b/src/Files.App/Commands/Manager/CommandManager.cs index 2484df0a16e5..ec3e2c37f58f 100644 --- a/src/Files.App/Commands/Manager/CommandManager.cs +++ b/src/Files.App/Commands/Manager/CommandManager.cs @@ -3,6 +3,7 @@ using Files.App.Actions.Content.Archives; using Files.App.Actions.Content.Background; using Files.App.Actions.Content.ImageEdition; +using Files.App.Actions.Content.Install; using Files.App.Actions.Favorites; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; @@ -54,6 +55,7 @@ internal class CommandManager : ICommandManager public IRichCommand PasteItem => commands[CommandCodes.PasteItem]; public IRichCommand PasteItemToSelection => commands[CommandCodes.PasteItemToSelection]; public IRichCommand DeleteItem => commands[CommandCodes.DeleteItem]; + public IRichCommand InstallInfDriver => commands[CommandCodes.InstallInfDriver]; public IRichCommand RunAsAdmin => commands[CommandCodes.RunAsAdmin]; public IRichCommand RunAsAnotherUser => commands[CommandCodes.RunAsAnotherUser]; public IRichCommand LaunchQuickLook => commands[CommandCodes.LaunchQuickLook]; @@ -165,6 +167,7 @@ public CommandManager() [CommandCodes.PasteItem] = new PasteItemAction(), [CommandCodes.PasteItemToSelection] = new PasteItemToSelectionAction(), [CommandCodes.DeleteItem] = new DeleteItemAction(), + [CommandCodes.InstallInfDriver] = new InstallInfDriverAction(), [CommandCodes.RunAsAdmin] = new RunAsAdminAction(), [CommandCodes.RunAsAnotherUser] = new RunAsAnotherUserAction(), [CommandCodes.LaunchQuickLook] = new LaunchQuickLookAction(), diff --git a/src/Files.App/Commands/Manager/ICommandManager.cs b/src/Files.App/Commands/Manager/ICommandManager.cs index 9f510c43bac5..dca305b4f0c0 100644 --- a/src/Files.App/Commands/Manager/ICommandManager.cs +++ b/src/Files.App/Commands/Manager/ICommandManager.cs @@ -45,6 +45,8 @@ public interface ICommandManager : IEnumerable IRichCommand SetAsSlideshowBackground { get; } IRichCommand SetAsLockscreenBackground { get; } + IRichCommand InstallInfDriver { get; } + IRichCommand RunAsAdmin { get; } IRichCommand RunAsAnotherUser { get; } diff --git a/src/Files.App/Interacts/BaseLayoutCommandImplementationModel.cs b/src/Files.App/Interacts/BaseLayoutCommandImplementationModel.cs index ec5c6580c70b..9fae05404a1f 100644 --- a/src/Files.App/Interacts/BaseLayoutCommandImplementationModel.cs +++ b/src/Files.App/Interacts/BaseLayoutCommandImplementationModel.cs @@ -378,12 +378,6 @@ public async Task CreateFolderWithSelection(RoutedEventArgs e) await UIFilesystemHelpers.CreateFolderWithSelectionAsync(associatedInstance); } - public async Task InstallInfDriver() - { - foreach (ListedItem selectedItem in SlimContentPage.SelectedItems) - await Win32API.InstallInf(selectedItem.ItemPath); - } - public async Task PlayAll() { await NavigationHelpers.OpenSelectedItems(associatedInstance); diff --git a/src/Files.App/Interacts/BaseLayoutCommandsViewModel.cs b/src/Files.App/Interacts/BaseLayoutCommandsViewModel.cs index bcb13bce590b..01cd67fbaa81 100644 --- a/src/Files.App/Interacts/BaseLayoutCommandsViewModel.cs +++ b/src/Files.App/Interacts/BaseLayoutCommandsViewModel.cs @@ -42,7 +42,6 @@ private void InitializeCommands() RefreshCommand = new RelayCommand(CommandsModel.RefreshItems); SearchUnindexedItems = new RelayCommand(CommandsModel.SearchUnindexedItems); CreateFolderWithSelection = new AsyncRelayCommand(CommandsModel.CreateFolderWithSelection); - InstallInfDriver = new AsyncRelayCommand(CommandsModel.InstallInfDriver); PlayAllCommand = new AsyncRelayCommand(CommandsModel.PlayAll); FormatDriveCommand = new RelayCommand(CommandsModel.FormatDrive); } @@ -81,8 +80,6 @@ private void InitializeCommands() public ICommand CreateFolderWithSelection { get; private set; } - public ICommand InstallInfDriver { get; set; } - public ICommand PlayAllCommand { get; private set; } public ICommand FormatDriveCommand { get; private set; } diff --git a/src/Files.App/Interacts/IBaseLayoutCommandImplementationModel.cs b/src/Files.App/Interacts/IBaseLayoutCommandImplementationModel.cs index e5b33c413439..9fd0cd217767 100644 --- a/src/Files.App/Interacts/IBaseLayoutCommandImplementationModel.cs +++ b/src/Files.App/Interacts/IBaseLayoutCommandImplementationModel.cs @@ -39,8 +39,6 @@ public interface IBaseLayoutCommandImplementationModel : IDisposable Task CreateFolderWithSelection(RoutedEventArgs e); - Task InstallInfDriver(); - Task PlayAll(); void FormatDrive(ListedItem? obj); diff --git a/src/Files.App/UserControls/InnerNavigationToolbar.xaml b/src/Files.App/UserControls/InnerNavigationToolbar.xaml index 2beb2c746859..6d927557b9a8 100644 --- a/src/Files.App/UserControls/InnerNavigationToolbar.xaml +++ b/src/Files.App/UserControls/InnerNavigationToolbar.xaml @@ -321,14 +321,13 @@ ToolTipService.ToolTip="{x:Bind Commands.SetAsSlideshowBackground.LabelWithHotKey}" /> - + SlimContentPage?.CommandsViewModel.ShareItemCommand.Execute(null)); ToolbarViewModel.RunWithPowerShellCommand = new RelayCommand(async () => await Win32Helpers.InvokeWin32ComponentAsync("powershell", this, PathNormalization.NormalizePath(SlimContentPage?.SelectedItem.ItemPath))); ToolbarViewModel.PropertiesCommand = new RelayCommand(() => SlimContentPage?.CommandsViewModel.ShowPropertiesCommand.Execute(null)); - ToolbarViewModel.InstallInfCommand = new RelayCommand(() => SlimContentPage?.CommandsViewModel.InstallInfDriver.Execute(null));; ToolbarViewModel.UpdateCommand = new AsyncRelayCommand(async () => await updateSettingsService.DownloadUpdates()); ToolbarViewModel.PlayAllCommand = new RelayCommand(() => SlimContentPage?.CommandsViewModel.PlayAllCommand.Execute(null)); } From def53dc3f06fb3b012d645215a1192797f1c12ae Mon Sep 17 00:00:00 2001 From: Marco Franzen Date: Thu, 23 Mar 2023 00:02:16 +0100 Subject: [PATCH 2/6] moved InstallFont to the install folder --- .../Actions/Content/{ => Install}/InstallFontAction.cs | 2 +- src/Files.App/Commands/CommandCodes.cs | 4 +--- src/Files.App/Commands/Manager/CommandManager.cs | 4 ++-- src/Files.App/Commands/Manager/ICommandManager.cs | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) rename src/Files.App/Actions/Content/{ => Install}/InstallFontAction.cs (96%) diff --git a/src/Files.App/Actions/Content/InstallFontAction.cs b/src/Files.App/Actions/Content/Install/InstallFontAction.cs similarity index 96% rename from src/Files.App/Actions/Content/InstallFontAction.cs rename to src/Files.App/Actions/Content/Install/InstallFontAction.cs index 7f7aa51c5314..7cc68ab0b0bf 100644 --- a/src/Files.App/Actions/Content/InstallFontAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallFontAction.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Threading.Tasks; -namespace Files.App.Actions +namespace Files.App.Actions.Content.Install { internal class InstallFontAction : ObservableObject, IAction { diff --git a/src/Files.App/Commands/CommandCodes.cs b/src/Files.App/Commands/CommandCodes.cs index 765d0bcb0baa..de82bcc030bf 100644 --- a/src/Files.App/Commands/CommandCodes.cs +++ b/src/Files.App/Commands/CommandCodes.cs @@ -49,6 +49,7 @@ public enum CommandCodes SetAsLockscreenBackground, // Install + InstallFont, InstallInfDriver, // Run @@ -119,8 +120,5 @@ public enum CommandCodes // Navigation NewTab, DuplicateTab, - - // Other - InstallFont, } } diff --git a/src/Files.App/Commands/Manager/CommandManager.cs b/src/Files.App/Commands/Manager/CommandManager.cs index ec3e2c37f58f..129270cc0c98 100644 --- a/src/Files.App/Commands/Manager/CommandManager.cs +++ b/src/Files.App/Commands/Manager/CommandManager.cs @@ -55,6 +55,7 @@ internal class CommandManager : ICommandManager public IRichCommand PasteItem => commands[CommandCodes.PasteItem]; public IRichCommand PasteItemToSelection => commands[CommandCodes.PasteItemToSelection]; public IRichCommand DeleteItem => commands[CommandCodes.DeleteItem]; + public IRichCommand InstallFont => commands[CommandCodes.InstallFont]; public IRichCommand InstallInfDriver => commands[CommandCodes.InstallInfDriver]; public IRichCommand RunAsAdmin => commands[CommandCodes.RunAsAdmin]; public IRichCommand RunAsAnotherUser => commands[CommandCodes.RunAsAnotherUser]; @@ -110,7 +111,6 @@ internal class CommandManager : ICommandManager public IRichCommand ToggleGroupDirection => commands[CommandCodes.ToggleGroupDirection]; public IRichCommand NewTab => commands[CommandCodes.NewTab]; public IRichCommand DuplicateTab => commands[CommandCodes.DuplicateTab]; - public IRichCommand InstallFont => commands[CommandCodes.InstallFont]; public CommandManager() { @@ -167,6 +167,7 @@ public CommandManager() [CommandCodes.PasteItem] = new PasteItemAction(), [CommandCodes.PasteItemToSelection] = new PasteItemToSelectionAction(), [CommandCodes.DeleteItem] = new DeleteItemAction(), + [CommandCodes.InstallFont] = new InstallFontAction(), [CommandCodes.InstallInfDriver] = new InstallInfDriverAction(), [CommandCodes.RunAsAdmin] = new RunAsAdminAction(), [CommandCodes.RunAsAnotherUser] = new RunAsAnotherUserAction(), @@ -222,7 +223,6 @@ public CommandManager() [CommandCodes.ToggleGroupDirection] = new ToggleGroupDirectionAction(), [CommandCodes.NewTab] = new NewTabAction(), [CommandCodes.DuplicateTab] = new DuplicateTabAction(), - [CommandCodes.InstallFont] = new InstallFontAction(), }; [DebuggerDisplay("Command None")] diff --git a/src/Files.App/Commands/Manager/ICommandManager.cs b/src/Files.App/Commands/Manager/ICommandManager.cs index dca305b4f0c0..d4a8bc675ee0 100644 --- a/src/Files.App/Commands/Manager/ICommandManager.cs +++ b/src/Files.App/Commands/Manager/ICommandManager.cs @@ -45,6 +45,7 @@ public interface ICommandManager : IEnumerable IRichCommand SetAsSlideshowBackground { get; } IRichCommand SetAsLockscreenBackground { get; } + IRichCommand InstallFont { get; } IRichCommand InstallInfDriver { get; } IRichCommand RunAsAdmin { get; } @@ -106,7 +107,5 @@ public interface ICommandManager : IEnumerable IRichCommand NewTab { get; } IRichCommand DuplicateTab { get; } - - IRichCommand InstallFont { get; } } } From 489bd54e3fe31cadde2990b9e39d962ea0459233 Mon Sep 17 00:00:00 2001 From: Marco Franzen Date: Thu, 23 Mar 2023 00:04:48 +0100 Subject: [PATCH 3/6] support pathes with spaces --- src/Files.App/Shell/Win32API.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Files.App/Shell/Win32API.cs b/src/Files.App/Shell/Win32API.cs index 688150d6921b..29f35e3eaf6d 100644 --- a/src/Files.App/Shell/Win32API.cs +++ b/src/Files.App/Shell/Win32API.cs @@ -787,12 +787,12 @@ public static async Task InstallInf(string filePath) { var cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(30 * 1000)); - using Process process = new Process(); + using Process process = new(); process.StartInfo.FileName = "InfDefaultInstall.exe"; process.StartInfo.Verb = "runas"; process.StartInfo.UseShellExecute = true; process.StartInfo.CreateNoWindow = true; - process.StartInfo.Arguments = $"{filePath}"; + process.StartInfo.Arguments = $"\"{filePath}\""; process.Start(); await process.WaitForExitAsync(cts.Token); From dace3cc122c03c10acf45ad4532d5231ce286453 Mon Sep 17 00:00:00 2001 From: Marco Franzen Date: Thu, 23 Mar 2023 02:38:51 +0100 Subject: [PATCH 4/6] hide install buttions in ZipFolder --- src/Files.App/Actions/Content/Install/InstallFontAction.cs | 2 +- src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Files.App/Actions/Content/Install/InstallFontAction.cs b/src/Files.App/Actions/Content/Install/InstallFontAction.cs index 7cc68ab0b0bf..3c9a166f75ec 100644 --- a/src/Files.App/Actions/Content/Install/InstallFontAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallFontAction.cs @@ -18,7 +18,7 @@ internal class InstallFontAction : ObservableObject, IAction public bool IsExecutable => context.SelectedItems.Any() && context.SelectedItems.All(x => FileExtensionHelpers.IsFontFile(x.FileExtension)) && - context.PageType is not ContentPageTypes.RecycleBin; + context.PageType is not ContentPageTypes.RecycleBin and not ContentPageTypes.ZipFolder; public InstallFontAction() { diff --git a/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs index be64d284fbef..c1d13116978d 100644 --- a/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs @@ -20,7 +20,7 @@ internal class InstallInfDriverAction : ObservableObject, IAction public bool IsExecutable => context.SelectedItems.Count == 1 && FileExtensionHelpers.IsInfFile(context.SelectedItems[0].FileExtension) && - context.PageType is not ContentPageTypes.RecycleBin; + context.PageType is not ContentPageTypes.RecycleBin and not ContentPageTypes.ZipFolder; public InstallInfDriverAction() { From dada7a6617fa73569ee86d06966e5bfb7adbed38 Mon Sep 17 00:00:00 2001 From: Marco Franzen Date: Thu, 23 Mar 2023 02:47:20 +0100 Subject: [PATCH 5/6] use Files.App.Actions as namespace for all actions --- .../Actions/Content/Archives/CompressIntoArchiveAction.cs | 2 +- .../Actions/Content/Archives/CompressIntoSevenZipAction.cs | 2 +- .../Actions/Content/Archives/CompressIntoZipAction.cs | 2 +- src/Files.App/Actions/Content/Archives/DecompressArchive.cs | 2 +- .../Actions/Content/Archives/DecompressArchiveHere.cs | 2 +- .../Content/Archives/DecompressArchiveToChildFolderAction.cs | 2 +- .../Content/Background/SetAsLockscreenBackgroundAction.cs | 2 +- .../Content/Background/SetAsSlideshowBackgroundAction.cs | 2 +- .../Content/Background/SetAsWallpaperBackgroundAction.cs | 2 +- .../Actions/Content/ImageEdition/RotateLeftAction.cs | 2 +- .../Actions/Content/ImageEdition/RotateRightAction.cs | 2 +- src/Files.App/Actions/Content/Install/InstallFontAction.cs | 2 +- .../Actions/Content/Install/InstallInfDriverAction.cs | 2 +- .../Actions/Content/QuickLook/LaunchQuickLookAction.cs | 2 -- src/Files.App/Actions/Favorites/PinItemAction.cs | 2 +- src/Files.App/Commands/Manager/CommandManager.cs | 5 ----- 16 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/Files.App/Actions/Content/Archives/CompressIntoArchiveAction.cs b/src/Files.App/Actions/Content/Archives/CompressIntoArchiveAction.cs index 4f740c85d2a6..5bf088d82013 100644 --- a/src/Files.App/Actions/Content/Archives/CompressIntoArchiveAction.cs +++ b/src/Files.App/Actions/Content/Archives/CompressIntoArchiveAction.cs @@ -8,7 +8,7 @@ using System.ComponentModel; using System.Threading.Tasks; -namespace Files.App.Actions.Content.Archives +namespace Files.App.Actions { internal class CompressIntoArchiveAction : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/Archives/CompressIntoSevenZipAction.cs b/src/Files.App/Actions/Content/Archives/CompressIntoSevenZipAction.cs index 0b59948f723a..3503e8445c76 100644 --- a/src/Files.App/Actions/Content/Archives/CompressIntoSevenZipAction.cs +++ b/src/Files.App/Actions/Content/Archives/CompressIntoSevenZipAction.cs @@ -7,7 +7,7 @@ using System.ComponentModel; using System.Threading.Tasks; -namespace Files.App.Actions.Content.Archives +namespace Files.App.Actions { internal class CompressIntoSevenZipAction : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/Archives/CompressIntoZipAction.cs b/src/Files.App/Actions/Content/Archives/CompressIntoZipAction.cs index ea7455a751de..8ce8d583edc2 100644 --- a/src/Files.App/Actions/Content/Archives/CompressIntoZipAction.cs +++ b/src/Files.App/Actions/Content/Archives/CompressIntoZipAction.cs @@ -7,7 +7,7 @@ using System.ComponentModel; using System.Threading.Tasks; -namespace Files.App.Actions.Content.Archives +namespace Files.App.Actions { internal class CompressIntoZipAction : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/Archives/DecompressArchive.cs b/src/Files.App/Actions/Content/Archives/DecompressArchive.cs index add9905fb69d..178caed8ad57 100644 --- a/src/Files.App/Actions/Content/Archives/DecompressArchive.cs +++ b/src/Files.App/Actions/Content/Archives/DecompressArchive.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; using Windows.System; -namespace Files.App.Actions.Content.Archives +namespace Files.App.Actions { internal class DecompressArchive : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/Archives/DecompressArchiveHere.cs b/src/Files.App/Actions/Content/Archives/DecompressArchiveHere.cs index 63f3f07bb5fa..0f51b9a5df19 100644 --- a/src/Files.App/Actions/Content/Archives/DecompressArchiveHere.cs +++ b/src/Files.App/Actions/Content/Archives/DecompressArchiveHere.cs @@ -6,7 +6,7 @@ using System.ComponentModel; using System.Threading.Tasks; -namespace Files.App.Actions.Content.Archives +namespace Files.App.Actions { internal class DecompressArchiveHere : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/Archives/DecompressArchiveToChildFolderAction.cs b/src/Files.App/Actions/Content/Archives/DecompressArchiveToChildFolderAction.cs index ab213686ea41..d2d07861efc1 100644 --- a/src/Files.App/Actions/Content/Archives/DecompressArchiveToChildFolderAction.cs +++ b/src/Files.App/Actions/Content/Archives/DecompressArchiveToChildFolderAction.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Threading.Tasks; -namespace Files.App.Actions.Content.Archives +namespace Files.App.Actions { internal class DecompressArchiveToChildFolderAction : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/Background/SetAsLockscreenBackgroundAction.cs b/src/Files.App/Actions/Content/Background/SetAsLockscreenBackgroundAction.cs index c4f5c389879e..9160cc6179e2 100644 --- a/src/Files.App/Actions/Content/Background/SetAsLockscreenBackgroundAction.cs +++ b/src/Files.App/Actions/Content/Background/SetAsLockscreenBackgroundAction.cs @@ -8,7 +8,7 @@ using System.ComponentModel; using System.Threading.Tasks; -namespace Files.App.Actions.Content.Background +namespace Files.App.Actions { internal class SetAsLockscreenBackgroundAction : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/Background/SetAsSlideshowBackgroundAction.cs b/src/Files.App/Actions/Content/Background/SetAsSlideshowBackgroundAction.cs index c37296d6f315..4b18007d3095 100644 --- a/src/Files.App/Actions/Content/Background/SetAsSlideshowBackgroundAction.cs +++ b/src/Files.App/Actions/Content/Background/SetAsSlideshowBackgroundAction.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Threading.Tasks; -namespace Files.App.Actions.Content.Background +namespace Files.App.Actions { internal class SetAsSlideshowBackgroundAction : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/Background/SetAsWallpaperBackgroundAction.cs b/src/Files.App/Actions/Content/Background/SetAsWallpaperBackgroundAction.cs index c5ede317c618..f6fd2829d329 100644 --- a/src/Files.App/Actions/Content/Background/SetAsWallpaperBackgroundAction.cs +++ b/src/Files.App/Actions/Content/Background/SetAsWallpaperBackgroundAction.cs @@ -8,7 +8,7 @@ using System.ComponentModel; using System.Threading.Tasks; -namespace Files.App.Actions.Content.Background +namespace Files.App.Actions { internal class SetAsWallpaperBackgroundAction : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/ImageEdition/RotateLeftAction.cs b/src/Files.App/Actions/Content/ImageEdition/RotateLeftAction.cs index c1d4f0860ed3..c715dbc43760 100644 --- a/src/Files.App/Actions/Content/ImageEdition/RotateLeftAction.cs +++ b/src/Files.App/Actions/Content/ImageEdition/RotateLeftAction.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Windows.Graphics.Imaging; -namespace Files.App.Actions.Content.ImageEdition +namespace Files.App.Actions { internal class RotateLeftAction : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/ImageEdition/RotateRightAction.cs b/src/Files.App/Actions/Content/ImageEdition/RotateRightAction.cs index 62a8cb53a639..66db8b3971c5 100644 --- a/src/Files.App/Actions/Content/ImageEdition/RotateRightAction.cs +++ b/src/Files.App/Actions/Content/ImageEdition/RotateRightAction.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Windows.Graphics.Imaging; -namespace Files.App.Actions.Content.ImageEdition +namespace Files.App.Actions { internal class RotateRightAction : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/Install/InstallFontAction.cs b/src/Files.App/Actions/Content/Install/InstallFontAction.cs index 3c9a166f75ec..5cbeb76ad125 100644 --- a/src/Files.App/Actions/Content/Install/InstallFontAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallFontAction.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Threading.Tasks; -namespace Files.App.Actions.Content.Install +namespace Files.App.Actions { internal class InstallFontAction : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs index c1d13116978d..4d41b47e04cb 100644 --- a/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs @@ -8,7 +8,7 @@ using Files.Backend.Helpers; using System.Threading.Tasks; -namespace Files.App.Actions.Content.Install +namespace Files.App.Actions { internal class InstallInfDriverAction : ObservableObject, IAction { diff --git a/src/Files.App/Actions/Content/QuickLook/LaunchQuickLookAction.cs b/src/Files.App/Actions/Content/QuickLook/LaunchQuickLookAction.cs index 3893fa2d3189..56eadf114dd9 100644 --- a/src/Files.App/Actions/Content/QuickLook/LaunchQuickLookAction.cs +++ b/src/Files.App/Actions/Content/QuickLook/LaunchQuickLookAction.cs @@ -4,8 +4,6 @@ using Files.App.Contexts; using Files.App.Extensions; using Files.App.Helpers; -using Files.App.Shell; -using Files.Backend.Helpers; using System.Threading.Tasks; using Windows.System; diff --git a/src/Files.App/Actions/Favorites/PinItemAction.cs b/src/Files.App/Actions/Favorites/PinItemAction.cs index 59ac52b130f1..cb4c2e04febf 100644 --- a/src/Files.App/Actions/Favorites/PinItemAction.cs +++ b/src/Files.App/Actions/Favorites/PinItemAction.cs @@ -11,7 +11,7 @@ using System.Threading.Tasks; using Windows.Storage; -namespace Files.App.Actions.Favorites +namespace Files.App.Actions { internal class PinItemAction : ObservableObject, IAction { diff --git a/src/Files.App/Commands/Manager/CommandManager.cs b/src/Files.App/Commands/Manager/CommandManager.cs index 129270cc0c98..7be075edaf7d 100644 --- a/src/Files.App/Commands/Manager/CommandManager.cs +++ b/src/Files.App/Commands/Manager/CommandManager.cs @@ -1,10 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; using Files.App.Actions; -using Files.App.Actions.Content.Archives; -using Files.App.Actions.Content.Background; -using Files.App.Actions.Content.ImageEdition; -using Files.App.Actions.Content.Install; -using Files.App.Actions.Favorites; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Input; From b3a40322604d5f3c17a582a90838d17238aa38b9 Mon Sep 17 00:00:00 2001 From: Marco Franzen Date: Thu, 23 Mar 2023 20:40:08 +0100 Subject: [PATCH 6/6] add Description to InstallInfDriverAction --- src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs index 4d41b47e04cb..1b5c478c1efb 100644 --- a/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs @@ -15,6 +15,8 @@ internal class InstallInfDriverAction : ObservableObject, IAction private readonly IContentPageContext context = Ioc.Default.GetRequiredService(); public string Label => "Install".GetLocalizedResource(); + + public string Description => "TODO: Need to be described."; public RichGlyph Glyph { get; } = new("\uE9F5");